$fn = 36; part = "front"; module gear(teeth, m=1.5, h=4, col="#c4b49a") { pitch_r = m*teeth/2; color(col) linear_extrude(h) { circle(r=pitch_r-1.1); for (i=[0:teeth-1]) rotate(i*360/teeth) translate([pitch_r-0.2,0]) square([2.4, max(0.8, 3.14*m*0.7)], center=true); } color(col) cylinder(d=6, h=h+2); } module clock() { // frame color("#5a5048") difference() { translate([0,0,-3]) linear_extrude(6) offset(r=6) square([90,110], center=true); translate([0,0,-4]) linear_extrude(8) offset(r=4) square([78,98], center=true); } // going train translate([0,20,0]) gear(36, 1.5, 3, "#d0b48a"); // minute / centre translate([0,20,6]) color("#e8e0d0") { cube([2, 28, 0.8], center=true); } // minute hand translate([0,20,7]) rotate(30) color("#e8e0d0") cube([1.6, 18, 0.8], center=true); // hour translate([27,20,0]) gear(12, 1.5, 3, "#b0a090"); translate([27,-7,0]) gear(18, 1.5, 3, "#c4b49a"); translate([0,-20,0]) gear(20, 1.5, 3, "#a09080"); // escape wheel stand-in // escapement pallet color("#d8c8b0") translate([0,-34,2]) cube([18, 4, 2], center=true); } clock();