chiark / gitweb /
toolbox-inserts: reorganise file for easier navigation
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Apr 2025 18:54:18 +0000 (19:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Apr 2025 18:54:58 +0000 (19:54 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index 51ebceeeedd237e59f93df70e3b71d3cdc4c872f..800026341041ed88cf350e26593564424f8b6024 100644 (file)
@@ -54,6 +54,10 @@ well_stiffening_height = max(
   fixing_depth + fixing_surround_ceil
 );
 
+//==================== models - general ====================
+
+//---------- fixings (general) ----------
+
 // AtFixingPositions([ screw, screw, ...]) ScrewItem();
 //
 // Each screw is [x,y] or [x,y, depth]
@@ -73,6 +77,8 @@ module FixingSurround() {
     circle(r= fixing_receptacle_d/2);
 }
 
+//---------- wells (relating to the -ve space in holders) ----------
+
 module WellSurroundGapElevation(z_bottom, z_edge, z_wayhigh, gap) {
   rectfromto([ gap[0], z_bottom ],
             [ gap[1], z_wayhigh ]);
@@ -151,25 +157,9 @@ module WellSurround(
   }
 }
 
-module DriverHandlePositive() { ////toplevel
-  linextr_x_yz(0, driver_handle_total_l)
-    circle(r = driver_handle_shaft_d/2);
-  linextr_x_yz(driver_handle_shaft_l, driver_handle_total_l)
-    circle(r = driver_handle_handle_d/2);
-  linextr_x_yz(driver_handle_shaft_l + driver_handle_handle_front_l, driver_handle_total_l)
-    circle(r = driver_handle_handle_rear_d/2);
-}
-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, 2,3,4,5,6,7,8,9, 11])
-    for (y = [-0.5, +0.5])
-    [ [ x, y ] ]
-  ], offset=[-5, 0])
-    DriverHandlePositive();
-}
+//==================== models - box and plates ====================
+
+//---------- box ----------
 
 module BoxCavityModelMainPlan() {
   hull(){
@@ -208,20 +198,8 @@ module BoxBottomModel() { ////toplevel
   }
 }
 
-module AtFixings() {
-  n_x = floor((box_x / fixing_pitch - 1.0) / 2);
-  n_y = floor((box_y / fixing_pitch - 1.0) / 2);
+//---------- plates and the fixing holes ----------
 
-  for (xi=[
-        for (xi= [-n_x : n_x + 1])
-        xi - 0.5
-  ])
-    for (yi=[-n_y : n_y])
-      if (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > 0.25)
-      translate(fixing_pitch * [xi, yi, 0]) {
-       children();
-      }
-}
 
 module FullPlate(right) { ////toplevel
   render() difference(){
@@ -263,6 +241,48 @@ module LeftPlatePrint() { ////toplevel
 module RightPlatePrint() { ////toplevel
   rotate([180,0,0]) RightPlate();
 }
+
+//==================== models - specific tools/objects ====================
+
+//---------- DriverHandle - ratchet screwdriver handle (?) ----------
+
+module DriverHandlePositive() { ////toplevel
+  linextr_x_yz(0, driver_handle_total_l)
+    circle(r = driver_handle_shaft_d/2);
+  linextr_x_yz(driver_handle_shaft_l, driver_handle_total_l)
+    circle(r = driver_handle_handle_d/2);
+  linextr_x_yz(driver_handle_shaft_l + driver_handle_handle_front_l, driver_handle_total_l)
+    circle(r = driver_handle_handle_rear_d/2);
+}
+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, 2,3,4,5,6,7,8,9, 11])
+    for (y = [-0.5, +0.5])
+    [ [ x, y ] ]
+  ], offset=[-5, 0])
+    DriverHandlePositive();
+}
+
+module AtFixings() {
+  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 (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > 0.25)
+      translate(fixing_pitch * [xi, yi, 0]) {
+       children();
+      }
+}
+
+//==================== tests and demos ====================
+
 module TestPlatesPrint() { ////toplevel
   rotate([180,0,0]) intersection() {
     union(){