Skip to content

Add custom solid rivet model contract - #59

Open
yuu0428 wants to merge 2 commits into
tscircuit:mainfrom
yuu0428:feat/solid-rivet-model
Open

yuu0428 wants to merge 2 commits into
tscircuit:mainfrom
yuu0428:feat/solid-rivet-model

Conversation

@yuu0428

@yuu0428 yuu0428 commented Oct 8, 2026

Copy link
Copy Markdown

Adds the solidrivet parameter contract requested in #13 (item 0036): an unset solid cylindrical shank, spherical-cap head, and flat tail with explicit dimensions. Both the roadmap string and value-free head/tail/state flags resolve to the same strict, millimeter-normalized definition. The bearing-plane datum and derived head-sphere dimensions are documented for renderer integration.

The change adds one model folder, parameter tests, and its contract documentation. Registry discovery handles public exports and the model union. There are no meshes, renderer dependencies, generated files, or changes to existing models.

Validation on macOS:

  • New contract: 5 tests pass, including roadmap/flag equivalence, unit normalization, head geometry, invalid dimensions, duplicate tokens, and public schema integration.
  • Full suite on Bun 1.4.2 and 1.4.0: 92 pass, 1 fails. The same model-registration-07-generation.test.ts failure reproduces on untouched upstream ff02644c4a9b55bacfe63573c852d03c182a564f: Bun cannot import the temporary fixture's revision-2.ts. This PR does not modify that test or the registry generator.
  • bun run typecheck, bun run format:check, and bun run build pass.
  • Package dry-run and a Node ESM smoke test against the built package entrypoint pass.

Prepared and validated with OpenAI Codex assistance; no human code review is claimed. This implements the modelprinter contract only; geometry generation remains in jscad-electronics as required by the repository conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant