chiark / gitweb /
fairphone-case: wip prop profile, fixes
[reprap-play.git] / fairphone-case.scad
index c37eb01d7fb8077a9dce70de39a38a10c9e973d0..c321dbec7f66965c9455d091f470b61251eb5348 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;