24hWallClock/part_min_lines.scad
2023-07-29 21:23:34 +00:00

23 lines
616 B
OpenSCAD

module min_lines(D) {
divisor=60;
len=D/20;
Dist=D-len;
for(dot=[0:6:360]){
translate([sin(dot)*Dist,cos(dot)*Dist,0])
color("black")
rotate([0,0,-dot]) // negative z rotates towards outer circle
if (dot % 90 == 0){
divisor = 30;
translate([0,D/divisor,0]) // h
square([D/divisor,D/divisor*4], center=true);
}
else {
divisor = 60;
translate([0,D/divisor*2,0]) // min
square([D/divisor,D/divisor*4], center=true);
}
}
}
min_lines(240);