chiark / gitweb /
fairphone-case: hinge: take max of r1 and r2
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 22:06:46 +0000 (22:06 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 22:06:46 +0000 (22:06 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index 9b8f8fb..bcd8eb8 100644 (file)
@@ -145,9 +145,12 @@ bppJ = [ bppN[0], bppL[1] ];
 
 // hinge plan
 hp_rn = hingescrew_nut_dia/2;
-hp_r2 = hp_rn + lever_cover_th;
+hp_r2_min = hp_rn + lever_cover_th;
 hp_rs = hingescrew_shaft_dia/2;
-hp_r1 = hp_rs + hingemount_th;
+hp_r1_min = hp_rs + hingemount_th;
+
+hp_r1 = max(hp_r1_min, hp_r2_min);
+hp_r2 = hp_r1;
 
 hppU = lpp13;
 hppS = epp2o + [0,-1] * case_th_bottom;