Created
July 27, 2017 00:29
-
-
Save ednisley/6b0489aaaed305fe65e981fc7888b681 to your computer and use it in GitHub Desktop.
OpenSCAD source code: Replacement shade for torchiere lamp with LED bulb -- not for incandescent lamps!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Torchiere Lamp Shade | |
// Ed Nisley KE4ZNU - July 2017 | |
/* [Build] */ | |
Section = false; | |
Shorten = false; | |
//- Extrusion parameters - must match reality! | |
/* [Hidden] */ | |
ThreadThick = 0.25; | |
ThreadWidth = 0.40; | |
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit); | |
Protrusion = 0.01; | |
HoleWindage = 0.2; | |
//- Dimensions | |
ID = 0; | |
OD = 1; | |
LENGTH = 2; | |
/* [Dimensions] */ | |
ShadeThick = 1.2; // perpendicular thickness | |
BaseAngle = 42; // lamp base angle wrt vertical | |
BaseTopDia = 131.0; // lamp ID at top | |
ShadeBaseThick = 6*ThreadThick; // horizontal bottom thickness | |
SeatDepth = 10.0 + ShadeBaseThick; // shade bottom to base top | |
SeatDia = BaseTopDia - 2* SeatDepth / tan(BaseAngle); // lamp ID at seating depth | |
ShadeTopDia = 180.0; // top OD, limited by printer platform width | |
ShadeHeight = 90.0; // height above lamp base | |
ShadeHoleDia = 36.0; // central hole dia | |
ShadeAngle = atan(ShadeHeight / ((ShadeTopDia - BaseTopDia)/2)); | |
echo(str("Shade angle: ",ShadeAngle)); | |
ShadeHThick = ShadeThick / sin(ShadeAngle); | |
echo(str(" horiz thickness:",ShadeHThick)); | |
NumSides = 6*4; | |
$fn = NumSides; | |
//- Build it | |
render(convexity=2) | |
difference() { | |
union() { | |
cylinder(d1=SeatDia,d2=BaseTopDia,h=SeatDepth); // section within lamp base | |
translate([0,0,SeatDepth]) | |
cylinder(d1=BaseTopDia,d2=ShadeTopDia,h=ShadeHeight); | |
} | |
translate([0,0,SeatDepth]) // inside of upper shade | |
cylinder(d1=BaseTopDia - 2*ShadeHThick, | |
d2=ShadeTopDia - 2*ShadeHThick, | |
h=ShadeHeight + Protrusion); | |
translate([0,0,ShadeBaseThick]) // seating base | |
cylinder(d1=SeatDia - 2*ShadeHThick, | |
d2=BaseTopDia - 2*ShadeHThick, | |
h=SeatDepth - ShadeBaseThick + Protrusion); | |
translate([0,0,-Protrusion]) // socket clearance | |
cylinder(d=ShadeHoleDia,h=2*ShadeHeight); | |
if (Section) | |
translate([0,-ShadeTopDia,0]) | |
cube(2*ShadeTopDia,center=true); | |
if (Shorten > 0) | |
translate([0,0,(ShadeTopDia + 2*SeatDepth)]) | |
cube(2*ShadeTopDia,center=true); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details on my blog at http://wp.me/poZKh-6WA