+stay_height = 1.49;
+
+case_x_less = 0; //case_x_less = 10;
+
+inner_cnr_rad = 4.0;
+
+// calculated
+
+btn_yprop = btn_y / psz[1];
+echo(btn_yprop);
+
+ym = psz[1]/2;
+outer_cnr_rad = inner_cnr_rad + thick[2];
+
+x_sliced = outer_cnr_rad * (1-sin(45));
+
+$screen = true;
+
+module RoundedProfile(sz, cnr_rad){
+ hull(){
+ for (x=[ cnr_rad, sz[0]-cnr_rad ])
+ for (y=[ cnr_rad, sz[1]-cnr_rad ])
+ translate([x,y])
+ circle(r= cnr_rad, $fn=20);
+ }
+}
+
+module RoundedCube(sz, cnr_rad){
+ if ($test)
+ cube(sz);
+ else hull(){
+ for (x=[ cnr_rad, sz[0]-cnr_rad ])
+ for (y=[ cnr_rad, sz[1]-cnr_rad ])
+ for (z=[ cnr_rad, sz[2]-cnr_rad ])
+ translate([x,y,z])
+ sphere(r= cnr_rad, $fn=40);
+ }
+}
+
+module Stay(xbot, xtop, width, midgap_width) {
+ translate([ (xbot+xtop)/2, psz[1]/2, psz[2] ]){
+ difference(){
+ cube([ xtop-xbot, width, stay_height*2 ], center=true);
+ if (midgap_width > 0)
+ cube([ 200, midgap_width, 10 ], center=true);
+ }
+ }
+}
+
+module Stays(){
+ Stay( 76, 82, 10, 0);
+ Stay(-0.1, 55, 10, 0);
+ Stay( 113,125, 70, 15);
+}
+