small = 0.1; $fn = 64; // innerR was 59/2-2.0 // making innerD = 59-4 = 55. // actual measurement pretty darned close. // innerR = 59.0/2; too tight, cracked innerR = 60.0/2; wallThickness = 5.0; topH = 3.0; solidH = 9.0; spaceH = 3.0; clipH = 2.0; freeH = 2.0; clipInset = 1.0; notchThickness = 2.0; filletH = 3; filletW = 3; outerR = innerR + wallThickness; totalH = topH + solidH + spaceH + clipH + freeH; module cap() { difference() { cylinder(h=totalH, r=outerR); translate([0,0,topH]) { cylinder(h=totalH, r=innerR); } } } module clip() { translate([0,0,topH+solidH+spaceH]) { difference() { cylinder(r=innerR, h=clipH); translate([0,0,-small]) { cylinder(r1=innerR-clipH, r2=innerR, h=clipH+small*2); cylinder(r2=innerR-clipH, r1=innerR, h=clipH+small*2); } } } } module fillet() { translate([0,0,topH-small]) { difference() { cylinder(r=innerR+small, h=filletH); translate([0,0,-small]) cylinder(r2=innerR, r1=innerR-filletW, h=filletH+small*2); } } } module notch() { rotate() { translate([-notchThickness/2,0,topH+solidH]) { cube([notchThickness, outerR+small, spaceH+clipH+freeH+small]); } } } module notches() { for ( i = [0 : 45 : 360] ) { rotate( i, [0, 0, 1]) { notch(); } } } difference() { union() { cap(); clip(); fillet(); } notches(); }