fix dynamic hole location on grid length

This commit is contained in:
Ruud Swinkels 2023-04-26 19:05:37 +02:00
parent ce9132f41c
commit 3b90df14f5
2 changed files with 5 additions and 3 deletions

View file

@ -21,7 +21,9 @@ r_hole1 = 1.5;
// magnet hole radius // magnet hole radius
r_hole2 = 3.25; r_hole2 = 3.25;
// center-to-center distance between holes // center-to-center distance between holes
d_hole = 26; d_hole = 26;
// distance of hole from side of bin
d_hole_from_side=8;
// magnet hole depth // magnet hole depth
h_hole = 2.4; h_hole = 2.4;
// slit depth (printer layer height) // slit depth (printer layer height)

View file

@ -112,8 +112,8 @@ module block_base(gx, gy, l, dbnx, dbny, style_hole, off) {
pattern_linear(2, 2, (gx-1)*length+d_hole, (gy-1)*length+d_hole) pattern_linear(2, 2, (gx-1)*length+d_hole, (gy-1)*length+d_hole)
block_base_hole(style_hole / p_corn, off); block_base_hole(style_hole / p_corn, off);
else else
pattern_circular(abs(d_hole)<0.001?1:4) pattern_circular(abs(l-d_hole_from_side/2)<0.001?1:4)
translate([d_hole/2, d_hole/2, 0]) translate([l/2-d_hole_from_side, l/2-d_hole_from_side, 0])
block_base_hole(style_hole, off); block_base_hole(style_hole, off);
} }
} }