From: Ian Jackson Date: Fri, 9 May 2025 16:10:26 +0000 (+0100) Subject: toolbox-inserts: break out fixing_positions_2row X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a7bc7a093a74094c2536223d9809db33d1129faa;p=reprap-play.git toolbox-inserts: break out fixing_positions_2row Signed-off-by: Ian Jackson --- diff --git a/toolbox-inserts.scad b/toolbox-inserts.scad index df375b0..de8408b 100644 --- a/toolbox-inserts.scad +++ b/toolbox-inserts.scad @@ -94,6 +94,12 @@ module FixingSurround() { circle(r= fixing_receptacle_d/2); } +function fixing_positions_2row(xmin, xmax) = [ + for (x = [xmin: xmax]) + for (y = [-0.5, +0.5]) + [ [ x, y ] ] +]; + //---------- wells (relating to the -ve space in holders) ---------- module WellSurroundGapElevation(z_bottom, z_edge, z_wayhigh, gap) { @@ -346,11 +352,7 @@ module DriverHandleHolder() { ////toplevel WellSurround(driver_handle_handle_d/2, [ [ 15, driver_handle_shaft_l - 15 ], [ driver_handle_shaft_l + 15, driver_handle_shaft_l + 45 ], - ], [ - for (x = [0: 11]) - for (y = [-0.5, +0.5]) - [ [ x, y ] ] - ], offset=[-5, 0]) + ], fixing_positions_2row(0, 11), offset=[-5, 0]) DriverHandlePositive(); }