feat: add SameNetTraceMergeSolver to snap close parallel same-net traces#187
Open
lyfher wants to merge 1 commit intotscircuit:mainfrom
Open
feat: add SameNetTraceMergeSolver to snap close parallel same-net traces#187lyfher wants to merge 1 commit intotscircuit:mainfrom
lyfher wants to merge 1 commit intotscircuit:mainfrom
Conversation
…ce segments Implements a new pipeline phase (SameNetTraceMergeSolver) that runs after TraceCleanupSolver and snaps parallel trace segments belonging to the same electrical net onto a shared coordinate when they are within 0.05 units of each other with at least 30% overlap. - Handles both horizontal and vertical segments - Skips segments on different nets to prevent short circuits - Includes 6 unit tests covering merge, no-merge (different net, too far, no overlap) and end-to-end pipeline test - Adds example28 reproduction page showing the before/after Fixes tscircuit#29, fixes tscircuit#34 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Apr 15, 2026
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.
Problem
When multiple traces on the same electrical net are routed with parallel segments close to each other (within ~0.05 units), they appear as separate nearly-overlapping lines instead of a clean single line.
Reproduction:
site/examples/example28-same-net-trace-merge.page.tsx— two GND traces with segments at y=+0.025 and y=-0.025.Solution
New
SameNetTraceMergeSolverpipeline phase that runs afterTraceCleanupSolver:globalConnNetIdGAP_THRESHOLD = 0.05Tests
6 unit tests covering:
All 55 existing tests pass.
Fixes #29, fixes #34