Repository navigation
fix: preserve flex rendering with shared fold diagnostics - #4279
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
seveibar
force-pushed
the
fix/flex-render-errors
branch
from
October 1, 2026 22:00
bec340c to
c276ab6
Compare
This was referenced Oct 1, 2026
Merged
seveibar
marked this pull request as draft
October 2, 2026 01:03
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.
Nonparallel PCB bends and CAD mounts inside bend zones currently abort
renderUntilSettled()or 3D export. Emitpcb_placement_errorrecords and preserve flat placements for these declared folding limitations so PCB, schematic, and 3D output remain available.Board construction uses flex-utils' explicit folding result. CAD placement handles only
PcbFoldError; unexpected failures propagate. An unsupported board keeps its CAD flat, while an invalid rigid mount stays flat and other valid mounts still fold. The shared helper covers footprint models, bounding boxes, and child<cadmodel>elements. Surface deformation, rigid meshes, and stiffener fallback remain in the shared exporter.The standard
toMatch3dSnapshot/PoppyGL regressions enable the exporter'sshowErrorsoption. GLTF stores full Circuit JSON messages in renderer-neutral scene metadata. The snapshot matcher forwards the exporter's adapter options to publishedpoppygl@0.0.29, which draws the messages through its existingdebugPointslabels. The adapter uses the current camera to place readable rows on screen, including errors without coordinates. Circuit geometry, camera and bounds are preserved. The PCB snapshot enablesshowBendLinesand shows both finite bend segments with 0.5 mm BEND LINE labels. The underside close-up still checks the flat stiffener directly.Uses published
@tscircuit/flex-utils@0.0.7,poppygl@0.0.29,circuit-json-to-gltf@0.0.139, andcircuit-to-svg@0.0.437. GLTF #231 and SVG #803 are merged and released. Both rendering options default to false.Addresses items 2 and the rendering exception in item 3 of tscircuit#5277. Bend-zone DRC is covered separately by checks #370; independent nonparallel physical folds remain unsupported.
The released SVG renderer also includes upstream SVG #795 and SVG #796. Three existing schematic snapshots are refreshed with the already-reviewed paint order and selected-sheet framing; symbol positions and geometry are unchanged. The final published-version update adds only the bend labels to the PCB baseline; the 3D and schematic baselines are unchanged from the tested previews.
Validation: all 10 PCB-flex tests, 10 adjacent CAD tests across seven files, and all three affected schematic regressions pass (23 tests, 230 assertions). TypeScript, build, formatting, and installation with scripts disabled pass. Repeated settled renders preserve Circuit JSON and do not duplicate diagnostics. New PCB and 3D snapshots were visually inspected. The unexpected-error regression verifies that ordinary failures propagate. Actual GLB messages are rendered through the published PoppyGL API.
Full CI passes on the published renderer versions and refreshed PCB snapshot: all ten test shards, TypeScript, formatting, dist smoke tests, package preview, continuous releases, and Vercel.