Repository navigation
Support independent and nested PCB bend axes - #7
Merged
Merged
Conversation
This was referenced Oct 2, 2026
Collaborator
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
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.
Finite bends on separate PCB arms are currently rejected whenever their moving directions differ. Allow independent regions to fold about different axes, and allow a nested fold to move with its parent's rigid distal region. This supports both the two outward arms and the original body-moving arrangement from tscircuit#5277.
Derive fold order from finite moving-region containment: fold children first, then carry them with their parents. A nested region must lie entirely beyond its parent's curved strip. Edge-aware polygon containment handles concave outlines. Partially overlapping regions, equal regions, and intersecting curved strips still return typed folding errors. Calls without a board outline retain the parallel, same-moving-direction requirement.
The existing point, direction, inverse CAD, surface, and rigid-mesh transforms are reused. Geometry does not depend on record order, endpoint direction, or outline winding. The original fixture's vertical
bend_side: "left"deliberately moves the main body; its snapshot preserves that direction and shows the right tip staying fixed.Validation: all 32 tests pass (2,029 assertions), including existing visual baselines, parallel serial folds, opposite moving directions, negative angles, rigid forward/inverse transforms, incompatible intersections, and concave containment. TypeScript, build, formatting, and diff checks pass. Three new PNG snapshots use the existing
toMatchPngSnapshot/PoppyGL conventions and were visually inspected. No README changes.Independent arms:
Original body-moving arrangement:
Full GitHub CI passes for the source commit, including tests, typecheck, and build. Downstream consumer PRs use immutable built preview
dbe07e49220c40ec3f0109b7d566561ce5e58bc9until this helper is merged and released.