chiark / gitweb /
fairphone-case: wip ButtonPlan
[reprap-play.git] / fairphone-case.scad
index 6b76344472d4eddd024b0d5ab4ce01440e9a09ef..401f9fcdca599543f387a745b833a3bb0c9245e4 100644 (file)
@@ -75,13 +75,16 @@ lpp11 = [ lpp10[0],            epp5[1] + lid_gap_z ];
 lpp12 = [ epp4[0] + lid_lip,   lpp11[1] ];
 lpp13 = [ lpp12[0],            lpp12[1] + lid_lip ];
 
-bppM = epp4 + [0,1] * lid_gap_z;
+bppM = epp4 + [0,5];
 bppN = [ 0.5 * (epp0[0] + epp4[0]), bppM[1] ];
 bppR = [ bppN[0] + lid_buttoncover_gap, -button_cutout_depth ];
 bppS = [ epp1[0], bppR[1] ];
 bppQ = [ bppM[0], bppR[1] - lid_buttoncover_overlap ];
 bppP = bppQ + [0,1] * lid_buttoncover_gap;
 bppO = [ bppN[0], bppP[1] ];
+bppL = lpp10 + [5,0];
+bppK = [ bppL[0], bppN[1] ];
+bppJ = [ bppN[0], bppL[1] ];
 
 module rectfromto(a,b) {
   ab = b - a;
@@ -124,6 +127,16 @@ module LidEdgeProfile(){
   }
 }
 
+module ButtonCoverProfile(){
+  intersection(){
+    polygon([ bppM, bppP, bppO, bppJ, bppL, bppK ]);
+    hull(){
+      EdgeProfile();
+      LidEdgeProfile();
+    }
+  }
+}
+
 module ButtonPlan(){
 }
 
@@ -306,10 +319,17 @@ module DemoProfiles(){ ////toplevel
   %EdgeProfile();
   KeeperProfile();
 
-  color("blue") rectfromto(bppM, bppO);
-  color("red") {
-    rectfromto(bppQ, [ bppS[0], bppQ[1] - 0.1]);
-    rectfromto(bppR, [ bppS[0], bppQ[1] - 0.1]);
+  translate([20,0]) {
+    LidEdgeProfile();
+    %EdgeProfile();
+
+    demopoint_QR = [ bppS[0], bppQ[1] - 0.1];
+  
+    color("blue") ButtonCoverProfile();
+    color("red") {
+      rectfromto(bppQ, demopoint_QR);
+      rectfromto(bppR, demopoint_QR);
+    }
   }
 }