use ; use ; /* Use with other parts from Dewalt_Lithium_20VMax_to_RYOBI_One+_18_volt_Adapter_/ but this part replaces the RYOBI end with a lampholder */ $fn=50; length = 95; angle = 30; switchH = 75; cableHoleH = 45; ovality = 0.76; holeSize = 4.2; union() { translate([14.8,10,10]) render() difference() { // Chop the top off import("18V_Top_V3.stl"); Tz(30) cube(80, center=true); // notch the front edge to stop it protruding inside Rx(angle) Tx(-14.8) Ty(-20) Tz(-10) cylinder(d=25, h=50); // Enlarge the screw holes Ty(2.05-10) Tx(22.6-14.8) cylinder(d=holeSize,h=100, center=true); Ty(-34.6-10) Tx(22.6-14.8) cylinder(d=holeSize,h=100, center=true); Ty(2.05-10) Tx(-23.05-14.8) cylinder(d=holeSize,h=100, center=true); Ty(-34.6-10) Tx(-22.7-14.8) cylinder(d=holeSize,h=100, center=true); } // Slanting Neck Ty(1.0) Tz(-9) Rx(angle) scale([ovality,1,1]) union() { difference() { cylinder(d=35.6, h=length, $fn=150); cylinder(d=25, h=2*length+1, center=true); //cable hole Tz(cableHoleH) Rx(60) scale([1/ovality,1,1]) // Invert the X scaling so it ends up round cylinder(d=7, h=100); // switch hole //color("red") Tz(switchH) Ty(15) cube([8.5/ovality,30,14], center=true); // Switch Recess Tz(switchH) Ty(25) cube([13/ovality,20,18], center=true); // Switch lip Tz(switchH) Ty(8.5) cube([8.5/ovality,10,20], center=true); } Tz(length) difference() { // Ball end sphere(d=35.6, $fn=150); Tz(-25-8) // chop off bottom cube(50, center=true); Tz(25+5) // Slot for light cube([50,12,50], center=true); // Screw hole (use 4mm OD wood screw with washer) scale([1/0.76,1,1]) // Invert the X scaling so it ends up round cylinder(d=3.5, h=100, center=true); // strengthening slots around screw color("red") for (i = [0:4]) { Rz(i*180/5) cube([0.05,12,30], center=true); } } } // fill the RYOBI clip holes copy_mirror([1,0,0]) Tz(-17.65) Ty(-17) Tx(24.7) cube([12,30,6], center=true); } // screw length check // Screw needs 5.4 mm in this section. * color("red") Tx(20) Tz(-20.65) cylinder(d=4,h=5.4);