chiark / gitweb /
wardrobe-hook: straight-on version: wip; rename
[reprap-play.git] / wardrobe-hook.scad
index 331121cffc1772c73cefc8d38e703252bbb990eb..3588142ac8f50637e9fbc34aaa3826911d860b05 100644 (file)
@@ -114,13 +114,15 @@ module Hook(){ ////toplevel
   }
 }
 
-// frontbackly version, everything prefixed with f or F
+// straight-on version, everything prefixed with s or S
 
-fstemleny = -hookcy;
-fbend = atan((tuberad - hookinrad) / fstemleny);
+sstemleny = -hookcy;
+sbend_raw = tangents_intersect_beta([0,0],tuberad,
+                                   [0,-(stemlen-hookinrad)],hookinrad);
+sbend = angle_map_range(360-sbend_raw, -180);
 
-module FPlan(){
-  ClipPlan(fbend, fstemleny);
+module SPlan(){
+  ClipPlan(sbend, sstemleny);
 }
 
 // toplevels etc.
@@ -129,7 +131,7 @@ module RightHook(){ ////toplevel
   mirror([1,0,0]) Hook();
 }
 
-FPlan();
+SPlan();
 translate([60,0,0]) Plan();
 //ElevationCore();
 //RightHook();