chiark / gitweb /
fairphone-case: keeper
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Jan 2018 23:24:05 +0000 (23:24 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Jan 2018 23:24:05 +0000 (23:24 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index cba5631..5763530 100644 (file)
@@ -16,8 +16,8 @@ case_th_lip = 1.2;
 
 keeper_th_z = 0.75;
 keeper_th_x = 0.75;
-keeper_width = 2.5;
-keeper_height = 2.5;
+keeper_inner_width = 1.75;
+keeper_inner_height = 1.75;
 
 keeper_gap_z_top = 0.25;
 keeper_gap_z_bot = 0.25;
@@ -42,6 +42,13 @@ epp3 = epp2 + [10, 0];
 epp5 = epp0 + [0,1] * (keeper_th_z + keeper_gap_z_top + case_lip);
 epp4 = epp5 + [-1,0] * case_th_side;
 
+kppe = [0,0];
+kppd = kppe + [1,0] * keeper_inner_width;
+kppc = kppd + [0,1] * keeper_th_z;
+kppb = [ kppe[0] - keeper_th_x, kppc[1] ];
+kppf = kppe - [0,1] * keeper_inner_height;
+kppa = [ kppb[0], kppf[1] ];
+
 module rectfromto(a,b) {
   ab = b - a;
   translate([min(a[0], b[0]), min(a[1], b[1])])
@@ -49,6 +56,10 @@ module rectfromto(a,b) {
 }
 module circleat(c,r) { translate(c) circle(r); }
 
+module KeeperProfile(){
+  polygon([kppe, kppd, kppc, kppb, kppa, kppf]);
+}
+
 module EdgeProfile(){
   difference(){
     hull(){
@@ -57,10 +68,15 @@ module EdgeProfile(){
       circleat(epp1, r=case_th_side);
       rectfromto(epp0, epp4);
     }
-    %polygon([ epp5 + [0,10],
-              epp1,
-              epp2,
-              epp3 + [10,0] ]);
+    polygon([ epp5 + [0,10],
+             epp1,
+             epp2,
+             epp3 + [10,0] ]);
+    minkowski(){
+      KeeperProfile();
+      rectfromto([ -keeper_gap_x,    -keeper_gap_z_bot ],
+                [            10,    +keeper_gap_z_top ]);
+    }
   }
 }
 
@@ -112,4 +128,5 @@ module CaseBase(){
 }
 
 EdgeProfile();
+//KeeperProfile();
 //CaseBase();