chiark / gitweb /
toolbox-inserts: move AtPlateFixings to the right place
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 16:03:02 +0000 (17:03 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 16:03:02 +0000 (17:03 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index 4d6ea5bafec728f1cd634141baa85f1427c43d23..ac29e5dd58f1e10c943b498b1145fd0ce83096c6 100644 (file)
@@ -261,6 +261,23 @@ module AtRails() {
 
 //---------- plates and the fixing holes ----------
 
+module AtPlateFixings() {
+  n_x = floor((box_x / fixing_pitch - 1.0) / 2);
+  n_y = floor((box_y / fixing_pitch - 1.0) / 2);
+
+  for (xi=[
+        for (xi= [-n_x : n_x + 1])
+        xi - 0.5
+  ])
+    for (yi=[-n_y : n_y])
+      if (!( yi >= -3 && yi < 2 ))
+      if (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > -1.25)
+
+      translate(fixing_pitch * [xi, yi, 0]) {
+       children();
+      }
+}
+
 module FullPlate(right) { ////toplevel
   render() union() {
     difference(){
@@ -333,23 +350,6 @@ module DriverHandleHolder() { ////toplevel
     DriverHandlePositive();
 }
 
-module AtPlateFixings() {
-  n_x = floor((box_x / fixing_pitch - 1.0) / 2);
-  n_y = floor((box_y / fixing_pitch - 1.0) / 2);
-
-  for (xi=[
-        for (xi= [-n_x : n_x + 1])
-        xi - 0.5
-  ])
-    for (yi=[-n_y : n_y])
-      if (!( yi >= -3 && yi < 2 ))
-      if (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > -1.25)
-
-      translate(fixing_pitch * [xi, yi, 0]) {
-       children();
-      }
-}
-
 //---------- RatchetHandle ----------
 
 module RatchetHandlePositive() { ////toplevel