Repository navigation
fix: detect via-pad copper conflicts during placement checks - #481
hrithik18k wants to merge 3 commits into
Conversation
|
Closing this PR because the original issue #241 was already fixed by #243, following the reproduction in #242. Later, #359 deliberately separated drill-in-pad placement policy from different-net copper clearance: drill overlap is handled by Rechecking the intentionally faulty RC-car fixture confirms that upstream full checks already detect the same via-to-pad copper short as this PR. The original RC-car board is clean; its fault was intentionally introduced only for the regression evidence. This PR adds earlier reporting through the placement runner, rather than a missing fix for the original issue. That would be a separate behavior proposal, and the tested CLI also needs diagnostic-category integration before it can be claimed as an end-to-end placement-command fix. It is therefore unnecessary to keep this PR open as a fix for #241. The original geometry fix and the later drill/copper distinction remain intact. No merge is needed from this PR. |
A manually placed via can overlap a different-net SMD pad with its copper annulus while its drill remains outside the pad. Current placement validation returns no error for this short, while the existing via-to-pad clearance checker detects it during routing validation.
Placement checks now run
checkViaPadClearance(). Routing-only callers retain their existing detection, andrunAllChecks()deduplicates matching clearance diagnostics so a conflict is reported once. Drill-in-pad permission remains independent of different-net copper clearance.Scope and prior work
This is a follow-up to #241, not the original geometry fix. The reproduction was merged in #242 and the geometry fix in #243. Later, #359 deliberately separated drill-in-pad manufacturing policy from different-net copper clearance:
checkViasInPads()became drill-only, whilecheckViaPadClearance()remained in routing validation.This PR preserves that separation and the merged geometry implementation. Its additional behavior is to run the existing copper-clearance checker during placement too, so a pre-routing placement check can report an already-present different-net copper conflict. It does not revert #359 or classify same-net copper-only contact as via-in-pad.
RC-car board evidence — intentionally introduced fault
The original RC-car board does not contain this fault. The test fault was intentionally introduced into a modified copy to demonstrate the validation gap. This is design-level regression evidence, not a fabricated-hardware failure report.
The fixture retains the complete routed 60 x 45 mm ESC/servo carrier. It adds one GND via near R1.pin1 (ESC_GPIO) and one bottom-layer spur connecting that via to existing ground copper. Every original component, net and route is preserved. The drill stays outside the SMD pad while the annular copper overlaps its corner.
Before/after snapshots show the same faulty copper under different checker implementations. The checker fix detects the fault; it does not repair the copper. The before result runs the actual pinned
@tscircuit/checks@0.0.264package; the after result runs this PR's source.Before, corner detail · After, corner detail
Fixture, exact modification and reproduction commands · Original Gerber transcript · Faulty Gerber transcript · Gerber short bitmap
Regression coverage
tscircuit@0.0.3016, Gerber mode, all layers and 40 pixels/mm. The normal test suite does not download/run the external CLI.Validation
bun run buildpasses, including declarations.git diff --checkpass.The full-suite run used the fixture's exact Git bytes locally because Windows checkout line-ending conversion otherwise fails an unrelated fixture SHA-256 assertion. No unrelated fixture changes are included.