[WIP] leightweight lighthouse
This commit is contained in:
parent
89a33df7ff
commit
5011c762a5
2 changed files with 115 additions and 0 deletions
70
lighthouse.scad
Normal file
70
lighthouse.scad
Normal file
|
@ -0,0 +1,70 @@
|
|||
$fn=360;
|
||||
|
||||
LAYER = 1;
|
||||
CONNECTOR = false;
|
||||
BASE_LAYER_DIAMETER = 140;
|
||||
LAYER_HEIGHT = 125;
|
||||
LAYER_SHRINK = 10;
|
||||
CONNECTOR_RING_GROOVE_DEPTH = 0.5;
|
||||
|
||||
module layer(d) {
|
||||
difference() {
|
||||
cylinder(h=LAYER_HEIGHT, d1=d, d2=d-LAYER_SHRINK);
|
||||
cylinder(h=LAYER_HEIGHT, d1=d-1, d2=d-LAYER_SHRINK-1);
|
||||
}
|
||||
}
|
||||
|
||||
module layer_connector(d) {
|
||||
difference() {
|
||||
cylinder(h=3*CONNECTOR_RING_GROOVE_DEPTH, d=d+2, center=true);
|
||||
cylinder(h=3*CONNECTOR_RING_GROOVE_DEPTH, d=d-3, center=true);
|
||||
translate([0, 0, CONNECTOR_RING_GROOVE_DEPTH/2]) layer(d);
|
||||
translate([0, 0, -125-CONNECTOR_RING_GROOVE_DEPTH/2]) layer(d+LAYER_SHRINK);
|
||||
}
|
||||
}
|
||||
|
||||
module base(d) {
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
cylinder(h=LAYER_HEIGHT/10, d=d+3*LAYER_SHRINK);
|
||||
translate([0, 0, LAYER_HEIGHT/10-CONNECTOR_RING_GROOVE_DEPTH])
|
||||
cylinder(h=LAYER_HEIGHT, d1=d, d2=d-LAYER_SHRINK);;
|
||||
}
|
||||
intersection() {
|
||||
cylinder(h=LAYER_HEIGHT, d1=d-1, d2=d-LAYER_SHRINK-1);
|
||||
cylinder(h=LAYER_HEIGHT/5, d=d+3*LAYER_SHRINK);
|
||||
}
|
||||
}
|
||||
cylinder(h=LAYER_HEIGHT, d=d-LAYER_SHRINK, center=true);
|
||||
}
|
||||
}
|
||||
|
||||
module brim(d) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
module lightroom(d) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
module light(d) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
module roof(d) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
D = BASE_LAYER_DIAMETER - (LAYER-1) * LAYER_SHRINK;
|
||||
|
||||
if (CONNECTOR) {
|
||||
if (LAYER == 1) base(D);
|
||||
if ((LAYER >= 2) && (LAYER <= 4)) layer_connector(D);
|
||||
if (LAYER == 5) brim(D);
|
||||
if (LAYER == 6) roof(D);
|
||||
} else {
|
||||
if ((LAYER >=1) && (LAYER <=4)) layer(D);
|
||||
if (LAYER == 5) lightroom(D);
|
||||
if (LAYER == 6) light(D);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue