improve performance
This commit is contained in:
parent
97592b868a
commit
0538b37c3d
3 changed files with 24 additions and 19 deletions
|
@ -16,9 +16,9 @@ $fs = 0.25;
|
|||
|
||||
/* [General Settings] */
|
||||
// number of bases along x-axis
|
||||
gridx = 4;
|
||||
gridx = 5;
|
||||
// number of bases along y-axis
|
||||
gridy = 4;
|
||||
gridy = 5;
|
||||
// base unit
|
||||
length = 42;
|
||||
|
||||
|
@ -91,6 +91,7 @@ module gridfinityBaseplate(gridx, gridy, length, dix, diy, sp, sm, sh, fitx, fit
|
|||
rounded_rectangle(dx*2, dy*2, h_base*2, r_base);
|
||||
|
||||
pattern_linear(gx, gy, length) {
|
||||
render() {
|
||||
if (sm) block_base_hole(1);
|
||||
|
||||
if (sp == 1)
|
||||
|
@ -108,6 +109,7 @@ module gridfinityBaseplate(gridx, gridy, length, dix, diy, sp, sm, sh, fitx, fit
|
|||
else if (sh == 2) cutter_counterbore();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sp == 3 || sp ==4) cutter_screw_together(gx, gy, off);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ $fs = 0.25;
|
|||
|
||||
/* [General Settings] */
|
||||
// number of bases along x-axis
|
||||
gridx = 1;
|
||||
gridx = 5;
|
||||
// number of bases along y-axis
|
||||
gridy = 1;
|
||||
gridy = 5;
|
||||
// bin height. See bin height information and "gridz_define" below.
|
||||
gridz = 6;
|
||||
// base unit
|
||||
|
|
|
@ -97,9 +97,14 @@ module gridfinityBase(gx, gy, l, dx, dy, style_hole, off=0, final_cut=true) {
|
|||
translate([0,0,-1])
|
||||
rounded_rectangle(xx+0.005, yy+0.005, h_base+h_bot/2*10, r_fo1/2+0.001);
|
||||
|
||||
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
|
||||
block_base(gx, gy, l, dbnx, dbny, style_hole, off);
|
||||
}
|
||||
}
|
||||
|
||||
module block_base(gx, gy, l, dbnx, dbny, style_hole, off) {
|
||||
render()
|
||||
difference() {
|
||||
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
|
||||
block_base_solid(dbnx, dbny, l, off);
|
||||
|
||||
if (style_hole > 0)
|
||||
|
@ -107,12 +112,10 @@ module gridfinityBase(gx, gy, l, dx, dy, style_hole, off=0, final_cut=true) {
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module block_base_solid(dbnx, dbny, l, o) {
|
||||
|
|
Loading…
Reference in a new issue