mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2024-12-22 23:03:28 +00:00
Make style_hole=4 compatible with only_corners
This commit is contained in:
parent
74d40adb0b
commit
e31742e37d
1 changed files with 19 additions and 3 deletions
|
@ -143,10 +143,26 @@ module gridfinityBase(gx, gy, l, dx, dy, style_hole, off=0, final_cut=true, only
|
||||||
difference(){
|
difference(){
|
||||||
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
|
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
|
||||||
block_base(gx, gy, l, dbnx, dbny, 0, off);
|
block_base(gx, gy, l, dbnx, dbny, 0, off);
|
||||||
|
if (style_hole == 4) {
|
||||||
|
translate([(gx/2)*l_grid - d_hole_from_side, (gy/2) * l_grid - d_hole_from_side, h_slit*2])
|
||||||
|
refined_hole();
|
||||||
|
mirror([1, 0, 0])
|
||||||
|
translate([(gx/2)*l_grid - d_hole_from_side, (gy/2) * l_grid - d_hole_from_side, h_slit*2])
|
||||||
|
refined_hole();
|
||||||
|
mirror([0, 1, 0]) {
|
||||||
|
translate([(gx/2)*l_grid - d_hole_from_side, (gy/2) * l_grid - d_hole_from_side, h_slit*2])
|
||||||
|
refined_hole();
|
||||||
|
mirror([1, 0, 0])
|
||||||
|
translate([(gx/2)*l_grid - d_hole_from_side, (gy/2) * l_grid - d_hole_from_side, h_slit*2])
|
||||||
|
refined_hole();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
pattern_linear(2, 2, (gx-1)*l_grid+d_hole, (gy-1)*l_grid+d_hole)
|
pattern_linear(2, 2, (gx-1)*l_grid+d_hole, (gy-1)*l_grid+d_hole)
|
||||||
block_base_hole(style_hole, off);
|
block_base_hole(style_hole, off);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
|
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
|
||||||
block_base(gx, gy, l, dbnx, dbny, style_hole, off);
|
block_base(gx, gy, l, dbnx, dbny, style_hole, off);
|
||||||
|
|
Loading…
Reference in a new issue