chiark / gitweb /
fairphone-case: replace RearSpeakerAperture with OrdinaryRearApertures
[reprap-play.git] / fairphone-case.scad
index 5df180bf1efc96ea346c6491ccb69db9b15c6313..ff29be79a9349bdf2f218435767ea47facbb4188 100644 (file)
@@ -332,11 +332,17 @@ module Struts(x_start, z_min, th){
   }
 }
 
-module RearSpeakerAperture(){
-  CaseBase_rhsflip([1]) CaseBase_botflip([1])
+module OrdinaryRearAperture(rhs,bot, pos){
+  CaseBase_rhsflip(rhs) CaseBase_botflip(bot)
     linextr(-20, 20)
     mirror([0,1])
-    translate(rearspeaker_pos_bl + bumper)
+    translate(pos + bumper)
+    children();
+}
+
+module OrdinaryRearApertures(){
+  // rear speaker
+  OrdinaryRearAperture(1,1, rearspeaker_pos_bl)
     rectfromto(-rearspeaker_gap,
               rearspeaker_size + rearspeaker_gap);
 }
@@ -416,7 +422,7 @@ module Case(){ ////toplevel
     CaseBase_rhsflip([1])
       CaseAperture(noisecancelmic_pos, noisecancelmic_dia, 20);
 
-    RearSpeakerAperture();
+    OrdinaryRearApertures();
   }
 }
 
@@ -481,13 +487,16 @@ module TestSelectRearAperture(){
 }
 
 module TestSelectCamera(){
-  TestSelectRearAperture()
-    RearCameraAperture();
+  minkowski(){
+    TestSelectRearAperture()
+      RearCameraAperture();
+    cube([0.1, 50, 0.1]);
+  }
 }
 
-module TestSelectRearSpeaker(){
+module TestSelectOrdinaryRearApertures(){
   TestSelectRearAperture()
-    RearSpeakerAperture();
+    OrdinaryRearApertures();
 }
 
 module TestCamera(){ ////toplevel
@@ -547,7 +556,7 @@ module TestFrameCase(){ ////toplevel
     union(){
       TestSelectFrame();
       TestSelectCamera();
-      TestSelectRearSpeaker();
+      TestSelectOrdinaryRearApertures();
     }
   }
 }