chiark / gitweb /
fairphone-case: Buttons: support suppress_over_keeper
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Jan 2018 21:47:41 +0000 (21:47 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Jan 2018 21:47:41 +0000 (21:47 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index 5548b9dcc77a9f8bceebfbc14486732472cec744..29f0a5c80045d426d59556073859da792eae8726 100644 (file)
@@ -407,7 +407,8 @@ module LidEdgeProfile(){
 module ButtonCoverProfile(){
   intersection(){
     polygon(concat([ bppM, bppP, bppO, bppJ ],
-                  (enable_support ? [ bppU, bppV, bppW ] : []),
+                  (enable_support && !$button_suppress_over_keeper
+                   ? [ bppU, bppV, bppW ] : []),
                   [ bppL, bppK ]));
     hull(){
       EdgeProfile();
@@ -553,12 +554,13 @@ module CaseAperture(pos, dia, $fn) {
             h = 60);
 }
 
-module SideButton(y, y_ref_sign, l){
+module SideButton(y, y_ref_sign, l, suppress_over_keeper=0){
   // y_ref_sign:
   //   +1  measured from top    of actual phone to top    of button
   //   -1  measured from bottom of actual phone to bottom of button
   //    0  y is centre of button in coordinate system
   $button_l= l;
+  $button_suppress_over_keeper= suppress_over_keeper;
   eff_y = y_ref_sign > 0 ?         -bumper [1] -y -l/2 :
          y_ref_sign < 0 ? (-phone -bumper)[1] +y +l/2 :
          y;
@@ -879,7 +881,7 @@ module Case(){ ////toplevel
                translate([phone_width/2, -400, kppe[1]])
                mirror([1-abs($rhsflip - keeper_side),0,0])
                cube([400, 800, 50]);
-           if (enable_support)
+           if (enable_support && !$button_suppress_over_keeper)
              rotate([-90,90,0])
              translate([-400, -400, kppd[1]])
                mirror([0,0,1])