chiark / gitweb /
wardrobe-hook: wip T version
[reprap-play.git] / wardrobe-hook.scad
index 69f95b557fa29de32bcd5eb32985cb78ad7e88fc..17885e27698619efa23c51b0d853bc84f421820f 100644 (file)
@@ -149,19 +149,27 @@ module SHookL(){ ///toplevel
 
 // straight-on version, reversed, everything prefixed with t or T
 
+tjoinrad = 5;
+tjoinoutrad = tjoinrad + mainthick;
+
 thookcy = shookcy;
 tstem0leny = tuberad;
-tbend_raw = tangents_intersect_beta([0,shookcy], hookinrad,
-                                   [0,-tstem0leny], -tuberad);
+
+tjoin0c = [tuberad - tjoinrad, -tstem0leny];
+tjoin1c = [0,                      thookcy];
+
+tbend_raw = tangents_intersect_beta(tjoin0c, tjoinrad,
+                                   tjoin1c, -hookoutrad);
 echo(tbend_raw);
-tbend = angle_map_range(90-tbend_raw, -180);
+tbend0 = angle_map_range(tbend_raw,       0);
+tbend1 = angle_map_range(tbend_raw + 180, -180);
 
 module TPlan(){
   ClipPlan(0, tstem0leny);
-  FArcSegment(0,-tstem0leny, tuberad,mainoutrad,
-             tbend, 10);
+  FArcSegment(tjoin0c[0],tjoin0c[1], tjoinrad,tjoinoutrad,
+             tbend0, 360-tbend0);
   FArcSegment(0,shookcy, hookinrad,hookoutrad,
-             tbend_raw, 270-tbend_raw + hookcurl);
+             tbend1, 270+hookcurl - tbend1);
 }
 
 // other toplevels etc.