From b84070f18f52b163b8ecf601bf89f3cf55467ca9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 30 Jun 2025 16:40:20 +0100 Subject: [PATCH] fairphone5-case: midpoint button measuring Signed-off-by: Ian Jackson --- fairphone5-case.scad | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fairphone5-case.scad b/fairphone5-case.scad index ac05b5e..edfd63e 100644 --- a/fairphone5-case.scad +++ b/fairphone5-case.scad @@ -783,11 +783,15 @@ 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 + // +.5 measured from top of actual phone to middle of button + // -.5 measured from bottom of actual phone to middle 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 >= 1 ? -bumper [1] -y -l/2 : + y_ref_sign >= 0.5 ? -bumper [1] -y : y_ref_sign <= -1 ? (-phone -bumper)[1] +y +l/2 : + y_ref_sign <= -0.5 ? (-phone -bumper)[1] +y : y; //echo(eff_y); translate([0, eff_y, 0]) -- 2.30.2