part="left"; part_w=132.3; part_h=132.0; thickness=1.8; y_bottom=6.5; y_top=125.5; rack_x_from_outer=8.7376; rack_slot_l=11.0; rack_slot_h=7.0; monitor_hole_d=4.5; monitor_x_left=123.3; key_x_left=65.0; key_w=16.0; key_h=22.0; key_y=[30.5,66.0,101.5]; module pill2d(length,height) { hull() { translate([-(length-height)/2,0]) circle(d=height,$fn=96); translate([ +(length-height)/2,0]) circle(d=height,$fn=96); } } module wing(left=true) { rx=left ? rack_x_from_outer : part_w-rack_x_from_outer; mx=left ? monitor_x_left : part_w-monitor_x_left; kx=left ? key_x_left : part_w-key_x_left; linear_extrude(height=thickness) difference() { square([part_w,part_h]); for(y=[y_bottom,y_top]) translate([rx,y]) pill2d(rack_slot_l,rack_slot_h); for(y=[y_bottom,y_top]) translate([mx,y]) circle(d=monitor_hole_d,$fn=96); for(y=key_y) translate([kx-key_w/2,y-key_h/2]) square([key_w,key_h]); } } wing(part=="left");