chiark / gitweb /
fairphone-case: some prop recesses, but approach is not right
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Jan 2018 20:29:13 +0000 (20:29 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Jan 2018 20:29:13 +0000 (20:29 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index c9e1a5ac7d396b6a65c533d50921b1350445d02b..7fe1083047a79f70aaff1f070c8efe0d346088c4 100644 (file)
@@ -4,7 +4,17 @@ include <utils.scad>
 
 phone = [ 75.0, 145.0 ];
 
-prop_lid_posns = [ 58, 140 ]; // measured from bottom of phone
+prop_lid_posns = [ 70 ]; // measured from bottom of phone
+
+prop_lengths = [ 80, 50 ];
+
+prop_angle_specs = [
+  // angle    prop length index     prop lid posn index
+  [   15,          1,                    0 ],
+  [   30,          1,                    0 ],
+  [   45,          0,                    0 ],
+  [   60,          0,                    0 ],
+  ];
 
 bumper = [ 0.250, -0.025 ];
 // ^ One side.  Overall size is increased by twice this.
@@ -605,6 +615,29 @@ module PropRecess(){
   }
 }
 
+module CasePropRecess(pas) {
+  // destructure entry in prop_angle_specs
+  beta =                 pas[0];
+  b    = prop_lengths  [ pas[1] ];
+  p    = prop_lid_posns[ pas[2]] ;
+
+  k = hp_k;
+  x = k / (2 * sin(beta/2)) - hppT[0];
+  c = p + x;
+
+  // https://en.wikipedia.org/wiki/Solution_of_triangles#Two_sides_and_non-included_angle_given_(SSA) [25.1.18]
+  // we always want the positive solution because it has a closer to c
+  a = c * cos(beta) + sqrt( b*b - pow(c * sin(beta),2) );
+  q = a - x;
+
+  echo(beta, a, b, c);
+
+  Flip_bot(1)
+    translate([ phone_width/2, -q, epp2o[1]-case_th_bottom ])
+    rotate([0,180,0])
+    PropRecess();
+}
+
 module CaseBase(){
   AroundEdges(epp3[1], case_th_bottom, 1)
     EdgeProfile();
@@ -698,6 +731,10 @@ module Case(){ ////toplevel
     // catch striker
     CatchPortion(catch_width + catch_side_gap*2)
       CatchCutProfile();
+
+    // prop recesses
+    #for (pas = prop_angle_specs)
+      CasePropRecess(pas);
   }
 }