fix minute and hour mark alignments, update svg

Hour marks were off, now fixed
This commit is contained in:
Artur Kerge 2023-07-29 21:23:34 +00:00
parent 6cc72a3b79
commit 060f74cb3c
5 changed files with 156 additions and 1963 deletions

View File

@ -4,7 +4,7 @@ use <part_clock_outline.scad>;
use <part_min_lines.scad>; use <part_min_lines.scad>;
use <part_hour_hexagons.scad>; use <part_hour_hexagons.scad>;
D=16; // dial size in cm D=130; // dial radius in mm
$fn=180; $fn=180;
module face() { module face() {
@ -26,5 +26,7 @@ module face() {
} }
} }
} }
difference() {
circle(D);
face(); face();
}

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

View File

@ -1,8 +1,9 @@
module clock_outline(D) { $fn=180;
module clock_outline(R) {
difference(){ difference(){
color("burlywood") color("orange")
circle(D); circle(R);
circle(d=0.7); circle(d=7.8); // hole for clockwork stem
} }
} }
//clock_circle(12); clock_outline(130);

View File

@ -4,8 +4,8 @@ module hour_hexagons(D,spacing) {
translate([sin(dot)*(D/6*spacing),cos(dot)*(D/6*spacing),0]) translate([sin(dot)*(D/6*spacing),cos(dot)*(D/6*spacing),0])
color("black") color("black")
rotate([0,0,30-dot]) rotate([0,0,30-dot])
circle(D/24); circle(d=7.6); // width of the hour hand
} }
} }
//D=130;
hour_hexagons(16,4.5); //hour_hexagons(D,4.5);

View File

@ -9,14 +9,15 @@ module min_lines(D) {
rotate([0,0,-dot]) // negative z rotates towards outer circle rotate([0,0,-dot]) // negative z rotates towards outer circle
if (dot % 90 == 0){ if (dot % 90 == 0){
divisor = 30; divisor = 30;
translate([0,-0.3,0]) translate([0,D/divisor,0]) // h
square([D/divisor,D/divisor*3], center=false); square([D/divisor,D/divisor*4], center=true);
} }
else { else {
divisor = 60; divisor = 60;
square([D/divisor,D/divisor*3], center=false); translate([0,D/divisor*2,0]) // min
square([D/divisor,D/divisor*4], center=true);
} }
} }
} }
min_lines(16); min_lines(240);