chiark / gitweb /
fairphone4-case: wip camera
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 23 Feb 2022 21:58:12 +0000 (21:58 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 23 Feb 2022 21:58:12 +0000 (21:58 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone4-case.scad

index d7612bb6f2d6c0faf567066556f2c85a87d441b6..3c343ee022f8c69458c9594f005bfbc02d934906 100644 (file)
@@ -899,8 +899,6 @@ module OrdinaryRearApertures(){
   //  OrdinaryRearAperture(1,1, rearspeaker_pos_bl)
   //    rectfromto(-rearspeaker_gap,
   //          rearspeaker_size + rearspeaker_gap);
-
-  RearCameraAperture();
 }
 
 module NotInTestFrameRearApertures(){
@@ -913,21 +911,20 @@ module NotInTestFrameRearApertures(){
 }
 
 module RearCameraAperture(){
-  %Flip_rhs(1)
+  Flip_rhs(1)
     mirror([0, 0, 1])
     translate([0,0,0])
+    hull() // there is some kind of bug if hull() is done in 2D here!
     linear_extrude(height = 20)
     mirror([0, 1, 0])
     translate(bumper)
     translate(camera_pos_tl)
-    hull(){
-      for (xy = [ [0,0], [0,1], [1,0] ]) {
-       translate(
-            camera_edge_rad * [1,1] +
-           xy * (camera_sz - camera_edge_rad * 2)
-                 )
-         circle(r = camera_edge_rad);
-      }
+    for (xy = [ [0,0], [0,1], [1,0] ]) {
+      translate(
+         camera_edge_rad * [1,1] +
+         xy * (camera_sz - camera_edge_rad * 2)
+               )
+       circle(r = camera_edge_rad);
     }
 }
 
@@ -1169,8 +1166,7 @@ module Case(){ ////toplevel
       }
 
     // front camera
-    // RearCameraAperture();
-    // now in OrdinaryRearApertures
+    RearCameraAperture();
 
     // struts (invisible, because they're buried in the case)
     Struts(epp2i[0], epp2i[1] - case_th_bottom, case_th_bottom);