multicolour_gap = 0.15; // each side
phone_cnr_rad = 6.0;
+phone_rim_depth = 0.80; // includes allowance for a screen protector
button_cutout_depth = 9;
lpp10 = [ epp5[0] + lid_gap_x, kppc[1] + lid_gap_z ];
lpp11 = [ lpp10[0], epp5[1] + lid_gap_z ];
-lp_r12 = case_th_lid - (lpp11[1] - lpp10[1]);
+lpp14 = lpp10 + [1,0] * keeper_inner_width;
+// exact x posn not very important; must extend past end of keeper
+
+lpp15 = [ lpp14[0],
+ epp0[1] - phone_rim_depth + 1/2.5 * case_th_lid ];
+// ^ beam theory says to maximise force before contact,
+// the gap below the `beam' (the lid) must be 1/3
+// the thickness (ie the lid thickness) if the beam
+// is solid, or 1/2 if it has a top and bottom only.
+// ours is mostly solid.
+
+lp_r12 = max(case_th_lid - (lpp11[1] - lpp15[1]),
+ case_th_lip);
lpp12 = [ epp4[0] + lp_r12, lpp11[1] ];
lpp13 = [ lpp12[0], lpp12[1] + lp_r12 ];
lpp12,
lpp13,
lpp13 + [10, 0],
- lpp10 + [10, 0]
+ lpp15 + [10, 0],
+ lpp15,
+ lpp14,
]);
intersection(){
circleat(lpp12, r=lp_r12);