chiark / gitweb /
fairphone-case: wip ButtonPlan
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 20 Jan 2018 20:08:38 +0000 (20:08 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 20 Jan 2018 20:08:38 +0000 (20:08 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index 6b76344472d4eddd024b0d5ab4ce01440e9a09ef..81d2dfd41df9854134830e7c62e9bc339759cf43 100644 (file)
@@ -82,6 +82,9 @@ 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 + [1,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);
+    }
   }
 }