chiark / gitweb /
toolbox-inserts: RatchetHandle: crooked well
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 16:38:19 +0000 (17:38 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 May 2025 16:38:19 +0000 (17:38 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
toolbox-inserts.scad

index f2b9aa4b0669c527cf364fe06091d812c30c77fc..1dbd119970a6cafcd992f89a76496f0e27019ba9 100644 (file)
@@ -73,7 +73,10 @@ well_stiffening_height = max(
   fixing_depth + fixing_surround_ceil
 );
 
-ratchet_handle_nom_depth = ratchet_handle_head_d0;
+ratchet_handle_nom_depth = max(
+                              ratchet_handle_head_d0,
+                              ratchet_handle_grip_end_h
+                              );
 
 //==================== models - general ====================
 
@@ -422,7 +425,23 @@ module RatchetHandlePositive() { ////toplevel
 }
 
 module RatchetHandleWell() { ////toplevel
-  RatchetHandlePositive();
+  // cope with the ratchet handle not being the same height at each end
+
+  pivot = [
+          ratchet_handle_head_end_x + ratchet_handle_head_d0/2,
+          0,
+          ratchet_handle_head_d0/2
+          ];
+
+  pivot_ratio =
+    (ratchet_handle_grip_end_h - ratchet_handle_head_d0)/2 /
+    (ratchet_handle_grip_end_x - ratchet_handle_head_end_x);
+  pivot_ang = atan(pivot_ratio);
+
+  translate(pivot)
+    rotate([0, pivot_ang, 0])
+    translate(-pivot)
+    RatchetHandlePositive();
 }
 
 module RatchetHandleHolder() { ////toplevel