fix minute and hour mark alignments, update svg
Hour marks were off, now fixed
This commit is contained in:
parent
6cc72a3b79
commit
060f74cb3c
62
clock.scad
62
clock.scad
@ -1,30 +1,32 @@
|
||||
use <part_sun.scad>;
|
||||
use <part_moon.scad>;
|
||||
use <part_clock_outline.scad>;
|
||||
use <part_min_lines.scad>;
|
||||
use <part_hour_hexagons.scad>;
|
||||
|
||||
D=16; // dial size in cm
|
||||
$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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
face();
|
||||
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();
|
||||
}
|
1973
clock.svg
1973
clock.svg
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 199 KiB |
@ -1,8 +1,9 @@
|
||||
module clock_outline(D) {
|
||||
difference(){
|
||||
color("burlywood")
|
||||
circle(D);
|
||||
circle(d=0.7);
|
||||
}
|
||||
}
|
||||
//clock_circle(12);
|
||||
$fn=180;
|
||||
module clock_outline(R) {
|
||||
difference(){
|
||||
color("orange")
|
||||
circle(R);
|
||||
circle(d=7.8); // hole for clockwork stem
|
||||
}
|
||||
}
|
||||
clock_outline(130);
|
@ -1,11 +1,11 @@
|
||||
module hour_hexagons(D,spacing) {
|
||||
for(dot=[0:15:360]){
|
||||
$fn=6;
|
||||
translate([sin(dot)*(D/6*spacing),cos(dot)*(D/6*spacing),0])
|
||||
color("black")
|
||||
rotate([0,0,30-dot])
|
||||
circle(D/24);
|
||||
}
|
||||
}
|
||||
|
||||
hour_hexagons(16,4.5);
|
||||
module hour_hexagons(D,spacing) {
|
||||
for(dot=[0:15:360]){
|
||||
$fn=6;
|
||||
translate([sin(dot)*(D/6*spacing),cos(dot)*(D/6*spacing),0])
|
||||
color("black")
|
||||
rotate([0,0,30-dot])
|
||||
circle(d=7.6); // width of the hour hand
|
||||
}
|
||||
}
|
||||
//D=130;
|
||||
//hour_hexagons(D,4.5);
|
@ -1,22 +1,23 @@
|
||||
|
||||
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,-0.3,0])
|
||||
square([D/divisor,D/divisor*3], center=false);
|
||||
}
|
||||
else {
|
||||
divisor = 60;
|
||||
square([D/divisor,D/divisor*3], center=false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
min_lines(16);
|
||||
|
||||
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);
|
Loading…
Reference in New Issue
Block a user