8 phone_edge_thick = 9.0;
9 phone_total_thick = 12.0;
10 phone_backside_slope = 1.0; // larger means shallower
12 camera_pos_tl = [ 7.5, 13.5 ]; // measured from tl corner
13 camera_pos_br = [ 24.0, 39.5 ]; // tl/br as seen from back
22 keeper_inner_width = 1.75;
23 keeper_inner_height = 1.75;
25 keeper_gap_z_top = 0.25;
26 keeper_gap_z_bot = 0.25;
28 keeper_gap_x_holes = 0.75;
37 phone_backside_slope_thick = phone_total_thick - phone_edge_thick;
39 //lid_lip_overlap_width xxx bad name = ;
40 //lid_lip_inner_slope = [ 5, 5 ]; // xxx
43 epp1 = [0, -phone_edge_thick];
44 epp2 = epp1 + phone_backside_slope_thick * [ phone_backside_slope, -1 ];
45 epp3 = epp2 + [10, 0];
46 epp5 = epp0 + [0,1] * (keeper_th_z + keeper_gap_z_top + case_lip);
47 epp4 = epp5 + [-1,0] * case_th_side;
50 kppd = kppe + [1,0] * keeper_inner_width;
51 kppc = kppd + [0,1] * keeper_th_z;
52 kppb = [ kppe[0] - keeper_th_x, kppc[1] ];
53 kppf = kppe - [0,1] * keeper_inner_height;
54 kppa = [ kppb[0], kppf[1] ];
56 module rectfromto(a,b) {
58 translate([min(a[0], b[0]), min(a[1], b[1])])
59 square([abs(ab[0]), abs(ab[1])]);
61 module circleat(c,r) { translate(c) circle(r); }
63 module KeeperProfile(){
64 polygon([kppe, kppd, kppc, kppb, kppa, kppf]);
70 circleat(epp3, r=case_th_bottom);
71 circleat(epp2, r=case_th_bottom);
72 circleat(epp1, r=case_th_side);
73 rectfromto(epp0, epp4);
75 polygon([ epp5 + [0,10],
82 module CaseBase_rhsflip(yn=[0,1]) {
84 translate([phone_width/2, 0, 0])
86 translate([-phone_width/2, 0, 0])
91 module CaseBase_botflip() {
93 translate([0, -phone_height/2, 0])
95 translate([0, phone_height/2, 0])
103 translate([0, -phone_cnr_rad, 0])
105 linear_extrude(height = phone_height - phone_cnr_rad*2)
109 CaseBase_rhsflip() CaseBase_botflip() {
110 translate([+1,-1] * phone_cnr_rad)
115 translate([-1,0] * phone_cnr_rad)
117 rectfromto([0,-20],[10,20]);
119 translate([-10, 0, -20] + 0.01 * [+1,-1, 0] )
125 translate([ phone_width - phone_cnr_rad, 0,0 ])
127 linear_extrude(height = phone_width - phone_cnr_rad*2)
131 translate([0,0, epp3[1]])
133 linear_extrude(height = case_th_bottom)
134 rectfromto([+1,-1] * phone_cnr_rad,
135 [phone_width, -phone_height] + [-1,+1] * phone_cnr_rad);
138 module Case(){ ////toplevel
144 translate([0, -phone_cnr_rad, 0])
146 linear_extrude(height = phone_height + phone_cnr_rad * 2)
149 rectfromto([ -keeper_gap_x, -keeper_gap_z_bot ],
150 [ keeper_gap_x_holes, +keeper_gap_z_top ]);
154 CaseBase_rhsflip([1])
156 linear_extrude(height = 20)
158 rectfromto(camera_pos_tl, camera_pos_br);
162 module TestLength(){ ////toplevel
165 translate([-30, -200, -20])
166 cube([30 + 15, 250, 40]);
170 module TestWidth(){ ////toplevel
173 translate([-30, -(phone_height - 25), -20])
179 module OneKeeper(){ ////toplevel
180 translate([0, -phone_cnr_rad, 0])
182 linear_extrude(height = phone_height - phone_cnr_rad * 2)
186 module OneKeeperPrint(){ ////toplevel
191 module Keeper(){ ////toplevel