feat: merge nearby same-net trace segments (#34)#553
Open
XananasX7 wants to merge 2 commits into
Open
Conversation
Add a merging_close_same_net_segments phase to TraceCleanupSolver that snaps close parallel same-net trace segments onto a shared coordinate. - New mergeNearbySameNetSegments() function in TraceCleanupSolver/ - Groups interior segments by net + orientation + overlapping range - Snaps segment groups to their average fixed-axis coordinate - Preserves endpoint/pin segments (first and last segment of each trace) - Runs as the final step in the TraceCleanupSolver pipeline - 7 new unit tests covering all edge cases
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
/claim #34
Summary
Implements issue #34: Merge same-net trace lines that are close together (at the same Y or same X).
Adds a new
merging_close_same_net_segmentscleanup phase to theTraceCleanupSolverpipeline that snaps nearby parallel same-net trace segments onto a shared coordinate, eliminating the visually confusing closely-spaced parallel lines shown in the issue screenshot.Changes
New file:
lib/solvers/TraceCleanupSolver/mergeNearbySameNetSegments.ts0.18units along the fixed axissimplifyPathafter snapping to clean up any resulting collinear pointsModified:
lib/solvers/TraceCleanupSolver/TraceCleanupSolver.tsmerging_close_same_net_segmentsas the final pipeline step afterbalancing_l_shapesmergeNearbySameNetSegments()New tests:
tests/solvers/TraceCleanupSolver/mergeNearbySameNetSegments.test.ts7 unit tests covering:
Test Results
bunx tsc --noEmit— clean, no errors.