feat: add SameNetTraceMergeSolver pipeline phase#160
Open
satyamdas03 wants to merge 2 commits intotscircuit:mainfrom
Open
feat: add SameNetTraceMergeSolver pipeline phase#160satyamdas03 wants to merge 2 commits intotscircuit:mainfrom
satyamdas03 wants to merge 2 commits intotscircuit:mainfrom
Conversation
Implements a new post-cleanup pipeline step that merges same-net trace segments running parallel and close together on the same axis: - Horizontal segments on the same net within GAP_THRESHOLD (0.19 units) of each other with overlapping X ranges are snapped to the same Y. - Vertical segments on the same net within GAP_THRESHOLD with overlapping Y ranges are snapped to the same X. After merging, collinear/zero-length points are removed via simplifyPath so the resulting paths stay clean and orthogonal. The solver is wired into SchematicTracePipelineSolver after TraceCleanupSolver and before the final NetLabelPlacementSolver pass. Adds 5 tests (4 unit + 1 integration) — all 54 suite tests pass, 0 fail. Closes tscircuit#34 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Implements issues #34 and #29: same-net trace segments running parallel and close together on the same axis are now merged into a single line.
What this adds
lib/solvers/SameNetTraceMergeSolver/SameNetTraceMergeSolver.ts— new pipeline phase:globalConnNetIdGAP_THRESHOLD(0.19 units) of each other with overlapping X ranges → snaps both to the same YsimplifyPathafterward to remove collinear/zero-length waypoints and keep all paths orthogonalSchematicTracePipelineSolver— wired in afterTraceCleanupSolver, before the finalNetLabelPlacementSolverpass.Tests (5 total, all passing)
sameNetTraceMergeSolverpresent ✅54 pass, 0 fail — full suite
/claim #34
/claim #29