Files
home/light-shades/courtyard-light-shade-r3.scad
T

61 lines
1.6 KiB
OpenSCAD

$fn = 100;
base_height = 4;
total_height = 80;
top_height = (47 / 2) + 3;
epsilon = 0.01;
difference() {
union() {
translate(v=[0, 0, base_height / 2]) {
cylinder(h=base_height, d=61, center=true);
}
translate(v=[30.5, 0, base_height / 2]) {
cylinder(h=base_height, d=12, center=true);
}
translate(v=[-30.5, 0, base_height / 2]) {
cylinder(h=base_height, d=12, center=true);
}
difference() {
translate(v=[0, 0, (total_height - top_height) / 2]) {
cylinder(h=total_height - top_height, d=53, center=true);
}
union() {
translate(v=[0, -30.5, 30.5 + base_height]) {
rotate(a=[0, 90, 0]) {
cylinder(h=100, r=30.5, center=true);
}
}
translate(v=[0, -50, 50 + 30.5 + base_height]) {
cube(100, center=true);
}
}
}
}
union() {
translate(v=[0, 0, 45]) {
cylinder(h=100, d=47, center=true);
}
translate(v=[31, 0, base_height / 2]) {
cylinder(h=base_height + epsilon, d=4.5, center=true);
}
translate(v=[-31, 0, base_height / 2]) {
cylinder(h=base_height + epsilon, d=4.5, center=true);
}
}
}
difference() {
translate(v=[0, 0, total_height - top_height]) {
sphere(d=53);
}
translate(v=[0, 0, total_height - top_height]) {
sphere(d=47);
}
translate(v=[0, -60, total_height]) {
cube(120, center=true);
}
translate(v=[0, 0, total_height - top_height - 60]) {
cube(120, center=true);
}
}