From 205fc3b4751fea2c7926620c5f953c796558bdf7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 23 Feb 2022 19:56:39 +0000 Subject: [PATCH] fairphone4-case: wip camera Signed-off-by: Ian Jackson --- fairphone4-case.scad | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/fairphone4-case.scad b/fairphone4-case.scad index d400d70..5500e6d 100644 --- a/fairphone4-case.scad +++ b/fairphone4-case.scad @@ -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); -- 2.30.2