chiark / gitweb /
fairphone-case: wip new slide lock thing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Jan 2018 23:12:06 +0000 (23:12 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Jan 2018 23:12:06 +0000 (23:12 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index f05abd5..cba5631 100644 (file)
@@ -14,7 +14,16 @@ case_th_lid = 2;
 case_th_side = 2;
 case_th_lip = 1.2;
 
-case_lip = 2;
+keeper_th_z = 0.75;
+keeper_th_x = 0.75;
+keeper_width = 2.5;
+keeper_height = 2.5;
+
+keeper_gap_z_top = 0.25;
+keeper_gap_z_bot = 0.25;
+keeper_gap_x     = 0.25;
+
+case_lip = 1.25;
 
 $fa = 5;
 $fs = 0.1;
@@ -30,11 +39,14 @@ epp0 = [0,0];
 epp1 = [0, -phone_edge_thick];
 epp2 = epp1 + phone_backside_slope_thick * [ phone_backside_slope, -1 ];
 epp3 = epp2 + [10, 0];
-epp4 = epp0 - [1,0] * (case_th_side - case_th_lip);
-epp5 = epp0 + [1,0] * case_lip;
-epp6 = epp5 + [0,1] * case_th_lip;
+epp5 = epp0 + [0,1] * (keeper_th_z + keeper_gap_z_top + case_lip);
+epp4 = epp5 + [-1,0] * case_th_side;
 
-module rectfromto(a,b) { translate(a) square(b - a); }
+module rectfromto(a,b) {
+  ab = b - a;
+  translate([min(a[0], b[0]), min(a[1], b[1])])
+    square([abs(ab[0]), abs(ab[1])]);
+}
 module circleat(c,r) { translate(c) circle(r); }
 
 module EdgeProfile(){
@@ -43,16 +55,12 @@ module EdgeProfile(){
       circleat(epp3, r=case_th_bottom);
       circleat(epp2, r=case_th_bottom);
       circleat(epp1, r=case_th_side);
-      circleat(epp4, r=case_th_lip);
-      rectfromto(epp0, epp6);
+      rectfromto(epp0, epp4);
     }
-    polygon([ epp6 + [10,10],
-             epp6 + [0,10],
-             epp5,
-             epp0,
-             epp1,
-             epp2,
-             epp3 + [10,0] ]);
+    %polygon([ epp5 + [0,10],
+              epp1,
+              epp2,
+              epp3 + [10,0] ]);
   }
 }
 
@@ -103,5 +111,5 @@ module CaseBase(){
   }
 }
 
-//EdgeProfile();
-CaseBase();
+EdgeProfile();
+//CaseBase();