$fn = 360; w = 3; // wall thickness th = 6; // top height i= 10 ; // inner radius aka "finger" size o = i + 4; h = o; draft = 10; badgeh = 4; offs = tan(draft)* badgeh; e=0.3; m4r = 2 + e; // M4 radius hr = 20/2 + e; // hole radius echo(offs); //ring module woggle(){ difference(){ x = 2; hull(){ cylinder(0.1, o, o); translate([0,h/2,-o+x]) rotate([90,0,0]){ cylinder(h, o, o); } } translate([0,o+1,-o+x]) rotate([90,0,0]){ cylinder(o*2+2,i,i); } } //top difference(){ cylinder(th,o,o-offs); translate([0,0,3]) cylinder(4,o-w-offs,o-w); } rotate([0,0,-90]) translate([-1,0,3]) //staff union(){ sw = w * 0.6; sh = o * 0.6; rotate([0,90,0]) cylinder(sh,sw,sw); rotate([0,-90,30]) cylinder(sh*0.6,sw,sw); rotate([0,-90,-45]) cylinder(sh*0.6,sw,sw); } } module mold(){ // whole difference(){ mt = 5; // mold thickness m4d = 44.5 ; // m4 distance wx = m4d + m4r + mt*2; wy = (o+mt)*2; mh = o*2+th + 2*mt + 3; c = -(o*2+th + 2*mt)/2-th; ph = o -- 2 + th; pc = ph/2; union(){ translate([-wx/2,-wy/2,-mh/2-o+2+3]) cube([wx,wy,mh]); // ears translate([28,0,-12]) rotate([90,0,0]) cylinder(wy,10,10,center=true); translate([-28,0,-12]) rotate([90,0,0]) cylinder(wy,10,10,center=true); } woggle(); // m4 screws fittings translate([m4d/2,0,0]) cylinder(mh*2,m4r,m4r,center = true); translate([-m4d/2,0,0]) cylinder(mh*2,m4r,m4r,center = true); translate([0,0,-12]) rotate([90,0,0]) cylinder(mh*2,m4r,m4r,center = true); translate([28,0,-12]) rotate([90,0,0]) cylinder(mh*2,m4r,m4r,center = true); translate([-28,0,-12]) rotate([90,0,0]) cylinder(mh*2,m4r,m4r,center = true); translate([-14,0,-28]) rotate([90,0,0]) cylinder(mh*2,m4r,m4r,center = true); translate([14,0,-28]) rotate([90,0,0]) cylinder(mh*2,m4r,m4r,center = true); // air escapes aoff = o-offs-1.2; ar = 1.1; translate([aoff,0,0]) // manual adjusted cylinder(3*mt + 2, ar,ar); translate([-aoff,0,0]) // manual adjusted cylinder(3*mt + 2, ar, ar); //translate([-aoff,0,0]) // manual adjusted cylinder(3*mt + 2, ar, ar); // filler entrance translate([0,0,-35]) cylinder(10,10,5); } } module top(){ difference(){ mold(); mt = 5; translate([-50-1,-(o+mt)-1,-(o*2+th + 2*mt)]) cube([100,(o+mt)*2+2,o*2+th + 2*mt]); // #translate([-(o+mt)-1,-(o+mt)-1,-(o*2+th + 2*mt)]) // cube([(o+mt)*2+2,(o+mt)*2+2,o*2+th + 2*mt]); } } module bottom(){ difference(){ mold(); mt = 5; // #translate([-(o+mt)-1,-(o+mt)-1,0]) // cube([(o+mt)*2+2,(o+mt)*2+2,o*2+th + 2*mt]); translate([-50-1,-(o+mt)-1,0]) cube([100,(o+mt)*2+2,o*2+th + 2*mt]); } } module bottom_left(){ difference(){ bottom(); mt = 5; translate([-50-1,0,-(o*2+th + 2*mt)+1]) cube([100,(o+mt)*2+2,o*2+th + 2*mt]); } // #translate([-(o+mt)-1,0,-(o*2+th + 2*mt)+1]) // cube([(o+mt)*2+2,(o+mt)*2+2,o*2+th + 2*mt]); // } } module bottom_right(){ difference(){ bottom(); mt = 5; translate([-50-1,-(o+mt)*2+-2,-(o*2+th + 2*mt)+1]) cube([100,(o+mt)*2+2,o*2+th + 2*mt]); } // translate([-(o+mt)-1,-(o+mt)*2+-2,-(o*2+th + 2*mt)+1]) // cube([(o+mt)*2+2,(o+mt)*2+2,o*2+th + 2*mt]); // } } //mold(); d = 25; translate([0,0,15]) rotate([0,180,0]) top(); //translate([0,d,19]) //rotate([90,0,0]) //bottom_left(); // //translate([0,-d,19]) //rotate([-90,0,0]) //bottom_right();