fix: New Phase To combine same-net trace segments that are close together (#29)#343
Open
IbrahimLaeeq wants to merge 2 commits into
Open
fix: New Phase To combine same-net trace segments that are close together (#29)#343IbrahimLaeeq wants to merge 2 commits into
IbrahimLaeeq wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a new SameNetTraceCombineSolver pipeline phase that snaps closely-spaced parallel same-net trace segments onto a shared axis, reducing the visual appearance of redundant parallel traces. It is inserted between LongDistancePairSolver and TraceOverlapShiftSolver, with the latter updated to consume its output.
Changes:
- New
SameNetTraceCombineSolverthat groups traces byglobalConnNetId, finds parallel overlapping segments withincloseDistanceThreshold, and shifts safely-shiftable interior segments to a shared axis, then simplifies paths. - Pipeline integration: new step added;
traceOverlapShiftSolvernow reads from the combiner's output with fallback tolongDistancePairSolver.allTracesMerged. - Unit tests covering merge, distance threshold, and different-net cases.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/solvers/SameNetTraceCombineSolver/SameNetTraceCombineSolver.ts | New solver implementing same-net close-segment combination. |
| lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts | Registers the new solver as a pipeline step and routes its output into TraceOverlapShiftSolver. |
| tests/solvers/SameNetTraceCombineSolver/SameNetTraceCombineSolver.test.ts | Unit tests for the new solver. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4b3eddc to
5532b1b
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.
Fixes #29.
/claim #29
per-pair traces, a single net can be drawn as multiple parallel
SolvedTracePaths with parallel segments running close to one another, looking like redundant duplicate traces.Changes:
lib/solvers/SameNetTraceCombineSolver/SameNetTraceCombineSolver.ts(new) — ABaseSolverthat:globalConnNetId.closeDistanceThreshold(default 0.2) and whose projections overlap, picks the closest pair.lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts— inserted the new phase betweenlongDistancePairSolverandtraceOverlapShiftSolver, and updated the latter to consume the combined output.tests/solvers/SameNetTraceCombineSolver/SameNetTraceCombineSolver.test.ts(new) — three unit tests covering: parallel close same-net segments get merged onto a shared axis with pin endpoints preserved; segments past the threshold are left alone; different-net segments are not merged.Verified: 3/3 new tests pass, all 34 example snapshot tests still pass,
bunx tsc --noEmitis clean.Verified against the repository's own test suite before submission.