|
// Mounting brackets for eShine under-counter LED lights |
|
// Ed Nisley KE4ZNU December 2016 |
|
|
|
//- Extrusion parameters must match reality! |
|
|
|
ThreadThick = 0.25; |
|
ThreadWidth = 0.40; |
|
|
|
HoleWindage = 0.2; |
|
|
|
Protrusion = 0.1; // make holes end cleanly |
|
|
|
inch = 25.4; |
|
|
|
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit); |
|
|
|
//———- |
|
// Dimensions |
|
|
|
MountHeight = (1 + 3/16) * inch – 5.0; // under-cab space – base thickness |
|
|
|
THREADOD = 0; |
|
HEADOD = 1; |
|
LENGTH = 2; |
|
|
|
WoodScrew = [4.0,8.3,41]; // 8×1-5/8 Deck screw |
|
WoodScrewRecess = 2.0; |
|
|
|
LEDScrew = [2.0,4.5,8.0]; // M2.5×10 SHCS |
|
|
|
LEDScrewOffset = [1.0,8.2,0]; // hole offset from center point |
|
JoinerLength = 18.1; // joiner between strips |
|
|
|
EndBlock = [11.0,28.5,MountHeight]; // mounting block size for ends |
|
|
|
//———————- |
|
// Useful routines |
|
|
|
module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes |
|
Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2); |
|
FixDia = Dia / cos(180/Sides); |
|
cylinder(d=(FixDia + HoleWindage),h=Height,$fn=Sides); |
|
} |
|
|
|
// End mounting block with proper hole offsets |
|
|
|
module EndMount(Side = "L") { |
|
|
|
LSO = [((Side == "L") ? 1 : -1)*LEDScrewOffset[0],LEDScrewOffset[1],LEDScrewOffset[2]]; |
|
|
|
difference() { |
|
union() { |
|
cube(EndBlock,center=true); |
|
translate([0,1.5*WoodScrew[1],0]) |
|
cube(EndBlock,center=true); |
|
} |
|
|
|
translate(LSO + [0,0,-EndBlock[2]]) |
|
rotate(180/4) |
|
PolyCyl(LEDScrew[THREADOD],2*EndBlock[2],4); |
|
|
|
translate([0,(EndBlock[1] + 1.5*WoodScrew[1])/2,-EndBlock[2]]) |
|
rotate(180/6) |
|
PolyCyl(WoodScrew[THREADOD],2*EndBlock[2],6); |
|
|
|
translate([0,(EndBlock[1] + 1.5*WoodScrew[1])/2,(EndBlock[2]/2 – WoodScrewRecess)]) |
|
rotate(180/6) |
|
PolyCyl(WoodScrew[HEADOD],WoodScrewRecess + Protrusion,6); |
|
|
|
translate([((Side == "L") ? 1 : -1)*EndBlock[0]/2,0,0]) |
|
rotate([90,0,((Side == "L") ? 1 : -1)*90]) |
|
translate([0,0,-2*ThreadThick]) |
|
linear_extrude(height=4*ThreadThick,convexity=3) |
|
text(Side,font=":style=bold",valign="center",halign="center"); |
|
} |
|
} |
|
|
|
module MidMount() { |
|
XOffset = (JoinerLength + EndBlock[0])/2; |
|
|
|
union() { |
|
translate([XOffset,0,0]) |
|
EndMount("L"); |
|
|
|
cube([JoinerLength,EndBlock[1],EndBlock[2]] + [2*Protrusion,0,0],center=true); |
|
|
|
translate([-XOffset,0,0]) |
|
EndMount("R"); |
|
} |
|
} |
|
|
|
//———- |
|
// Build them |
|
|
|
translate([0,0,EndBlock[2]/2]) { |
|
translate([-(JoinerLength + 2*EndBlock[0]),0,0]) |
|
EndMount("L"); |
|
|
|
|
|
MidMount(); |
|
|
|
translate([(JoinerLength + 2*EndBlock[0]),0,0]) |
|
EndMount("R"); |
|
} |