# Clock gears ## What this builds A small clock gear train and an optional escapement, modelled as code. Ratios (including a 60:1 path from minute to hour, or the documented equivalent) are checked. A stepped-angle mesh shows no illegal tooth interference. Axle and bore dimensions are measured. Assembly renders are written. Timekeeping on a wall is out of scope. Read `spekkr.inputs.json` first. `module` and `thickness` size the teeth. `bore` is the axle hole. `escapement` and `hands` add features. `tool` is the modeller. ## Out of scope - A wall-clock timekeeping test, or a real spring. - A physical print or a brass-cutting job. - A branded clockmaker's name. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Ratios and mesh - The tooth counts in `design.md` produce a 60:1 ratio from the minute shaft to the hour shaft, exact as a rational product. - At 1-degree steps of the fastest gear over 360 degrees, neighbouring teeth do not illegally intersect (a documented backlash gap stays non-negative, within 0.02 mm). - Each bore is `bore` within 0.05 mm, and each axle that is modelled is `bore - 0.2` within 0.05 mm. Accept when: the ratio is exact, the stepped mesh is clean, and bores and axles match. ### R2. Escapement, files, frames - If `escapement` is on, one impulse cycle (the angles in the file) shows the pallets and the escape wheel in the documented contact sequence, without a lock-up intersection. - Renders: the train, a mesh close-up, the escapement, and a full assembly. One command builds, steps, and writes the renders. No wall, no tick, no print. Accept when: the cycle matches, the command passes for both tools, and a missing-tooth fixture fails the ratio or the mesh. ### R3. Inputs - Numeric inputs are read from `spekkr.inputs.json` and must stay inside the ranges in the Inputs table in `design.md`. - A value outside a range is refused before modelling, with a message that names the key. - Options add or remove the features in that table. The `tool` swap selects CadQuery or OpenSCAD; both must meet the same numbers. Accept when: default and one out-of-range value are handled as above, and a second legal input set still matches the formulas in `design.md`. ### R4. Checks and report - One command builds the model at the defaults and at the person's inputs, measures it against `design.md`, and writes a short report. - A model broken on purpose, for example a wall thinner than `wall`, must fail the report. - The command exports the files this spec asks for (STL, and STEP when the tool can). No physical print is required. Accept when: the report says pass at the defaults and at the person's inputs, and fail on a deliberately broken model. ## Verification Gear ratios (including a 60:1 minute-to-hour path) are exact as tooth-count products. A stepped-angle mesh shows no illegal tooth interference. Axle and bore dimensions match the file. Assembly renders are written. Timekeeping on the wall is out of scope. No physical print is required. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to export the train, how the ratio is made, and that wall timekeeping is not a check.