chiark / gitweb /
fairphone-case: working LidEdgeFoldClearanceProfile
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Mar 2018 12:16:46 +0000 (12:16 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Mar 2018 12:16:50 +0000 (12:16 +0000)
Reverts previous commit, and provides positive outline to intersect
with that ensures clearance.  Slope value needs to be calculated
still.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index 41bad57660bfe76e488520c12b7fba7705a2dba6..b781957575f5c684fd266d355dbcc854857e9e6c 100644 (file)
@@ -522,11 +522,12 @@ module LidEdgeProfile(){
 }
 
 module LidEdgeFoldClearanceProfile(){
-  polygon([ lpp10 + [0,  -10],
+  polygon([ lpp10,
            lpp11,
-           lpp11 + [20,   0],
-           lpp10 + [20, -10]
-           ]);
+           lpp11 + [-20,  0],
+           lpp11 + [-20, 20],
+           lpp11 + [+20, 20],
+           lpp10 + [+20,  0] ]);
 }
 
 module ButtonCoverProfile(){
@@ -1072,8 +1073,19 @@ module Lid(){ ////toplevel
   skew_centre = [0, lpp11[0], lpp11[1]];
   difference(){
     union(){
-      LidAroundEdges()
-       LidEdgeProfile();
+      intersection(){
+       LidAroundEdges()
+         LidEdgeProfile();
+
+       translate(skew_centre)
+         multmatrix([[ 1, 0, 0, 0 ],
+                     [ 0, 1, -2, 0 ],
+                     [ 0, 0, 1, 0 ],
+                     [ 0, 0, 0, 1 ]])
+         translate(-skew_centre)
+         LidAroundEdges()
+         LidEdgeFoldClearanceProfile();
+      }
 
       // button covers
       Buttons(){
@@ -1098,15 +1110,6 @@ module Lid(){ ////toplevel
     }
     Struts(lpp10[0] + strut_min_at_end, lpp13[1], -case_th_lid);
 
-    translate(skew_centre)
-      multmatrix([[ 1, 0, 0, 0 ],
-                 [ 0, 1, 2, 0 ],
-                 [ 0, 0, 1, 0 ],
-                 [ 0, 0, 0, 1 ]])
-      translate(-skew_centre)
-      LidAroundEdges()
-      LidEdgeFoldClearanceProfile();
-
     // screw holes in the hinge arms
     HingeScrews();