chiark / gitweb /
digispark-with-cable: midbot_registration wrong
[reprap-play.git] / fairphone4-case.scad
index 48cf28e8978fe6a9e0d2e0c6a6e3e7488de7fe34..0a4b63d6efee47c6ca669319ba61c10e8d96a7dc 100644 (file)
@@ -14,7 +14,7 @@
 //  3. use "make" to generate the necessary files:
 //
 //     make -j8 fairphone-case.auto.scads `for f in   \
-//        HingePrint        \
+//        HingeLeverPrint   \
 //        LidPrint          \
 //        OneKeeperPrint    \
 //        Case              \
 //  4. Print them.  Case and OneKeeperPrint should probably be
 //     the same colour.
 //
-//  5. Assemble the hinge.
+//  5. Assemble the hinge.  After placing the parts in the appropirate
+//     relative placement:
 //
-//        Cut short bits of wire
-//        Push in with long bit of wire
-//        Use gas flame to melt end of 2.85mm PLA
-//        Dab
+//        Use long bit of wire to ensure holes are lined up and proper
+//        Cut four short bits of wire, using above as a guage
+//
+//        Push two short bits into two holes on same side
+//        Use long bit of wire to ensure properly in holes
+//        Keep that side up so they don't fall out!
+//
+//        For each of the two holes
+//          Use 20-30cm hunk of 2.85mm PLA
+//          Use gas flame to melt end until it catches fire (!)
+//          Remove from flame, wave to extinguish, and quickly:
+//          Dab end onto where hole is
+//          As it congeals, use sidecutters to cut off by hole
+//
+//        Repeat for two holes on other side
+//        When cool, file down rough edges
 //
 //  6. In use:
 // 
@@ -140,7 +153,7 @@ microusb_width = 12.16 + 2.0 + 1.25;
 
 case_th_bottom = 2.5;
 case_th_lid = 3.0;
-case_th_side = 2.3;
+case_th_side = 2.6;
 case_th_lip = 1.2;
 
 lid_screen_gap_extra = .66;
@@ -162,6 +175,7 @@ keeper_gap_x     = 0.25;
 keeper_gap_x_holes = 0.75;
 keeper_fatter = 0.45;
 keeper_fatter_hole = 1.20;
+keeper_stubbier = 0.0;
 
 keeper_side = 0; // 0 = lhs; 1 = rhs
 
@@ -172,7 +186,7 @@ lid_gap_z = 0.25;
 lid_lip = 1.75;
 lid_edgepart_width = 5.0;
 lid_buttoncover_thick = 1.3;
-lid_buttoncover_reinf = 0.65;
+lid_buttoncover_reinf = 0.95;
 
 foldover_gap = 0.50;
 foldover_lever_gap = 0.50;
@@ -237,6 +251,7 @@ lid_fold_clearance_antislop = 0.5;
 
 $button_leg_only = false;
 $suppress_forward_holes = false;
+$suppress_hinge = false;
 
 // ---------- calculated ----------
 
@@ -457,14 +472,14 @@ module AdhocMultiprintFrame(phase, z0, zs) {
     }
 }
 
-module KeeperProfile(fatter, slant=0){
+module KeeperProfile(fatter=0, slant=0, stubbier=0){
   use_e = kppe + [0,-1] * slant * keeper_inner_width / keeper_slant_slope;
   polygon([use_e + [+1,-1] * fatter,
-          kppd  + [ 0,-1] * fatter,
-          kppc,
+          kppd  + [ 0,-1] * fatter - stubbier * [1,0],
+          kppc                     - stubbier * [1,0],
           kppb,
-          kppa,
-          kppf  + [+1, 0] * fatter
+          kppa                     + stubbier * [0,1],
+          kppf  + [+1, 0] * fatter + stubbier * [0,1]
           ]);
 }
 
@@ -789,7 +804,8 @@ module Buttons(){
   Flip_rhs(1) SideButton(64.220, +1, 14.500  ) children(); // power
   Flip_rhs(1) LidButtonishLeg(14, -1) children();
   Flip_rhs(0) LidButtonishLeg(21, -1) children();
-  Flip_rhs(0) LidButtonishLeg(21, +1) children();
+  Flip_rhs(0) LidButtonishLeg(38, +1) children();
+  Flip_rhs(0) LidButtonishLeg(14, +1) children();
 }
 
 module Struts(x_start, z_min, th){
@@ -1093,7 +1109,8 @@ module Case(){ ////toplevel
       }
 
       // hinge
-      HingePortion(hex20, hex21) HingeBaseProfile();
+      if (!$suppress_hinge)
+       HingePortion(hex20, hex21) HingeBaseProfile();
 
       // buildout for prop recess
       if (prop_caserecess_buildout_r > 0) Flip_rhs(1)
@@ -1165,15 +1182,17 @@ module Case(){ ////toplevel
     MicroUSBEtc();
 
     // gaps for the lid's hinge arms
-    HingePortion(hex20 - hinge_x_arms_gap,
-                hex21 + hinge_x_arms_gap)
-      minkowski(){
+    if (!$suppress_hinge) {
+      HingePortion(hex20 - hinge_x_arms_gap,
+                  hex21 + hinge_x_arms_gap)
+       minkowski(){
         HingeLidProfile();
        circle(r= hinge_r_arms_gap, $fn= 8);
       }
 
-    // screw holes in the hinge arms
-    HingeScrews();
+      // screw holes in the hinge arms
+      HingeScrews();
+    }
 
     // thumb recess
     ThumbRecessApply(epp4[1])
@@ -1451,7 +1470,7 @@ module OneKeeper(){ ////toplevel
   translate([0, -phone_cnr_rad, 0])
     rotate([90, 0, 0])
     linear_extrude(height = phone_height - phone_cnr_rad * 2)
-    KeeperProfile(fatter=keeper_fatter);
+    KeeperProfile(fatter=keeper_fatter, stubbier=keeper_stubbier);
 }
 
 module OneKeeperPrint(){ ////toplevel