From f425f7585850ae185b54d0e5591fa25d6511a0a0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 21 Jan 2018 12:15:03 +0000 Subject: [PATCH] fairphone-case: refactor tests (nfc) Signed-off-by: Ian Jackson --- fairphone-case.scad | 49 +++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/fairphone-case.scad b/fairphone-case.scad index a81bb61..42de8f9 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -372,49 +372,50 @@ module TestLength(){ ////toplevel } } +module TestSelectWidth(){ + translate([-30, -(phone_height - 25), -20]) + mirror([0, 1, 0]) + cube([200, 50, 40]); +} + module TestWidth(){ ////toplevel intersection(){ Case(); - translate([-30, -(phone_height - 25), -20]) - mirror([0, 1, 0]) - cube([200, 50, 40]); + TestSelectWidth(); } } module TestLidWidthPrint(){ ////toplevel - rotate([0,180.0]) - intersection(){ - Lid(); - translate([-30, -(phone_height - 25), -20]) - mirror([0, 1, 0]) - cube([200, 50, 40]); - } + rotate([0,180.0]) TestLidWidth(); +} + +module TestSelectCamera(){ + CaseBase_rhsflip(1) + translate([0,0,-25]) + linear_extrude(height = 50) + mirror([0, 1, 0]) + rectfromto([-20, -20], + camera_pos_br + [ 5, 5 ]); } module TestCamera(){ ////toplevel intersection(){ Case(); - CaseBase_rhsflip(1) - translate([0,0,-25]) - linear_extrude(height = 50) - mirror([0, 1, 0]) - rectfromto([-20, -20], - camera_pos_br + [ 5, 5 ]); + TestSelectCamera(); } } -module TestLidByCameraPrint(){ ////toplevel - rotate([180,0,0]) intersection(){ +module TestLidByCamera(){ ////toplevel + intersection(){ Lid(); - CaseBase_rhsflip(1) - translate([0,0,-25]) - linear_extrude(height = 50) - mirror([0, 1, 0]) - rectfromto([-20, -20], - camera_pos_br + [ 5, 5 ]); + TestSelectCamera(); } } +module TestLidByCameraPrint(){ ////toplevel + rotate([180,0,0]) TestLidByCamera(); +} + module OneKeeper(){ ////toplevel translate([0, -phone_cnr_rad, 0]) rotate([90, 0, 0]) -- 2.30.2