3 phone_height = 146.5 - .80;
8 phone_edge_thick = 9.0;
9 phone_total_thick = 12.0;
10 phone_backside_slope_inner = 1.5; // larger means shallower
11 phone_backside_slope_outer = 1.0; // larger means shallower
13 camera_pos_tl = [ 7.0, 13.0 ]; // measured from tl corner
14 camera_pos_br = [ 24.0, 39.5 ]; // tl/br as seen from back
23 keeper_inner_width = 1.75;
24 keeper_inner_height = 1.75;
26 keeper_gap_z_top = 0.25;
27 keeper_gap_z_bot = 0.75;
29 keeper_gap_x_holes = 0.75;
42 phone_backside_slope_thick = phone_total_thick - phone_edge_thick;
44 //lid_lip_overlap_width xxx bad name = ;
45 //lid_lip_inner_slope = [ 5, 5 ]; // xxx
48 epp1 = [0, -phone_edge_thick];
49 epp2i = epp1 + phone_backside_slope_thick * [ phone_backside_slope_inner, -1 ];
50 epp2o = epp1 + phone_backside_slope_thick * [ phone_backside_slope_outer, -1 ];
51 epp3 = epp2i + [10, 0];
52 epp5 = epp0 + [0,1] * (keeper_th_z + keeper_gap_z_top + case_lip);
53 epp4 = epp5 + [-1,0] * case_th_side;
56 kppd = kppe + [1,0] * keeper_inner_width;
57 kppc = kppd + [0,1] * keeper_th_z;
58 kppb = [ kppe[0] - keeper_th_x, kppc[1] ];
59 kppf = kppe - [0,1] * keeper_inner_height;
60 kppa = [ kppb[0], kppf[1] ];
62 lpp10 = [ epp5[0] + lid_gap_x, kppc[1] + lid_gap_z ];
63 lpp11 = [ lpp10[0], epp5[1] + lid_gap_z ];
64 lpp12 = [ epp4[0] + lid_lip, lpp11[1] ];
65 lpp13 = [ lpp12[0], lpp12[1] + lid_lip ];
67 module rectfromto(a,b) {
69 translate([min(a[0], b[0]), min(a[1], b[1])])
70 square([abs(ab[0]), abs(ab[1])]);
72 module circleat(c,r) { translate(c) circle(r); }
74 module KeeperProfile(){
75 polygon([kppe, kppd, kppc, kppb, kppa, kppf]);
81 translate(epp3) square(case_th_bottom*2, center=true);
82 circleat(epp2o, r=case_th_bottom);
83 circleat(epp1, r=case_th_side);
84 rectfromto(epp0, epp4);
86 polygon([ epp5 + [0,10],
93 module LidEdgeProfile(){
102 circleat(lpp12, r=lid_lip);
103 rectfromto( lpp12 + [-10, 0],
104 lpp12 + [+10, +10] );
108 module CaseBase_rhsflip(yn=[0,1]) {
110 translate([phone_width/2, 0, 0])
112 translate([-phone_width/2, 0, 0])
117 module CaseBase_botflip() {
119 translate([0, -phone_height/2, 0])
121 translate([0, phone_height/2, 0])
126 module AroundEdges(fill_zstart, fill_th, fill_downwards=0){
129 translate([0, -phone_cnr_rad, 0])
131 linear_extrude(height = phone_height - phone_cnr_rad*2)
135 CaseBase_rhsflip() CaseBase_botflip() {
136 translate([+1,-1] * phone_cnr_rad)
141 translate([-1,0] * phone_cnr_rad)
143 rectfromto([0,-20],[10,20]);
145 translate([-10, 0, -20] + 0.01 * [+1,-1, 0] )
151 translate([ phone_width - phone_cnr_rad, 0,0 ])
153 linear_extrude(height = phone_width - phone_cnr_rad*2)
157 translate([0,0, fill_zstart])
158 mirror([0,0, fill_downwards])
159 linear_extrude(height = fill_th)
160 rectfromto([+1,-1] * phone_cnr_rad,
161 [phone_width, -phone_height] + [-1,+1] * phone_cnr_rad);
165 AroundEdges(epp3[1], case_th_bottom, 1)
169 module Case(){ ////toplevel
174 // ledge (fixed keeper)
177 linear_extrude(height = phone_height + phone_cnr_rad * 2)
180 // outline of the whole case, to stop it protruding
181 translate([0,0, -25])
182 linear_extrude(height = 50)
184 // CaseBase_rhsflip() // actually, we only care about the LH
186 circleat([+1,-1] * phone_cnr_rad, phone_cnr_rad + case_th_side/2);
192 translate([0, -phone_cnr_rad, 0])
194 linear_extrude(height = phone_height + phone_cnr_rad * 2)
197 rectfromto([ -keeper_gap_x, -keeper_gap_z_bot ],
198 [ keeper_gap_x_holes, +keeper_gap_z_top ]);
202 CaseBase_rhsflip([1])
204 linear_extrude(height = 20)
206 rectfromto(camera_pos_tl, camera_pos_br);
210 module Lid(){ ////toplevel
211 AroundEdges(lpp10[1], lpp13[1] - lpp10[1], 0)
215 module TestLength(){ ////toplevel
218 translate([-30, -200, -20])
219 cube([30 + 15, 250, 40]);
223 module TestWidth(){ ////toplevel
226 translate([-30, -(phone_height - 25), -20])
232 module TestCamera(){ ////toplevel
237 linear_extrude(height = 50)
239 rectfromto([-20, -20],
240 camera_pos_br + [ 5, 5 ]);
244 module OneKeeper(){ ////toplevel
245 translate([0, -phone_cnr_rad, 0])
247 linear_extrude(height = phone_height - phone_cnr_rad * 2)
251 module OneKeeperPrint(){ ////toplevel
256 module Keeper(){ ////toplevel
261 module DemoProfiles(){ ////toplevel