From 56ff5222dcfd26d692d94a48436858fb7fb9c9dc Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 9 May 2025 17:38:19 +0100 Subject: [PATCH] toolbox-inserts: RatchetHandle: crooked well Signed-off-by: Ian Jackson --- toolbox-inserts.scad | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/toolbox-inserts.scad b/toolbox-inserts.scad index f2b9aa4..1dbd119 100644 --- a/toolbox-inserts.scad +++ b/toolbox-inserts.scad @@ -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 -- 2.30.2