chiark / gitweb /
fairphone-case: introduce "bumpers" (nfc)
[reprap-play.git] / fairphone-case.scad
index a81bb6127a4c9ee92bf9fc8b3a8fd6bedbf6ae8d..aeac8ce51aa0c49f50450f90f48302ca13618ec5 100644 (file)
@@ -1,7 +1,8 @@
 // -*- C -*-
 
-phone_height = 146.5;
-phone_width = 76.75;
+phone = [ 145.0, 75.0 ];
+
+bumpers = [ 1.5, 1.75 ]; // both sides together
 
 phone_cnr_rad = 6.0;
 
@@ -51,6 +52,9 @@ strut_min_at_end = 1.5;
 
 // ---------- calculated ----------
 
+phone_height = (phone + bumpers)[0];
+phone_width =  (phone + bumpers)[1];
+
 // ----- could be changed -----
 lid_buttoncover_gap = lid_gap_x;
 lid_buttoncover_overlap = case_th_lip + keeper_gap_z_top;
@@ -352,7 +356,7 @@ module Lid(){ ////toplevel
          rotate([90,0,90])
            translate([0,0,-10])
            linear_extrude(height= 20)
-           ButtonPlan($button_l, 0,0);
+           ButtonPlan($button_l, 1,0);
          rotate([90,0,0])
             translate([0,0,-100])
            linear_extrude(height= 200)
@@ -372,49 +376,55 @@ module TestLength(){ ////toplevel
   }
 }
 
+module TestSelectWidth(){
+  translate([-30, -(phone_height - 25), -20])
+    mirror([0, 1, 0])
+    cube([200, 50, 40]);
+}
+
 module TestWidth(){ ////toplevel
   intersection(){
     Case();
-    translate([-30, -(phone_height - 25), -20])
-      mirror([0, 1, 0])
-      cube([200, 50, 40]);
+    TestSelectWidth();
   }
 }
 
 module TestLidWidthPrint(){ ////toplevel
-  rotate([0,180.0])
-    intersection(){
-      Lid();
-      translate([-30, -(phone_height - 25), -20])
-       mirror([0, 1, 0])
-       cube([200, 50, 40]);
-    }
+  rotate([0,180.0]) TestLidWidth();
+}
+
+module TestSelectCamera(){
+  CaseBase_rhsflip(1)
+    translate([0,0,-25])
+    linear_extrude(height = 50)
+    mirror([0, 1, 0])
+    rectfromto([-20, -20],
+              camera_pos_br + [ 5, 5 ]);
 }
 
 module TestCamera(){ ////toplevel
   intersection(){
     Case();
-    CaseBase_rhsflip(1)
-      translate([0,0,-25])
-      linear_extrude(height = 50)
-      mirror([0, 1, 0])
-      rectfromto([-20, -20],
-                camera_pos_br + [ 5, 5 ]);
+    TestSelectCamera();
   }
 }
 
-module TestLidByCameraPrint(){ ////toplevel
-  rotate([180,0,0]) intersection(){
+module TestLidByCamera(){ ////toplevel
+  intersection(){
     Lid();
-    CaseBase_rhsflip(1)
-      translate([0,0,-25])
-      linear_extrude(height = 50)
-      mirror([0, 1, 0])
-      rectfromto([-20, -20],
-                camera_pos_br + [ 5, 5 ]);
+    TestSelectCamera();
   }
 }
 
+module TestLidByCameraPrint(){ ////toplevel
+  rotate([180,0,0]) TestLidByCamera();
+}
+
+module DemoByCamera(){ ////toplevel
+  color("blue") TestLidByCamera();
+  color("red")  TestCamera();
+}
+
 module OneKeeper(){ ////toplevel
   translate([0, -phone_cnr_rad, 0])
     rotate([90, 0, 0])