From 13350a5a945b8c2f8124adb1269987037e3be24e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 19 Jan 2018 21:21:13 +0000 Subject: [PATCH] fairphone-case: fix CodeBase_*flip Signed-off-by: Ian Jackson --- fairphone-case.scad | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/fairphone-case.scad b/fairphone-case.scad index ce8ad76..47d92f0 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -57,23 +57,31 @@ module EdgeProfile(){ } module CaseBase_rhsflip(rhs) { - translate([phone_width/2, -phone_cnr_rad, 0]) + translate([phone_width/2, 0, 0]) mirror([rhs,0,0]) - translate([-phone_width/2,0,0]) + translate([-phone_width/2, 0, 0]) children(); } +module CaseBase_botflip(bot) { + translate([0, -phone_height/2, 0]) + mirror([0, bot, 0]) + translate([0, phone_height/2, 0]) + children(); +} + module CaseBase(){ for (rhs=[0,1]) { CaseBase_rhsflip(rhs){ - rotate([90,0,0]) - linear_extrude(height = phone_height - phone_cnr_rad) + translate([0, -phone_cnr_rad, 0]) + rotate([90,0,0]) + linear_extrude(height = phone_height - phone_cnr_rad*2) EdgeProfile(); } } for (rhs=[0,1]) { CaseBase_rhsflip(rhs){ - translate([+1,0] * phone_cnr_rad) + translate([+1,-1] * phone_cnr_rad) intersection(){ rotate_extrude() intersection(){ @@ -87,10 +95,14 @@ module CaseBase(){ } } } - translate([ phone_width - phone_cnr_rad, 0,0 ]) - rotate([90,0,-90]) - linear_extrude(height = phone_width - phone_cnr_rad*2) - EdgeProfile(); + for (bot=[0,1]) { + CaseBase_botflip(bot){ + translate([ phone_width - phone_cnr_rad, 0,0 ]) + rotate([90,0,-90]) + linear_extrude(height = phone_width - phone_cnr_rad*2) + EdgeProfile(); + } + } } //EdgeProfile(); -- 2.30.2