From 060f74cb3cc0e2d45818fc724dbbf4d9c97f1cc0 Mon Sep 17 00:00:00 2001 From: Artur Kerge Date: Sat, 29 Jul 2023 21:23:34 +0000 Subject: [PATCH] fix minute and hour mark alignments, update svg Hour marks were off, now fixed --- clock.scad | 62 +- clock.svg | 1973 ++------------------------------------- part_clock_outline.scad | 17 +- part_hour_hexagons.scad | 22 +- part_min_lines.scad | 45 +- 5 files changed, 156 insertions(+), 1963 deletions(-) diff --git a/clock.scad b/clock.scad index 7d6f7a7..67e2651 100644 --- a/clock.scad +++ b/clock.scad @@ -1,30 +1,32 @@ -use ; -use ; -use ; -use ; -use ; - -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(); \ No newline at end of file +use ; +use ; +use ; +use ; +use ; + +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(); +} \ No newline at end of file diff --git a/clock.svg b/clock.svg index 33195d5..d010bf8 100644 --- a/clock.svg +++ b/clock.svg @@ -1,1893 +1,82 @@ - - - -OpenSCAD Model - + + + 24h Wall Clock + + + + + + + 24h Wall Clock + 2023-07-30 + + + Artur Kerge + + + + + CC BY 4.0 + + + + + + + + + + + + + diff --git a/part_clock_outline.scad b/part_clock_outline.scad index 2c88653..42f063b 100644 --- a/part_clock_outline.scad +++ b/part_clock_outline.scad @@ -1,8 +1,9 @@ -module clock_outline(D) { - difference(){ - color("burlywood") - circle(D); - circle(d=0.7); - } -} -//clock_circle(12); \ No newline at end of file +$fn=180; +module clock_outline(R) { + difference(){ + color("orange") + circle(R); + circle(d=7.8); // hole for clockwork stem + } +} +clock_outline(130); \ No newline at end of file diff --git a/part_hour_hexagons.scad b/part_hour_hexagons.scad index 6068e1c..905f8fd 100644 --- a/part_hour_hexagons.scad +++ b/part_hour_hexagons.scad @@ -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); \ No newline at end of file +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); \ No newline at end of file diff --git a/part_min_lines.scad b/part_min_lines.scad index ba84730..cecadd2 100644 --- a/part_min_lines.scad +++ b/part_min_lines.scad @@ -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); \ No newline at end of file + +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); \ No newline at end of file