chiark / gitweb /
fairphone-case: wip prop profile, fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Jan 2018 01:25:39 +0000 (01:25 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Jan 2018 01:25:39 +0000 (01:25 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index c37eb01..c321dbe 100644 (file)
@@ -640,7 +640,8 @@ module PropProfile(gamma, cut=0){ ////toplevel
 
   echo("abc", a,b,c);
 
-  prpv1 = [ sin(psi), cos(psi) ];
+  v1 = [ [ cos(psi), -sin(psi) ],    // x
+        [ sin(psi),  cos(psi) ] ];  // y
 
   prpp7 = [0, c + (lpp13[1] - prpp10[1]) ];
 
@@ -650,8 +651,9 @@ module PropProfile(gamma, cut=0){ ////toplevel
   prpp1 = prpp7 + [1,0] *
     // this is approximate, but will do
     (prop_main_th/2 + prop_prop_gap + prcp1[0] - epp4[0]);
-  prpp3 = prpp1 + [ -prp_r1,
-                   (prcp2[1] - prcp1[1]) - prop_prop_gap ];
+  prpp3 = prpp1 +
+    v1[0] * -prp_r1 +
+    v1[1] * ((prcp2[1] - prcp1[1]) - prop_prop_gap);
   prpp12 = prpp3 + [1,0] *
     (prop_end_dia + prop_caserecess_taper * (prpp1[1] - prpp3[1]));
   prp_r8 = prop_main_th;