chiark / gitweb /
fairphone-case: provide various Frame tests
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 15:23:00 +0000 (15:23 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 15:23:00 +0000 (15:23 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index a1e8743..f1d3638 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();