/* Silencer Inspired by the QuickCan Parametric Printable Silencer Tool quickcan.scad by Hillary Izabych. I couldn't find her or any way to contact her, and her project had no license. I modified the silencer to print a threaded portion to screw onto barrel threads instead of as a muzzle brake slip-on device. The thread should ensure better fitment and alignment, lessening the possibility of baffle strikes, and of course better ease of use. */ include include test = 0; // 1 for exploded view $fn=36*5; // overall dimensions len = 230; out_d = 22; t = 2.5; bullet_hole_1 = 6.5; // for .22lr 5.6mm + some spare bullet_hole_2 = 8; // for .22lr 5.6mm + some spare // threaded portion th_len = 20; th_spec = str("1/2-20,", th_len/10); // change to your barrel thread spec $slop = 0.15; // For my printer, no slop results in an extremely tight thread. // clamp cl_len = 50; cl_in_d = 13; // baffles baf_dist = 0; baf_h_num = 6; baf_h_d1 = 2; baf_h_d2 = 2.6; // Do not modify - internal calculations in_d = out_d - 2*t; baf_len = len - th_len; module body() { difference() { cyl(d=out_d, h=len); cyl(d=in_d, h=len+0.1); } } module baffle() { difference() { cyl(d1=out_d, d2=0, h=out_d/2); down(t*sqrt(2)) cyl(d1=out_d, d2=0, h=out_d/2); // holes for(i=[0:baf_h_num]) { zrot(60*i) left(in_d*3/7) cyl(d=baf_h_d1, h=len); zrot(60*i + 30) left(in_d*3/10) cyl(d=baf_h_d2, h=len); } } } module baffles() { difference() { down(baf_len/2) for(i=[0:out_d/2 + baf_dist:baf_len-out_d]) { up(i) baffle(); } // hole for bullet cyl(d2=bullet_hole_1, d1=bullet_hole_2, h=len); } } module cap() { down(len/2) difference() { cyl(d=out_d, h=t); cyl(d=bullet_hole_2, h=t+1); } } module thread() { up(len/2 - th_len/2) difference() { cyl(h=th_len, d=out_d); up(th_len/2 - 1) screw_hole(th_spec, thread=true, head="flat small", anchor="head_bot"); cyl(h=out_d, d1=out_d, d2=0); } } module clamp() { up(len/2 + cl_len/2) difference() { cyl(h=cl_len, d=out_d); cyl(h=cl_len, d=cl_in_d); cuboid([out_d, t, cl_len]); down(cl_len/4 + out_d/4) cyl(h=out_d, d1=out_d, d2=0, anchor=down); } } module silencer() { left(test*(out_d+5)) body(); baffles(); right(test*(out_d+5)) cap(); right(test*(out_d+5)) thread(); // right(test*(out_d+5)) clamp(); } silencer(); echo(th_spec);