//magnet clip // sizes 6h, 10d // 3h, 20d mh = 3; // magnet height md = 20; // magnet diameter cl= 0.5; //clearance wt = 0.8; // wall thickness $fn=100; module body(){ difference(){ union(){ cube([md+cl+wt+wt,mh+cl+wt+wt,md+cl+wt+wt]); translate([((md+cl+wt+wt)/2),-3.2,0]) plug(3.5,8,5,4); // ring for string } translate([(md+wt+wt+cl)/2,cl+wt+mh,wt+cl+md/2]) rotate([90,0,0]) plug (wt+cl+(md)/2,md+cl,mh+cl,0); } } module plug(h,d,t,id){ // distance edge to centre, diam, thick, diam hole difference(){ union(){ cylinder (h=t,d=d); translate([-d/2,0,0]) cube([d,h,t]); } translate ([0,0,-t/2]) cylinder(h=2*t,d=id); } } body(); translate ([(md+cl)/2,-8,0]) // offset for printing rotate([0,0,180]) intersection(){ translate([0,-(md+cl)/4,0]) // chop off sharp edges rotate([0,0,45]) cube(200); plug((md/2)+cl+wt,md+cl,mh,md+cl); }