include include // variables h = 25; peg_d = 10; // constants ball_d = 17; ball_shift_h = 1.2; ball_shift_v = 0.5; $slop=0.2; $fn=360; difference() { union() { // main model fwd(46.5) right(14.65) down(27) import("BotonS40.stl"); // shaft cyl(h=h*2, d=peg_d); // ball back(ball_shift_h) right(ball_shift_v) up(h) sphere(d=ball_d); } // hole for M3 screw up(h + ball_d/2 - 1) union() { screw_hole("M3,45", head="flat sharp", anchor="head_top", thread=true); cyl(d=7, h=10, anchor=BOTTOM); } }