chiark / gitweb /
fairphone-case: introduce TestSelectRearAperture (nfc)
[reprap-play.git] / fairphone-case.scad
index 7f4c096f84c2d4015cf787fe5b6f7bb53b029d56..20b809b15be6245a0c20d18593c5e0fbbe6eae40 100644 (file)
@@ -341,6 +341,15 @@ module RearSpeakerAperture(){
               rearspeaker_size + rearspeaker_gap);
 }
 
+module RearCameraAperture(){
+  CaseBase_rhsflip([1])
+    mirror([0, 0, 1])
+    linear_extrude(height = 20)
+    mirror([0, 1, 0])
+    translate(bumper)
+    rectfromto(camera_pos_tl, camera_pos_br);
+}
+
 module CaseBase(){
   AroundEdges(epp3[1], case_th_bottom, 1)
     EdgeProfile();
@@ -379,12 +388,7 @@ module Case(){ ////toplevel
       }
 
     // front camera
-    CaseBase_rhsflip([1])
-      mirror([0, 0, 1])
-      linear_extrude(height = 20)
-      mirror([0, 1, 0])
-      translate(bumper)
-      rectfromto(camera_pos_tl, camera_pos_br);
+    RearCameraAperture();
 
     // struts (invisible, because they're buried in the case)
     Struts(epp2i[0], epp2i[1] - case_th_bottom, case_th_bottom);
@@ -477,14 +481,19 @@ module TestSelectCamera(){
               camera_pos_br + bumper + [ 2, 2 ]);
 }
 
-module TestSelectRearSpeaker(){
+module TestSelectRearAperture(){
   minkowski(){
-    RearSpeakerAperture();
+    union() children();
     translate([20, 0,0])
       cube([42, 2, 1], center=true);
   }
 }
 
+module TestSelectRearSpeaker(){
+  TestSelectRearAperture()
+    RearSpeakerAperture();
+}
+
 module TestCamera(){ ////toplevel
   intersection(){
     Case();