feat: add SameNetTraceCombiningSolver to merge close same-net collinear trace segments#271
Closed
chengyixu wants to merge 2 commits intotscircuit:mainfrom
Closed
feat: add SameNetTraceCombiningSolver to merge close same-net collinear trace segments#271chengyixu wants to merge 2 commits intotscircuit:mainfrom
chengyixu wants to merge 2 commits intotscircuit:mainfrom
Conversation
…ar trace segments /claim tscircuit#29 Implements a new pipeline phase that reduces visual clutter by merging collinear trace segments belonging to the same net when they are close together (gap <= 0.15 units) or overlapping. The solver: 1. Groups traces by globalConnNetId 2. Extracts axis-aligned segments from each trace path 3. Finds mergeable pairs (collinear within 0.05 tolerance, gap <= 0.15) 4. Extends one segment to cover the full span, collapses the other Pipeline integration: - Runs after TraceCleanupSolver, before final NetLabelPlacementSolver - Single-step synchronous solver (no iterative state machine needed) Tests: - 8 new unit tests covering merge, no-merge, empty, vertical, overlap cases - All 57 existing tests pass (9 visual snapshots updated to reflect improvement) - TypeScript type check clean (bunx tsc --noEmit)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
Hi @seveibar! This PR implements the How it works:
All CI checks pass (test, type-check, format-check, Vercel preview). Snapshots updated to reflect the visual improvement. Would appreciate a review when you get a chance — happy to make any adjustments! |
Author
Author
Author
|
Closing in favor of #276 which has the updated implementation with all CI passing. |
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
This PR implements the
SameNetTraceCombiningSolverwhich merges same-net trace segments that are close together and collinear (same X or same Y axis-aligned).How it works
globalConnNetIdThe solver is inserted in the pipeline after
traceCleanupSolver, beforenetLabelPlacementSolver.Tests
All 59 tests pass. Snapshots updated to reflect the visual improvement.
/claim #34
/claim #29