chiark / gitweb /
fairphone-case: wip lanyard, wip cutout
[reprap-play.git] / fairphone-case.scad
index 06edd69e2d5bccc6de1921e6d63e4b158b66c23c..50396258081ced9d3ea2224aa6363c6ae113714c 100644 (file)
@@ -449,6 +449,7 @@ cppF = [ cppV[0] + catch_finger_depth, cppC[1] ];
 // lanyard
 
 ly_r = lanyard_half_dia / 2;
+ly_rc = ly_r * 2;
 
 // prop recess in case
 
@@ -539,8 +540,7 @@ module LanyardCurveChannelProfile(){
 }  
 
 module LanyardEntryChannelProfile(){
-  translate([0, -ly_r])
-    LanyardLanyardProfile(true);
+  LanyardLanyardProfile(true);
 }  
 
 module LanyardMainChannelProfile(){
@@ -553,6 +553,42 @@ module LanyardMainChannelProfile(){
   }
 }
 
+module LanyardEntry(){
+  q_z = -(ly_rc + ly_r);
+  d_x = -ly_rc;
+
+  translate([d_x, 0, q_z]) {
+    intersection(){
+      rotate([90,0,0])
+       rotate_extrude(convexity=10)
+       rotate(90)
+       translate([0, -q_z])
+       LanyardCurveChannelProfile();
+      translate([0,-10,0])
+       cube([20,20,20]);
+    }
+  }
+
+  mirror([0,0,1])
+    translate([0,0,-1])
+    linear_extrude(height=20)
+    rotate(-90)
+    LanyardEntryChannelProfile();
+}
+
+module LanyardCutout(l){
+  rotate([0,-90,0])
+    linear_extrude(height=l)
+    rotate(-90)
+    LanyardMainChannelProfile();
+
+  for (ee=[0,1]){
+    translate(ee * l * [-1,0])
+      mirror([ee,0,0])
+      LanyardEntry();
+  }
+}
+
 module LidEdgeProfile(){
   polygon([ lpp10,
            lpp11,
@@ -1548,6 +1584,10 @@ module DemoFrame(){ ////toplevel
   %HingeLever();
 }
 
+module DemoLanyardCutout(){ ////toplevel
+  LanyardCutout(25);
+}
+
 module DemoHingedFrame(){ ///toplevel
   color("red") TestFrameCase();
   translate([0,0, -2*hp_k])