include include h = 15; // if modified, also edit thread length s_spec = "M8,15"; s_d = 6; // also modify to fit thread hole_d = 4.38; base_d = 17; base_h = 3; nut_h = 4; nut_d = 17; // outside shape nut_n = 16; nut_n_d = 2; oring_od = 13; oring_t = 1.5; $fn = 36*3; $slop=0.1; module knurl(out_d, knurl_d, n, h) { for(i = [0 : 360/n : 360]) { zrot(i) left(out_d/2 + knurl_d/5) cyl(h=h+1, d=knurl_d); } } // thread difference() { union() { up(h/2) screw(s_spec); up(base_h/2) cyl(h=base_h, d=base_d, chamfer=0.2); } up(h/2) cyl(d=hole_d, h=h+0.1, chamfer=-0.5); up(base_h/2) knurl(base_d, nut_n_d, nut_n, base_h); // space for oring up(base_h) torus(od=oring_od, r_min=oring_t/2); } // nut left((nut_d + base_d)/2 + 5) difference() { union() { up(nut_h/2) cyl(h=nut_h, d=nut_d, chamfer=0.2); } up(nut_h/2) screw_hole(s_spec, thread=true, l=nut_h+0.1, bevel=0.25); up(nut_h/2) knurl(nut_d, nut_n_d, nut_n, nut_h); }