From: Ian Jackson Date: Sat, 20 Jan 2018 21:13:11 +0000 (+0000) Subject: fairphone-case: ButtonPlan: move bigger and d_D1_y calculations into ButtonPlan ... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=18b3658219ebd4e65a9c72b607ec4704ff20c4b5;p=reprap-play.git fairphone-case: ButtonPlan: move bigger and d_D1_y calculations into ButtonPlan (nfc) Signed-off-by: Ian Jackson --- diff --git a/fairphone-case.scad b/fairphone-case.scad index f0de5d9..3a3cf1d 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -138,7 +138,14 @@ module ButtonCoverProfile(){ } } -module ButtonPlan(l, bigger, d_D1_y){ +module ButtonPlan(l, deep, cut){ + bigger = + (deep ? lid_buttoncover_overlap : 0) + + (cut ? lid_buttoncover_gap : 0); + + d_D1_y = + (cut ? 0 : lid_buttoncover_gap); + C = [0,0]; // by definition T = [ 0, epp4[1] ]; G = T + [0,10]; @@ -347,13 +354,10 @@ module Keeper(){ ////toplevel OneKeeper(); } -module ButtonPlanForDemo(colour, z, gap, overlap){ +module ButtonPlanForDemo(colour, z, cut, deep){ color(colour) translate([0,0,z]) - ButtonPlan(8, - lid_buttoncover_gap * gap + - lid_buttoncover_overlap * overlap, - lid_buttoncover_gap * (1-gap)); + ButtonPlan(8, deep, cut); } module DemoProfiles(){ ////toplevel