fix: flag different-net via copper overlap, not just drill-hole spacing - #184
Open
zkasuran wants to merge 2 commits into
Open
fix: flag different-net via copper overlap, not just drill-hole spacing#184zkasuran wants to merge 2 commits into
zkasuran wants to merge 2 commits into
Conversation
seveibar
reviewed
Aug 8, 2026
seveibar
left a comment
Contributor
There was a problem hiding this comment.
Can you add a visual repro before comitting the fix? Use an svg snapshot
Author
|
Done. Added |
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.
Closes #183
checkDifferentNetViaSpacingmeasures the gap between two vias hole-edge-to-hole-edge, so it only ever sees the drill holes and never the copper annular ring (outer_diameter). Two vias on different nets whose copper overlaps into a short pass DRC clean as long as their drill holes staymin_via_hole_edge_to_via_hole_edge_clearanceapart.Repro
The change
Keep the existing hole-edge (drill) check and add a copper-edge check: compute the gap between the
outer_diameterrings and flag it againstmin_pad_edge_to_pad_edge_clearance, the same electrical clearance a different-net copper pad uses. When the drill holes are the ones too close the error still reports the hole gap, so existing behavior and fixtures are untouched; the new path only catches the copper overlap the drill check missed. This matchescheckViaTraceClearance, which already treats a via's extent as itsouter_diameter.Verification
copper-ring-overlap-short.test.ts:[]on main, onepcb_via_clearance_errorafter.bunx tsc --noEmitclean,biome formatclean.Disclosure
AI assistance (Claude, Anthropic) was used in developing this change. Verified locally before submitting: the new test, the full
bun testsuite (142 pass),bunx tsc --noEmitandbiome format.