chiark / gitweb /
fairphone-case: provide various Frame tests
[reprap-play.git] / fairphone-case.scad
index a1e87439da9ea2d7fca350d8d010bbef2f389b02..f1d363802ca3344791050ba7d324ebfe8c371c69 100644 (file)
@@ -58,6 +58,8 @@ strut_min_at_end = 1.5;
 phone_width =  (phone + bumper*2)[0];
 phone_height = (phone + bumper*2)[1];
 
+inside_br = [phone_width, -phone_height];
+
 //echo(camera_pos_tl + bumper,
 //     camera_pos_br + bumper);
 
@@ -470,6 +472,34 @@ module LidPrint(){ ////toplevel
     Lid();
 }
 
+module TestSelectFrame(){
+  include = [1,-1] * (epp2i[0] + 4);
+
+  difference(){
+    cube(1000, center=true);
+    translate([0,0, -100])
+      linear_extrude(height=200)
+      rectfromto(include,  inside_br - include);
+  }
+}
+
+module TestFrameCase(){ ////toplevel
+  intersection(){
+    Case();
+    union(){
+      TestSelectFrame();
+      TestSelectCamera();
+    }
+  }
+}
+
+module TestFrameLidPrint(){ ////toplevel
+  rotate([0,0,180]) intersection(){
+    Lid();
+    TestSelectFrame();
+  }
+}
+
 module Keeper(){ ////toplevel
   CaseBase_rhsflip()
     OneKeeper();