From: Ian Jackson Date: Thu, 25 Jan 2018 20:29:13 +0000 (+0000) Subject: fairphone-case: some prop recesses, but approach is not right X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1526d47b138dfaf1b6ffa156372593e5498fdd47;p=reprap-play.git fairphone-case: some prop recesses, but approach is not right Signed-off-by: Ian Jackson --- diff --git a/fairphone-case.scad b/fairphone-case.scad index c9e1a5a..7fe1083 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -4,7 +4,17 @@ include phone = [ 75.0, 145.0 ]; -prop_lid_posns = [ 58, 140 ]; // measured from bottom of phone +prop_lid_posns = [ 70 ]; // measured from bottom of phone + +prop_lengths = [ 80, 50 ]; + +prop_angle_specs = [ + // angle prop length index prop lid posn index + [ 15, 1, 0 ], + [ 30, 1, 0 ], + [ 45, 0, 0 ], + [ 60, 0, 0 ], + ]; bumper = [ 0.250, -0.025 ]; // ^ One side. Overall size is increased by twice this. @@ -605,6 +615,29 @@ module PropRecess(){ } } +module CasePropRecess(pas) { + // destructure entry in prop_angle_specs + beta = pas[0]; + b = prop_lengths [ pas[1] ]; + p = prop_lid_posns[ pas[2]] ; + + k = hp_k; + x = k / (2 * sin(beta/2)) - hppT[0]; + c = p + x; + + // https://en.wikipedia.org/wiki/Solution_of_triangles#Two_sides_and_non-included_angle_given_(SSA) [25.1.18] + // we always want the positive solution because it has a closer to c + a = c * cos(beta) + sqrt( b*b - pow(c * sin(beta),2) ); + q = a - x; + + echo(beta, a, b, c); + + Flip_bot(1) + translate([ phone_width/2, -q, epp2o[1]-case_th_bottom ]) + rotate([0,180,0]) + PropRecess(); +} + module CaseBase(){ AroundEdges(epp3[1], case_th_bottom, 1) EdgeProfile(); @@ -698,6 +731,10 @@ module Case(){ ////toplevel // catch striker CatchPortion(catch_width + catch_side_gap*2) CatchCutProfile(); + + // prop recesses + #for (pas = prop_angle_specs) + CasePropRecess(pas); } }