// Screw covers $fn = 16; // The hollow bit that goes in (this one for getting the size right module test_shaft() { linear_extrude(height=5) difference() { shape(); scale([0.9, 0.9]) shape(); } } // Actual shaft module shaft() { difference() { union() { linear_extrude(height=10) difference() { shape(); scale([0.85, 0.85]) shape(); }; prongs(); }; //ubeam(); }; } // The cutout for the springy prongs to sit on module ubeam() { translate([-1, -10, 1.35]) difference() { cube([4, 20, 5]); translate([0.5, -1, 0.5]) cube([3, 25, 5]); } } // The prongs to hold it in module prongs () { union() { translate([-0.5, -5.25, 2.75]) rotate([0, 90, 0]) difference() { cylinder(3, r=1); translate([-1, 0, -0.1]) cube([2, 2, 4]); }; translate([2.5, 5.25, 2.75]) rotate([0, 90, 180]) difference() { cylinder(3, r=1); translate([-1, 0, -0.1]) cube([2, 2, 4]); }; } } // The top bit to stop water getting in module cap() { linear_extrude(height=1) scale([1.5, 1.5]) shape(); } // The 2d shape of the hole module shape() { width = 11.75; height = 11.75; translate([-width / 2, -height / 2, 0]) difference() { square([width, height]); union() { translate([width - (sqrt(2) / 2), 0, 0]) rotate([0, 0, -45]) square([1, 1]); translate([width - (sqrt(2) / 2), height, 0]) rotate([0, 0, -45]) square([1, 1]); translate([0 - (sqrt(24.5) / 2), height, 0]) rotate([0, 0, -45]) square([3.5, 3.5]); translate([0 - (sqrt(24.5) / 2), 0, 0]) rotate([0, 0, -45]) square([3.5, 3.5]); }; } } // test_shaft(); union() { shaft(); cap(); }