// -*- C -*- psz = [ 120, 56 + 5, 15 + 3, ]; thick = [ 2, 3, 2.5, ]; btn_x = 58; btn_dia = 14; btn_yprop = 0.23; rail_ysz = 2.5; rail_zsz = 2.5; // calculated ym = psz[1]/2; module Case(){ difference(){ mirror([1,0,0]) translate(-thick) cube(psz + 2*thick - [1,0,0] * (thick[0])); for (yp= [ btn_yprop, 1-btn_yprop ]) translate([ -btn_x, yp * psz[1], 0.5 * psz[2] ]) cylinder(r= btn_dia/2, h=20); mirror([1,0,0]) difference(){ cube(psz + [1,0,0]); for (m=[0,1]) { translate([0,ym,0]) mirror([0,m,0]) translate([0,-ym,0]) translate([-1,-1, psz[2]-rail_zsz]) cube([psz[0]+1, rail_ysz+1, rail_zsz+1]); } } } } Case();