Option to only put holes at corners of bin
This commit is contained in:
parent
51b5053de2
commit
b95548fe6d
6 changed files with 25 additions and 45 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
ignore/
|
ignore/
|
||||||
gridfinity-rebuilt.json
|
gridfinity-rebuilt.json
|
||||||
|
gridfinity-rebuilt-bins.json
|
||||||
stl/
|
stl/
|
||||||
batch/
|
batch/
|
||||||
site/
|
site/
|
||||||
|
*.json
|
|
@ -55,33 +55,26 @@ d_magic = -2*d_clear-2*d_wall+d_div;
|
||||||
|
|
||||||
// Baseplate bottom part height (part added with weigthed=true)
|
// Baseplate bottom part height (part added with weigthed=true)
|
||||||
bp_h_bot = 6.4;
|
bp_h_bot = 6.4;
|
||||||
|
|
||||||
// Baseplate bottom cutout rectangle size
|
// Baseplate bottom cutout rectangle size
|
||||||
bp_cut_size = 21.4;
|
bp_cut_size = 21.4;
|
||||||
|
|
||||||
// Baseplate bottom cutout rectangle depth
|
// Baseplate bottom cutout rectangle depth
|
||||||
bp_cut_depth = 4;
|
bp_cut_depth = 4;
|
||||||
|
|
||||||
// Baseplate bottom cutout rounded thingy width
|
// Baseplate bottom cutout rounded thingy width
|
||||||
bp_rcut_width = 8.5;
|
bp_rcut_width = 8.5;
|
||||||
|
|
||||||
// Baseplate bottom cutout rounded thingy left
|
// Baseplate bottom cutout rounded thingy left
|
||||||
bp_rcut_length = 4.25;
|
bp_rcut_length = 4.25;
|
||||||
|
|
||||||
// Baseplate bottom cutout rounded thingy depth
|
// Baseplate bottom cutout rounded thingy depth
|
||||||
bp_rcut_depth = 2;
|
bp_rcut_depth = 2;
|
||||||
|
|
||||||
// countersink diameter for baseplate
|
// countersink diameter for baseplate
|
||||||
d_cs = 2.5;
|
d_cs = 2.5;
|
||||||
|
|
||||||
// radius of cutout for skeletonized baseplate
|
// radius of cutout for skeletonized baseplate
|
||||||
r_skel = 2;
|
r_skel = 2;
|
||||||
|
|
||||||
// baseplate counterbore radius
|
// baseplate counterbore radius
|
||||||
r_cb = 2.75;
|
r_cb = 2.75;
|
||||||
|
|
||||||
// baseplate counterbore depth
|
// baseplate counterbore depth
|
||||||
h_cb = 3;
|
h_cb = 3;
|
||||||
|
|
||||||
// minimum baseplate thickness (when skeletonized)
|
// minimum baseplate thickness (when skeletonized)
|
||||||
h_skel = 1;
|
h_skel = 1;
|
||||||
|
|
||||||
|
// Prime numbers
|
||||||
|
p_corn = 401;
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
"fileFormatVersion": "1",
|
|
||||||
"parameterSets": {
|
|
||||||
"New set 1": {
|
|
||||||
"$fa": "8",
|
|
||||||
"$fs": "0.25",
|
|
||||||
"div_base_x": "0",
|
|
||||||
"div_base_y": "0",
|
|
||||||
"divx": "1",
|
|
||||||
"divy": "1",
|
|
||||||
"enable_zsnap": "false",
|
|
||||||
"gridx": "1",
|
|
||||||
"gridy": "1",
|
|
||||||
"gridz": "6",
|
|
||||||
"gridz_define": "0",
|
|
||||||
"height_internal": "0",
|
|
||||||
"length": "42",
|
|
||||||
"scoop": "1",
|
|
||||||
"style_hole": "3",
|
|
||||||
"style_lip": "0",
|
|
||||||
"style_tab": "1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -38,9 +38,9 @@ gridz = 6;
|
||||||
length = 42;
|
length = 42;
|
||||||
|
|
||||||
/* [Compartments] */
|
/* [Compartments] */
|
||||||
// number of X Divisions
|
// number of X Divisions (set to zero to have solid bin)
|
||||||
divx = 1;
|
divx = 1;
|
||||||
// number of y Divisions
|
// number of y Divisions (set to zero to have solid bin)
|
||||||
divy = 1;
|
divy = 1;
|
||||||
|
|
||||||
/* [Height] */
|
/* [Height] */
|
||||||
|
@ -58,6 +58,8 @@ style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
|
||||||
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
|
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
|
||||||
// scoop weight percentage. 0 disables scoop, 1 is regular scoop. Any real number will scale the scoop.
|
// scoop weight percentage. 0 disables scoop, 1 is regular scoop. Any real number will scale the scoop.
|
||||||
scoop = 1; //[0:0.1:1]
|
scoop = 1; //[0:0.1:1]
|
||||||
|
// only cut magnet/screw holes at the corners of the bin to save uneccesary print time
|
||||||
|
style_corners = true;
|
||||||
|
|
||||||
/* [Base] */
|
/* [Base] */
|
||||||
style_hole = 3; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
|
style_hole = 3; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
|
||||||
|
@ -76,7 +78,7 @@ gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap
|
||||||
if (divx > 0 && divy > 0)
|
if (divx > 0 && divy > 0)
|
||||||
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = scoop);
|
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = scoop);
|
||||||
}
|
}
|
||||||
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole);
|
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole*(style_corners?p_corn:1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,8 @@ style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
|
||||||
|
|
||||||
/* [Base] */
|
/* [Base] */
|
||||||
style_hole = 0; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
|
style_hole = 0; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
|
||||||
|
// only cut magnet/screw holes at the corners of the bin to save uneccesary print time
|
||||||
|
style_corners = true;
|
||||||
// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
|
// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
|
||||||
div_base_x = 0;
|
div_base_x = 0;
|
||||||
// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)
|
// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)
|
||||||
|
@ -64,18 +66,19 @@ gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, lengt
|
||||||
|
|
||||||
|
|
||||||
module gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, length, div_base_x, div_base_y, style_hole) {
|
module gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, length, div_base_x, div_base_y, style_hole) {
|
||||||
|
sh = style_hole*(style_corners?p_corn:1);
|
||||||
difference() {
|
difference() {
|
||||||
union() {
|
union() {
|
||||||
gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap), 0, length)
|
gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap), 0, length)
|
||||||
children();
|
children();
|
||||||
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole);
|
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, sh);
|
||||||
}
|
}
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
union() {
|
union() {
|
||||||
intersection() {
|
intersection() {
|
||||||
difference() {
|
difference() {
|
||||||
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole, -d_wall*2, false);
|
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, sh, -d_wall*2, false);
|
||||||
translate([-gridx*length/2,-gridy*length/2,2*h_base])
|
translate([-gridx*length/2,-gridy*length/2,2*h_base])
|
||||||
cube([gridx*length,gridy*length,1000]);
|
cube([gridx*length,gridy*length,1000]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,8 +103,14 @@ module gridfinityBase(gx, gy, l, dx, dy, style_hole, off=0, final_cut=true) {
|
||||||
block_base_solid(dbnx, dbny, l, off);
|
block_base_solid(dbnx, dbny, l, off);
|
||||||
|
|
||||||
if (style_hole > 0)
|
if (style_hole > 0)
|
||||||
pattern_linear(gx, gy, l)
|
if (style_hole % p_corn < 0.001)
|
||||||
block_base_hole(style_hole, off);
|
pattern_linear(2, 2, (gx-1)*length+d_hole, (gy-1)*length+d_hole)
|
||||||
|
block_base_hole(style_hole / p_corn, off);
|
||||||
|
else
|
||||||
|
pattern_linear(gx, gy, l)
|
||||||
|
pattern_circular(abs(d_hole)<0.001?1:4)
|
||||||
|
translate([d_hole/2, d_hole/2, 0])
|
||||||
|
block_base_hole(style_hole, off);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,8 +138,6 @@ module block_base_solid(dbnx, dbny, l, o) {
|
||||||
module block_base_hole(style_hole, o=0) {
|
module block_base_hole(style_hole, o=0) {
|
||||||
r1 = r_hole1-o/2;
|
r1 = r_hole1-o/2;
|
||||||
r2 = r_hole2-o/2;
|
r2 = r_hole2-o/2;
|
||||||
pattern_circular(abs(d_hole)<0.001?1:4)
|
|
||||||
translate([d_hole/2, d_hole/2, 0])
|
|
||||||
union() {
|
union() {
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(h = 2*(h_hole-o+(style_hole==3?h_slit:0)), r=r2, center=true);
|
cylinder(h = 2*(h_hole-o+(style_hole==3?h_slit:0)), r=r2, center=true);
|
||||||
|
|
Loading…
Reference in a new issue