Arithmos · Volume 4

Arithmos — Designing It in Script

Arithmos was not drawn with a mouse. The entire model — enclosure, windows, drums, engraving, gears, bench rig — was produced by Python scripts talking to the CAD application through a local connector, one command at a time. The scripts live with the project in 03-outputs/ and can be re-run. That choice shaped the design more than any single dimension did, and it introduced a category of failure that a mouse-driven workflow does not have.

Figure 1 — The ten-tooth pinion for the bench rig, isolated. It is cut by the same rotate-cut-rotate pattern used for the digits: one cutter block, positioned once, then rotated 36 degrees between cuts. Final…
Figure 1 — The ten-tooth pinion for the bench rig, isolated. It is cut by the same rotate-cut-rotate pattern used for the digits: one cutter block, positioned once, then rotated 36 degrees between cuts. Final volume 1.5761 cubic centimetres, against a prediction of 1.57. — CAD render from the project's own Fusion 360 model (03-outputs/).

4.1 Components first, always

The project’s first standing rule is that geometry is built inside a named component from the start, never created loose and wrapped into a component afterwards. The sequence is fixed: create the component, create the body inside it, and pass the component name on every subsequent call so that lookups are correctly scoped.

This is not tidiness. Wrapping an existing body into a component after the fact introduces positional ambiguity between the body’s own frame and the component’s, and the project traced two sessions of geometry errors to exactly that. The rule exists because the cost was paid.

The same scoping requirement bites elsewhere. A boolean operation between a target body inside a component and a cutting tool sitting at the document root silently does nothing — it reports success and produces no change. The tool body has to be moved into the target’s component first.

4.2 Parametric in practice

Scripting makes some things almost free. A drum is defined by five constants — diameter, width, bore, text height, cut depth — and a loop over ten digits. Changing the drum diameter changes the engraving plane position, the cut geometry, and the assembly spacing together, because they are all derived from the same constant rather than typed in three places.

The bench rig was written the same way, and idempotently: re-running the build script on an existing rig checks for each component and skips what already exists rather than duplicating it. The tooth-cutting script goes further and checks the pinion’s volume before starting, bailing out if the volume already indicates that teeth have been cut. That idempotence is what made three rounds of layout revision affordable.

Predicted volumes are used as assertions. The untoothed pinion should be 2.287 cubic centimetres; ten tooth cuts should remove about 0.72; the result should be near 1.57. The measured result was 1.5761. When a cut is correct, the number confirms it. When a cut is wrong, the number is the only thing that says so.

4.3 The failure mode scripting introduces

A mouse-driven CAD session fails loudly. A click on the wrong face produces visibly wrong geometry. A scripted session can fail silently, and the project accumulated a small catalogue of exactly that.

The connector, in the version in use for most of the work, dropped parameters it did not recognise instead of rejecting them. Three separate incidents followed from that one behaviour.

The rotation command’s pivot parameter was named pivot; a script passed center. The unknown key was discarded and the command fell back to rotating each body about its own bounding-box centre. Ten tooth cutters, which should have been swung around the pinion axis to sit at 36-degree intervals, each spun in place instead. All ten then cut the same spot. The operation reported success and removed 0.091 cubic centimetres where 0.72 was expected — the volume check is the only reason it was caught.

The appearance command had the same shape of problem. A script had been setting acrylic panels to a clear appearance using the wrong parameter name; the command returned the body’s current appearance in its response, which looked like confirmation. The side windows had been opaque for nine sessions before anyone noticed.

A cut that produces no intersection is the third. The connector reported success, did nothing to the target, and left the cutting tool body alive in the document, silently accumulating debris.

4.4 Turning silent failures into loud ones

The response was to fix the connector rather than the scripts. Three guardrails were added at the handler level. Unknown parameters now produce a hard error carrying both the list of available parameters and the offending keys, with center retained as a deprecated alias that emits a warning rather than being discarded. A cut that finds no intersection now cleans up its own tool bodies and flags the result with an explicit warning, so the message becomes “your cutter did not touch the target” rather than “success”. And screenshots gained the ability to isolate a set of bodies and restore the previous visibility afterwards, because the existing framing option only aimed the camera and left everything else visible — which is why several earlier verification screenshots show a mechanism as a speck in the middle of a wooden base.

All three were smoke-tested. The pattern is worth stating generally: when a tool silently accepts a mistake, the fix belongs in the tool, because every script written against it will make the same mistake eventually.

4.5 Tolerances for printed gears

The tolerance thinking in the project is mostly implicit in the architecture rather than stated as numbers, and that is deliberate. Because the sautoir keeps the two drums mechanically independent for nine tenths of every revolution, the design does not need a tolerance budget for meshing gears. It needs one clearance to be right — the height at which the finger meets the arm — and one engagement to be repeatable.

Where explicit clearances do appear, they are generous by machining standards and modest by printing standards. The pinion is placed 1 mm clear of the tens drum face. The shafts are sized to overlap their support plates by half a millimetre so that the shaft visibly enters the plate rather than merely touching it. The acrylic panels sit 1 mm into a rabbet and protrude 2 mm into the interior, so the fit is against a shoulder rather than into a slot.

The pinion teeth themselves are not a gear profile at all. They are ten rectangular grooves 3 mm wide and 3 mm deep, producing a lantern-style pin wheel. The script that cuts them says so explicitly and calls it a placeholder: for a bench test, the arm needs discrete catch points at 36-degree intervals, not an involute tooth form. Whether that placeholder ever became the plan is one of the questions volume six takes up.

The one anticipated print problem is stated directly in the export manifest. A 0.5 mm leaf spring printed in plastic is expected to be too compliant, and a music-wire substitute is planned.

Comments (0)

  1. Loading…

Comments are held for moderation — nothing appears until approved.