Skip to content

Replace model geometry enums with boolean flags - #117

Merged
seveibar merged 1 commit into
mainfrom
codex/boolean-model-flags-20261010
Oct 11, 2026
Merged

seveibar merged 1 commit into
mainfrom
codex/boolean-model-flags-20261010

Conversation

@seveibar

@seveibar seveibar commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Geometry, placement, and handedness selectors now use bare flags and boolean JSON properties across 23 existing models. For example, plainbushing_id8mm_od12mm_l20mm_plainclosed resolves to plainClosed: true, while hexbolt_m4_l20mm_hex_fullthread_lefthanded exposes hex, fullThread, and leftHanded booleans.

This removes the old enum selector tokens and JSON properties for bushings, extrusion profiles, screw drives, mounting styles, spring construction, gasket/strip profiles, gear handedness, FlexScreen placement, NEMA geometry/wire modes, and sheet metal forms/hole shapes. Repeated, valued, and conflicting flags are rejected. Defaults, dimensions, catalog/standard identifiers, and coordinate arguments retain their meanings. The flag-to-enum expansion hooks are removed.

Validation: 301 tests pass, including standalone retired-selector rejection, direct-parser boundaries, boolean defaults/schema roundtrips, and conflicts. bun run typecheck, bun run format:check, and bun run build pass.

Paired renderer PR: tscircuit/jscad-electronics#501

@seveibar
seveibar merged commit 4bed1ae into main Oct 11, 2026
3 checks passed
@tscircuitbot

Copy link
Copy Markdown

Thank you for your contribution! 🎉

PR Rating: ⭐
Impact: Tiny

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

2 participants