fix(solvers): relocate net labels sitting inside chip obstacles in NetLabelNetLabelCollisionSolver - #820
Conversation
…tLabelNetLabelCollisionSolver Fixes tscircuit#655 by scanning for net labels that overlap chip bodies or text boxes even when not involved in a label-label collision, searching candidate anchor points along traces to relocate them outside obstacle bounds.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9f83a4d6b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const labels = this.outputNetLabelPlacements | ||
| for (let i = 0; i < labels.length; i++) { | ||
| const label = labels[i]! | ||
| if (this.skippedChipCollisionLabels.has(label.globalConnNetId)) continue |
There was a problem hiding this comment.
Track skipped chip collisions per label
When one colliding label cannot be relocated, this check suppresses every later label with the same globalConnNetId, not just the placement that was exhausted. The placement solver can emit multiple labels for the same global net (for example separate disconnected/port-only pins), so if the first one has no valid candidate, another same-net label that is still inside a chip or text box is never considered and remains buried; key this skip by the actual placement or another per-label identifier instead of the net id.
Useful? React with 👍 / 👎.
…n chip obstacle test
Summary
Fixes #655.
Previously, `NetLabelNetLabelCollisionSolver` only initiated candidate search when a label collided with another net label (`findNextCollidingPair`). A net label that sat inside a chip body without colliding with any other label was never evaluated against obstacles or relocated, leaving illegible labels buried inside components.
Changes
Verification