chiark / gitweb /
toolbox-inserts: RatchetHandle: less spurious wall
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 17:40:58 +0000 (18:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 17:40:58 +0000 (18:40 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index 730ba31a75f5b2a2706c166ae211c123cefa13bc..b93bd31f84a3b42d138c4cf8e60a19411877ea59 100644 (file)
@@ -133,6 +133,9 @@ module WellSurroundGapElevation(z_bottom_def, z_edge, z_wayhigh, gap) {
 //
 // SomethingPositive is the representation of the object to be retained
 // Retaining walls will be made up to its z=0.
+//
+// It can use $well_surround_cutout_only for parts that ought only to
+// be cut out and shouldn't generate walls.
 module WellSurround(
   // Amount by which the object protrudes above z==0
   half_height,
@@ -156,6 +159,7 @@ module WellSurround(
        translate(concat(offset, [0])) linextr(-10, dz){
          offset($fn=8, r = wall)
            projection(cut=false)
+           let($well_surround_cutout_only = false)
            children(0);
        }
 
@@ -172,6 +176,7 @@ module WellSurround(
       }
 
       translate(concat(offset, [0])) translate([0, 0, dz]) {
+       let($well_surround_cutout_only = true)
        children(0);
       }
 
@@ -424,7 +429,8 @@ module RatchetHandlePositive() { ////toplevel
   }
 
   // business end: 1/4" square driver protruding from head
-  translate([ -74.2, 0, 0])
+  if ($well_surround_cutout_only)
+    translate([ -74.2, 0, 0])
     linextr_y_xz(-(head_y/2 + 9.0), 0)
     circle(r = 8.3 /2);
 }