chiark / gitweb /
fairphone-case: fix CaseAperture (nfc)
[reprap-play.git] / fairphone-case.scad
index 6f59fa3a581628d69f3a8cfe86404749dacff6ba..238abba51865f76367ccbe737b284ce737b53890 100644 (file)
@@ -21,6 +21,8 @@ camera_pos_br = [ 22.300, 37.600 ]; // tl/br as seen from back
 jack_pos = [ 13.92, 7.96 ];
 jack_dia = 9.1 + .5; // some jack I had lying around
 
+noisecancelmic_pos = [ 19.54, 7.37 ];   // from rhs
+
 case_th_bottom = 2.5;
 case_th_lid = 2.5;
 case_th_side = 2;
@@ -264,6 +266,16 @@ module AroundEdges(fill_zstart, fill_th, fill_downwards=0){
               [phone_width, -phone_height] + [-1,+1] * phone_cnr_rad);
 }
 
+module CaseAperture(pos, dia, $fn) {
+  theta = 180/$fn;
+  translate([ pos[0] + bumper[0],
+             -epp2i[0],
+             -pos[1] ])
+    rotate([-90, theta, 0])
+    cylinder(r = dia/2 / cos(theta),
+            h = 60);
+}
+
 module SideButton(y, y_ref_sign, l){
   // y_ref_sign:
   //   +1  measured from top    of actual phone to top    of button
@@ -375,14 +387,8 @@ module Case(){ ////toplevel
         }
     }
 
-    // jack
-    translate([ jack_pos[0] + bumper[0],
-               -epp2i[0],
-               -jack_pos[1] ])
-      rotate([-90, 22.5, 0])
-      cylinder(r = jack_dia/2 / cos(22.5),
-              h = 60,
-              $fn=8);
+    // apertures along top edge
+    CaseAperture(jack_pos, jack_dia, 8);
   }
 }
 
@@ -432,7 +438,10 @@ module TestWidth(){ ////toplevel
 }
 
 module TestLidWidthPrint(){ ////toplevel
-  rotate([0,180.0]) TestLidWidth();
+  rotate([0,180.0]) intersection(){
+    Lid();
+    TestSelectWidth();
+  }
 }
 
 module TestSelectCamera(){