chiark / gitweb /
wardrobe-hook: straight-on version: wip; rename
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 Feb 2014 18:41:51 +0000 (18:41 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 Feb 2014 18:41:51 +0000 (18:41 +0000)
wardrobe-hook.scad

index 331121c..3588142 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();