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

32 lines
976 B
OpenSCAD

use <part_sun.scad>;
use <part_moon.scad>;
use <part_clock_outline.scad>;
use <part_min_lines.scad>;
use <part_hour_hexagons.scad>;
D=130; // dial radius in mm
$fn=180;
module face() {
difference(){
clock_outline(D);
union() {
translate([0,-D/3]) color("red") sun(D/18);
translate([0.5,D/3]) color("white") moon(D/7);
for(spot=[15:15:360]){
translate([sin(spot)*(D/6*5),cos(spot)*(D/6*5),0]) // position control with radius multiplier
color("black")
rotate([0,0,180]) // sets 12 on top by rotating the dial
text(str(spot/15), size = D/10, halign = "center", valign = "center", font = "Isonorm:style=Regular");
}
// Hour dots (dial, radius depth)
hour_hexagons(D,4);
// Minute lines
min_lines(D);
}
}
}
difference() {
circle(D);
face();
}