chiark / gitweb /
toolbox-inserts: WellSurround: gap adjustment
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 17:17:23 +0000 (18:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 17:17:23 +0000 (18:17 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index f3ef42e2486c47de4a92689f04fd169ea6ce6bee..b63fe6f75f39131783c4fd107d45174e143bdda9 100644 (file)
@@ -109,9 +109,10 @@ function fixing_positions_2row(xmin, xmax) = [
 
 //---------- wells (relating to the -ve space in holders) ----------
 
-module WellSurroundGapElevation(z_bottom, z_edge, z_wayhigh, gap) {
+module WellSurroundGapElevation(z_bottom_def, z_edge, z_wayhigh, gap) {
   x_min = gap[0];
   x_max = gap[1];
+  z_bottom = is_undef(gap[2]) ? z_bottom_def : z_edge + gap[2];
 
   rectfromto([ x_min, z_bottom ],
             [ x_max, z_wayhigh ]);
@@ -136,6 +137,7 @@ module WellSurround(
   // Amount by which the object protrudes above z==0
   half_height,
   // gaps for picking up object, [ [ x_min, x_max ], ... ]
+  // also allowed: [ [ x_min, x_max, z_depth ] ]
   gaps,
   // screw locations in stride units, [ [ screw, ...], ... ]
   // in hull groups (screw receptacles are hulled within each group)
@@ -450,7 +452,7 @@ module RatchetHandleWell() { ////toplevel
 
 module RatchetHandleHolder() { ////toplevel
   WellSurround(ratchet_handle_nom_depth/2, [
-    [ -30, -10 ],
+    [ -30, -10, -7 ],
     [ 10, 40 ],
   ], fixing_positions_2row(-7, 4), offset=[-5, 0])
     RatchetHandleWell();