fix: use physical duplicate lane placement - #138
Draft
ShiboSoftwareDev wants to merge 4 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Benchmark This PRRun benchmarks by commenting on this PR: Everything after Examples:
Any PR whose title contains |
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.
Stack
Stacked on reproduction PR #137. Both PRs use the same fixture and SVG snapshot.
Problem
When two routes share one graph port, the prepass duplicates that port into two lanes. It previously kept the lanes only 0.025 mm apart even when the physical trace-plus-clearance spacing was 0.200 mm.
That mismatch let graph pathing choose an order that could not be drawn legally by the physical solver. The later stages then received overlapping lanes and could produce crossings or reject the route.
Fix
The duplicate-port prepass already calculates the real lane centers. This change uses those centers for:
The real coordinates are kept separate from optional
routingCostX/routingCostYcoordinates. Those optional coordinates preserve the previous distance-cost preference, so fixing physical topology does not also retune route selection across the board.Insufficient-capacity behavior is unchanged: the prepass still exposes only the lanes that physically fit. Graphs without physical spacing inputs keep the legacy behavior.
Same fixture after the fix
The unchanged #137 fixture now measures 0.200 mm between lane centers. The red 0.1 mm traces and orange trace-plus-clearance envelopes no longer overlap.
Verification