include include $slop=0.5; $fn=36; in_d = 37; thread = "M45x3,80"; in_h = 80; t = 3; th_h = 10; cap_h = 12; out_d = in_d + 2*t; cap_d = 50; cap_n = 24; // how many cutouts on edge hole_d = 15; difference() { union() { down(th_h/2) cyl(h=in_h - th_h, d=in_d + 2*t, rounding1=2); up(th_h/2) screw(thread); } down(th_h) difference() { cyl(h=in_h, d=out_d*2); cyl(h=in_h, d=out_d); } // inside hollow up(t) cyl(d=in_d, h=in_h); // cutoff at the top up(50 + in_h/2 + t/2)cuboid([100,100,100]); // hole in the bottom down(in_h/2 - t/2) cyl(h=t+0.1, d=hole_d, rounding=-1); } right(100) union() { difference() { union() { nut(thread, thickness=th_h, bevel=false, ibevel=false, anchor=CENTER); up(th_h/2 + t/2) cyl(h=t, d=cap_d, rounding2=2); difference() { down(cap_h/2) cyl(d=cap_d, h=cap_h, rounding=2); down(cap_h/2) cyl(d=in_d+2*t+1, h=cap_h+1); } } difference() { cyl(d=cap_d*2, h=100); cyl(d=cap_d, h=101); } for(i = [0 : 360 / cap_n : 360]) { zrot(i) left(cap_d/2) cyl(h=cap_h*2); } // hole up(th_h/2 + t/2) cyl(h=t+0.1, d=hole_d, rounding=-1); } }