opn_h = 48; opn_w = 11.2; d = 3; btn_s = 6; btn_dist = 34; btn_d = 3.2; h = btn_dist+btn_s+1.4+2; hub = 1.5; l_d = 24; module ring(dia, thickness, w) { translate([0, w, 0]) rotate ([90, 0, 0]) difference() { cylinder(w, dia, dia, $fn=128); translate([0, 0, -0.1]) cylinder(w+0.2, dia-thickness, dia-thickness, $fn=128); } } rotate([90, 0, 0]) { /* Base */ cube([d, btn_s, h]); /* Top clamp */ translate([d, 0, h-1.4]) cube([btn_d, btn_s, 1.4]); /* Bottom clamp */ translate([d, 0, h-btn_s-(1.4*2)-0.4]) cube([btn_d, btn_s, 1.4]); /* { translate([d, -0.2, btn_dist-0.2]) cube([btn_s, btn_s+0.4, btn_s+0.4]); translate([d, -0.1, 0]) cube([btn_d+0.1, btn_s+0.2, (btn_dist-(8+hub/2)+btn_s/2)]); } } */ /* Foot */ difference() { rotate([0, 30, 0]) cube([20, btn_s, d]); translate([16, -0.1, -10]) cube([btn_s, btn_s+0.2, btn_s]); } /* Side hold */ /* translate([0, 0, btn_dist+((btn_s-3.7)/2)]) cube([d, btn_s+2, 3.7]); */ /* Ledge */ /* translate([0, 0, h-1.4]) cube([d+btn_d+hub+1.4, btn_s, 1.4]); */ translate([d+btn_d+hub, 0, h-24]) intersection() { translate([24, 0, 24]) ring(24, 1.4, btn_s); cube([12, 24, 24]); } translate([(d+btn_d+hub+1.4)/2, 0, h]) intersection() { ring((d+btn_d+hub+1.4)/2, 1.4, btn_s); translate([-10, 0, 0]) cube([20, 10, 10]); } /* translate([4+d+btn_d+hub+0.2, 0, btn_dist+btn_s/2]) ring(4, 0.6, btn_s); translate([d+btn_d, 0, btn_dist-(8+hub/2)+btn_s/2]) intersection() { translate([0, 0, 4+hub]) ring(4+hub, 0.6, btn_s); cube([6, 6, 4+hub]); } */ }