Add assembly and enclosure Circuit JSON elements#649
Draft
seveibar wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
source_assembly_devicefor product-level physical assembly identitysource_fdm_enclosurewith direct assembly and selected-board relationships plus normalized enclosure dimensionssource_cutout_aperturerecords owned by source componentscad_fdm_enclosurefor positioned enclosure CAD/JSCAD output without synthetic PCB component ownershipany_circuit_elementWhy
The parametric enclosure flow needs first-class Circuit JSON records instead of retaining assembly/enclosure intent only in the live React tree and emitting enclosure CAD through synthetic
source_componentandpcb_componentowners. These records make the product relationship and generated enclosure output explicit and serializable.Initial relationships and scope
source_fdm_enclosure.source_assembly_device_ididentifies the physical product.source_fdm_enclosure.source_board_idstores the resolved board relationship rather than a TSX selector.source_cutout_aperture.source_component_idkeeps aperture requirements part-owned.cad_fdm_enclosure.source_fdm_enclosure_idlinks generated CAD directly to its source enclosure.wall_thicknessis required; optional dimensions and construction parameters preserve authoring flexibility.rect,pill, andcirclecontracts.Developer impact
Renderers can emit and consume enclosure source/CAD records directly through
CircuitJsonandany_circuit_element. CAD consumers can use JSCAD, standard model URLs, ormodel_assetwithout fabricating ECAD ownership records.Validation
bun test(264 passing)bunx tsc --noEmitbun run buildbun run lint:zodbun run check-snake-casebunx biome format .bun run generate-docs