Skip to content

Also consider inferred vias in trace-to-pad clearance relaxation#9

Merged
imrishabh18 merged 1 commit into
mainfrom
codex/update-clearance-measurement-for-pads-and-vias
May 6, 2026
Merged

Also consider inferred vias in trace-to-pad clearance relaxation#9
imrishabh18 merged 1 commit into
mainfrom
codex/update-clearance-measurement-for-pads-and-vias

Conversation

@imrishabh18

Copy link
Copy Markdown
Member

Motivation

  • Trace clearance relaxation only measured traces against explicit route.vias, missing implied vias created by layer transitions where the route point has the same XY but different z values.
  • That caused traces to not be relaxed away from those implicit via centers and produced DRC regressions when a route had layer transitions but an empty vias array.

Description

  • Added getRouteViaCenters to collect via centers from both explicit route.vias and inferred via locations at zero-length layer transitions. (lib/solvers/GlobalDrcForceImproveSolver/traceToPadClearanceRelaxation.ts)
  • Updated blocker collection and trace-to-other-route clearance computations to use getRouteViaCenters instead of iterating only otherRoute.vias, so trace clearance considers inferred vias as blockers.
  • Added a regression test moves a trace until its edge clears an inferred different-net via edge to verify a trace is nudged away from an inferred different-net via center. (tests/solver-route-behavior.test.ts)

Testing

  • Added the unit test in tests/solver-route-behavior.test.ts covering the inferred via case; test logic is present in the repo.
  • Attempted to run tests with bun test and bun test tests/solver-route-behavior.test.ts, but automated execution failed due to missing external dependencies (@tscircuit/math-utils, etc.) in the execution environment, so tests could not be executed here.
  • Ran git diff --check and committed the changes as Handle inferred vias in trace clearance relaxation.

Codex Task

@imrishabh18 imrishabh18 changed the title Consider inferred vias in trace-to-pad clearance relaxation Also consider inferred vias in trace-to-pad clearance relaxation May 6, 2026
@imrishabh18 imrishabh18 merged commit 4f6c9e9 into main May 6, 2026
3 checks passed
@imrishabh18 imrishabh18 deleted the codex/update-clearance-measurement-for-pads-and-vias branch May 6, 2026 18:19
@tscircuitbot

Copy link
Copy Markdown

Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants