chiark / gitweb /
toolbox-inserts: break out fixing_positions_2row
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 16:10:26 +0000 (17:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 16:10:26 +0000 (17:10 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index df375b07fdde48b1b7652abfeb07845deb5ec4a9..de8408b32622668590746d74be4d55a4d0acabe5 100644 (file)
@@ -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();
 }