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
21 case_struts_count = 6;
22 case_struts_solid_below = 0.75;
23 case_struts_solid_above = 1.00;
24 case_struts_width = 0.10;
28 keeper_inner_width = 1.75;
29 keeper_inner_height = 1.75;
31 keeper_gap_z_top = 0.25;
32 keeper_gap_z_bot = 0.75;
34 keeper_gap_x_holes = 0.75;
47 phone_backside_slope_thick = phone_total_thick - phone_edge_thick;
49 //lid_lip_overlap_width xxx bad name = ;
50 //lid_lip_inner_slope = [ 5, 5 ]; // xxx
53 epp1 = [0, -phone_edge_thick];
54 epp2i = epp1 + phone_backside_slope_thick * [ phone_backside_slope_inner, -1 ];
55 epp2o = epp1 + phone_backside_slope_thick * [ phone_backside_slope_outer, -1 ];
56 epp3 = epp2i + [10, 0];
57 epp5 = epp0 + [0,1] * (keeper_th_z + keeper_gap_z_top + case_lip);
58 epp4 = epp5 + [-1,0] * case_th_side;
61 kppd = kppe + [1,0] * keeper_inner_width;
62 kppc = kppd + [0,1] * keeper_th_z;
63 kppb = [ kppe[0] - keeper_th_x, kppc[1] ];
64 kppf = kppe - [0,1] * keeper_inner_height;
65 kppa = [ kppb[0], kppf[1] ];
67 lpp10 = [ epp5[0] + lid_gap_x, kppc[1] + lid_gap_z ];
68 lpp11 = [ lpp10[0], epp5[1] + lid_gap_z ];
69 lpp12 = [ epp4[0] + lid_lip, lpp11[1] ];
70 lpp13 = [ lpp12[0], lpp12[1] + lid_lip ];
72 module rectfromto(a,b) {
74 translate([min(a[0], b[0]), min(a[1], b[1])])
75 square([abs(ab[0]), abs(ab[1])]);
77 module circleat(c,r) { translate(c) circle(r); }
79 module KeeperProfile(){
80 polygon([kppe, kppd, kppc, kppb, kppa, kppf]);
86 translate(epp3) square(case_th_bottom*2, center=true);
87 circleat(epp2o, r=case_th_bottom);
88 circleat(epp1, r=case_th_side);
89 rectfromto(epp0, epp4);
91 polygon([ epp5 + [0,10],
98 module LidEdgeProfile(){
107 circleat(lpp12, r=lid_lip);
108 rectfromto( lpp12 + [-10, 0],
109 lpp12 + [+10, +10] );
113 module CaseBase_rhsflip(yn=[0,1]) {
115 translate([phone_width/2, 0, 0])
117 translate([-phone_width/2, 0, 0])
122 module CaseBase_botflip() {
124 translate([0, -phone_height/2, 0])
126 translate([0, phone_height/2, 0])
131 module AroundEdges(fill_zstart, fill_th, fill_downwards=0){
134 translate([0, -phone_cnr_rad, 0])
136 linear_extrude(height = phone_height - phone_cnr_rad*2)
140 CaseBase_rhsflip() CaseBase_botflip() {
141 translate([+1,-1] * phone_cnr_rad)
146 translate([-1,0] * phone_cnr_rad)
148 rectfromto([0,-20],[10,20]);
150 translate([-10, 0, -20] + 0.01 * [+1,-1, 0] )
156 translate([ phone_width - phone_cnr_rad, 0,0 ])
158 linear_extrude(height = phone_width - phone_cnr_rad*2)
162 translate([0,0, fill_zstart])
163 mirror([0,0, fill_downwards])
164 linear_extrude(height = fill_th)
165 rectfromto([+1,-1] * phone_cnr_rad,
166 [phone_width, -phone_height] + [-1,+1] * phone_cnr_rad);
170 AroundEdges(epp3[1], case_th_bottom, 1)
174 module Case(){ ////toplevel
179 // ledge (fixed keeper)
182 linear_extrude(height = phone_height + phone_cnr_rad * 2)
185 // outline of the whole case, to stop it protruding
186 translate([0,0, -25])
187 linear_extrude(height = 50)
189 // CaseBase_rhsflip() // actually, we only care about the LH
191 circleat([+1,-1] * phone_cnr_rad, phone_cnr_rad + case_th_side/2);
197 translate([0, -phone_cnr_rad, 0])
199 linear_extrude(height = phone_height + phone_cnr_rad * 2)
202 rectfromto([ -keeper_gap_x, -keeper_gap_z_bot ],
203 [ keeper_gap_x_holes, +keeper_gap_z_top ]);
207 CaseBase_rhsflip([1])
209 linear_extrude(height = 20)
211 rectfromto(camera_pos_tl, camera_pos_br);
213 // struts (invisible, because they're buried in the case)
214 for (i= [1 : 1 : case_struts_count]) {
216 -phone_height * i / (case_struts_count+1),
217 epp2i[1] - case_th_bottom + case_struts_solid_below])
218 linear_extrude(height= case_th_bottom
219 -(case_struts_solid_below+case_struts_solid_above))
220 rectfromto([ epp2i[0], -0.5 * case_struts_width ],
221 [ phone_width - epp2i[0], +0.5 * case_struts_width ]);
226 module Lid(){ ////toplevel
227 AroundEdges(lpp10[1], lpp13[1] - lpp10[1], 0)
231 module TestLength(){ ////toplevel
234 translate([-30, -200, -20])
235 cube([30 + 15, 250, 40]);
239 module TestWidth(){ ////toplevel
242 translate([-30, -(phone_height - 25), -20])
248 module TestCamera(){ ////toplevel
253 linear_extrude(height = 50)
255 rectfromto([-20, -20],
256 camera_pos_br + [ 5, 5 ]);
260 module OneKeeper(){ ////toplevel
261 translate([0, -phone_cnr_rad, 0])
263 linear_extrude(height = phone_height - phone_cnr_rad * 2)
267 module OneKeeperPrint(){ ////toplevel
272 module Keeper(){ ////toplevel
277 module DemoProfiles(){ ////toplevel