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

index d400d70986fad0a0054682439a113921e55e0e9f..5500e6d39d22ad6e9a4e5c02376459c6465d2e7b 100644 (file)
@@ -150,8 +150,10 @@ button_cutout_depth = 9;
 phone_edge_thick = 11.25;
 
 // xxx this is all wrong
-camera_pos_tl = [  6.450, 12.750 ]; // measured from tl corner
-camera_pos_br = [ 22.300, 37.600 ]; // tl/br as seen from back
+
+camera_pos_tl = [  7.350,  7.500 ]; // from tl corner (as seen from back)
+camera_edge_rad = 9.0;
+camera_sz = 32.92;
 
 // this is disabled, FP4 doesn't have one
 jack_pos = [ 13.83, 8.485 ];
@@ -897,6 +899,8 @@ module OrdinaryRearApertures(){
   //  OrdinaryRearAperture(1,1, rearspeaker_pos_bl)
   //    rectfromto(-rearspeaker_gap,
   //          rearspeaker_size + rearspeaker_gap);
+
+  RearCameraAperture();
 }
 
 module NotInTestFrameRearApertures(){
@@ -909,12 +913,22 @@ module NotInTestFrameRearApertures(){
 }
 
 module RearCameraAperture(){
-  Flip_rhs(1)
+  %Flip_rhs(1)
     mirror([0, 0, 1])
+    translate([0,0,0])
     linear_extrude(height = 20)
     mirror([0, 1, 0])
     translate(bumper)
-    rectfromto(camera_pos_tl, camera_pos_br);
+    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);
+      }
+    }
 }
 
 module HingeLidProfile(){
@@ -1155,7 +1169,8 @@ module Case(){ ////toplevel
       }
 
     // front camera
-    RearCameraAperture();
+    // RearCameraAperture();
+    // now in OrdinaryRearApertures
 
     // struts (invisible, because they're buried in the case)
     Struts(epp2i[0], epp2i[1] - case_th_bottom, case_th_bottom);