Repository navigation
Emit wire harness drawings from TSX - #5792
Merged
Merged
Conversation
- assembly.cable emits its build length, tolerance and connector designators, and assembly.cablewire children become cad_cable_wire records with pins validated against the cable's connectors. - A wired cable's BOM line gains children for its wire, housings and crimp contacts. - assembly.drawing.harnessview emits drawing_wiring_harness_view, with drawing_balloon callouts when showBalloons is set. - assembly.drawing.wiringtable and assembly.drawing.bomtable resolve to drawing_table and drawing_table_cell records. Updates circuit-json to 0.0.559 for these elements and the drawing converter used by tests to 0.0.7, which renders them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P5Dw8uDxsoYbX4gqKk2QNf
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Resolves conflicts in package.json (keeps main's dependency versions and the circuit-json-to-drawing 0.0.7 bump) and resolve-assembly-cable.ts. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P5Dw8uDxsoYbX4gqKk2QNf
Contributor
Author
|
CI status on the merge commit
Typecheck, format check, class exports, smoke test and dependency check pass. Locally, all 137 Generated by Claude Code |
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P5Dw8uDxsoYbX4gqKk2QNf
This was referenced Nov 24, 2026
Contributor
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This branch was successfully deployed
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.
Lets a wire harness (cable manufacturing) sheet be defined in TSX. Core now emits the records added in tscircuit/circuit-json#1023 from the props added in tscircuit/props#1030; tscircuit/circuit-json-to-drawing#14 renders them.
[Harness sheet rendered from TSX](
https://raw.githubusercontent.com/tscircuit/core/0822b950f28d8830b5384ba60200afcd2f083124/tests/assembly/__snapshots__/assembly-drawing-harness.snap.svg)What core emits
assembly.cablewritesnominal_length,length_tolerance,from_connector_nameandto_connector_nameonto itscad_cable.assembly.cablewire(new) becomes onecad_cable_wireper child, in from-pin order, inheritingwireAwgfrom the cable. Pins beyond a connector's contact count and two wires on one pin are errors.cad_assembly_bom_itemgains children: wire by gauge and colour (counted in cut pieces), each end's housing, and one crimp contact per wire end. Identical lines merge. An unwired cable stays a single line.assembly.drawing.harnessview(new) becomes adrawing_wiring_harness_view. It takes part inleftOfRef/aboveRefplacement with the other views.showBalloonsadds threedrawing_balloonrecords whose texts are the item numbers in the cable's parts list on the same page.assembly.drawing.wiringtableandassembly.drawing.bomtable(new) resolve todrawing_tableplusdrawing_table_cellrecords with final text, column widths and row heights. The wiring list adds SIGNAL, COLOR and AWG columns only for attributes some wire states. A parts list anchored at its bottom edge lists rows upward from its heading.A page is still validated completely before any of its records are inserted.
Dependency changes
@tscircuit/circuit-json-to-drawing(dev) 0.0.6 → 0.0.7, the release that renders harness views. No existing drawing snapshot changed.DrawingRendernow also waits forCadAssemblyBomRender, since parts lists read BOM records.Notes for review
adaptercable_a(jst_ph_pins6)_b(jst_ph_pins4), which cableprinter rejects, and core rejects mismatched inferred endpoints. This PR does not change that, so the example uses 6-position housings at both ends.docs/assembly-bom.mdsays local quantity is always 1; wired cables now add child lines with larger quantities. Docs are not touched in this PR.cableRef/partRefaccept a bare name (MOTOR_CABLE) as well as a selector.drawing_page_notehas no harness-view-relative mode.tests/assemblylocally (137 files pass; two heavy 3D tests only time out when the whole folder runs in parallel here and pass alone). The rest of the suite is left to CI.https://claude.ai/code/session_01P5Dw8uDxsoYbX4gqKk2QNf
Generated by Claude Code