chiark / gitweb /
fairphone-case: wip DemoHingeAngle
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 7 Mar 2018 18:38:01 +0000 (18:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 7 Mar 2018 18:38:01 +0000 (18:38 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index 5636d28..d7d064c 100644 (file)
@@ -1397,6 +1397,34 @@ module DemoPropAngles(){ ////toplevel
     DemoPropAngle(prop_angles[i]);
 }
 
+module DemoHingeAngle(ang1,ang2){
+  hL = [0, -(phone_height - hppT[0]), hppT[1]];
+  hC = [0, -(phone_height - hppB[0]), hppB[1] - hp_k*2];
+
+  translate(hL)
+    rotate([ang2,0,0])
+    translate(-hL)
+    translate(hC)
+    rotate([ang1,0,0])
+    translate(-hC) {
+      color("red") Lid();
+    }
+
+  color("blue") intersection(){
+    Case();
+    translate([bppJ[0], -400, -200])
+      mirror([1,0,0])
+      cube([400, 800, 400]);
+  }
+}
+
+module DemoHingeAngles(){ ////toplevel
+  DemoHingeAngle(0,45);
+//  for (i=[0 : len(prop_angles)-1])
+//    translate(i * [0, -100, 100])
+//    DemoHingeAngle(prop_angles[i]);
+}
+
 module DemoSelectAdhocLeftRight(right=0) {
   translate([phone_width/2, -400, -100]) // , -15, -100  to cross-section
     mirror([1-right, 0,0])