X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=fairphone-case.scad;h=5b82796ff6de584dc33fe03a370d4d711ae7686a;hb=62cf5e9b1dcb0a68f27adc090723095d625c9208;hp=16a9bd613572a7bb1d99847e1e98156fa36838c5;hpb=5ea2ddae765bf5d7aaf8c52527e66f27485f5c97;p=reprap-play.git diff --git a/fairphone-case.scad b/fairphone-case.scad index 16a9bd6..5b82796 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -408,6 +408,12 @@ chk(hex22, 10.9975); chk(hex23, 13.74); chk(hex24, 18.75); +lid_close_clearance_skew = + (lpp10[1] - hppB[1]) / + (lpp10[0] - hppB[0]); + +echo("SK",lid_close_clearance_skew); + // catch cppJ = [ epp4[0] + catch_thickness, lpp10[1] ]; @@ -521,6 +527,15 @@ module LidEdgeProfile(){ } } +module LidEdgeFoldClearanceProfile(){ + polygon([ lpp10, + lpp11, + lpp11 + [-20, 0], + lpp11 + [-20, 20], + lpp11 + [+20, 20], + lpp10 + [+20, 0] ]); +} + module ButtonCoverProfile(){ intersection(){ polygon(concat([ bppM, bppP, bppO, bppJ ], @@ -824,7 +839,7 @@ module HingePortion(x0,x1){ mirror([1,0,0]) rotate([90,0,-90]) linear_extrude(height=x1-x0) - children(0); + children(); } module CatchPortion(width){ @@ -1055,11 +1070,28 @@ module LidAdhocMultiprintFrame(phase){ } } +module LidAroundEdges(){ + AroundEdges(lpp10[1], lpp13[1] - lpp10[1], 0) + children(); +} + module Lid(){ ////toplevel + skew_centre = [0, lpp11[0], lpp11[1]]; difference(){ union(){ - AroundEdges(lpp10[1], lpp13[1] - lpp10[1], 0) - LidEdgeProfile(); + intersection(){ + LidAroundEdges() + LidEdgeProfile(); + + translate(skew_centre) + multmatrix([[ 1, 0, 0, 0 ], + [ 0, 1, -lid_close_clearance_skew, 0 ], + [ 0, 0, 1, 0 ], + [ 0, 0, 0, 1 ]]) + translate(-skew_centre) + LidAroundEdges() + LidEdgeFoldClearanceProfile(); + } // button covers Buttons(){ @@ -1076,7 +1108,10 @@ module Lid(){ ////toplevel } // hinge arms - HingePortion(hex20, hex21) HingeLidProfile(); + HingePortion(hex20, hex21) { + LidEdgeProfile(); + HingeLidProfile(); + } // catch CatchPortion(catch_width) @@ -1423,7 +1458,7 @@ module DemoHingeAngle(ang1,ang2){ } module DemoHingeAngles(){ ////toplevel - angles = [ 0, 6, 12, 16, 24, 36 ]; + angles = [ 0, 4, 8, 12 ]; echo("angles",angles); for (i=[0 : len(angles)-1]) { translate(i * [0, 0, 30]) {