New Phase To combine same-net trace segments that are close together#522
Draft
qlufiq-collab wants to merge 1 commit into
Draft
New Phase To combine same-net trace segments that are close together#522qlufiq-collab wants to merge 1 commit into
qlufiq-collab wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
🤖 Auto-generated WIP — converting to draft This PR was opened by an autonomous bounty agent ( Marking this as draft while we improve the agent's pre-submit test Sorry for the noise. |
fbf8c8d to
6a9856d
Compare
6a9856d to
6725e5c
Compare
6725e5c to
2328c99
Compare
2328c99 to
02be8ab
Compare
02be8ab to
5fbae2b
Compare
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
Add a new pipeline phase
SameNetTraceSegmentMergeSolverthat detects trace segments belonging to the same global net running parallel and close together, then snaps them to a shared perpendicular coordinate. This visually collapses redundant near-parallel routing into a single clean line, improving schematic readability. The phase runs afterTraceOverlapShiftSolver(which handles different-net overlaps) and beforeNetLabelPlacementSolver.Changes
lib/solvers/SameNetTraceSegmentMergeSolver/SameNetTraceSegmentMergeSolver.ts— New solver that iterates over same-net trace pairs, finds parallel segments within a configurablemergeDistance, and aligns them to a common coordinate. Endpoint segments (anchored to pins) are never moved.lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts— Import and register the new solver in the pipeline betweentraceOverlapShiftSolverandnetLabelPlacementSolver. Downstream phases (netLabelPlacementSolver,traceLabelOverlapAvoidanceSolver) now read from the merge solver's output when available.tests/solvers/SameNetTraceSegmentMergeSolver/SameNetTraceSegmentMergeSolver.test.ts— Unit tests covering: horizontal merge, vertical merge, different-net no-merge, endpoint protection.site/SameNetTraceSegmentMergeSolver/SameNetTraceSegmentMergeSolver01.page.tsx— Cosmos fixture for visual debugging of the new phase.Test Plan
bun test tests/solvers/SameNetTraceSegmentMergeSolver→ 4 pass, 0 failbun test→ 70 pass, 4 skip, 0 fail (full suite, no regressions)bun tsc --noEmit→ cleanbun run format:check→ 307 files checked, no fixes neededNotes
mergeDistanceis 0.2 units, matching the typical trace shift offset used elsewhere in the pipeline. This value is configurable via the solver constructor params if future tuning is needed.Closes #29