KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_drc_annular_overlap_issue24340.cpp File Reference

Regression test for issue #24340: false annular-width DRC violations on PTH pads that partially overlap a same-number SMD pad. More...

Go to the source code of this file.

Classes

struct  DRC_ANNULAR_OVERLAP_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (AnnularOverlapIssue24340, DRC_ANNULAR_OVERLAP_FIXTURE)
 

Detailed Description

Regression test for issue #24340: false annular-width DRC violations on PTH pads that partially overlap a same-number SMD pad.

The bbox overlap forces the polygon path in DRC_TEST_PROVIDER_ANNULAR_WIDTH, which polygonised the THT pad with ERROR_INSIDE. The inscribed-polygon outline lies ~maxError (5 µm default) inside the true circle, so DRC reported ~0.1484 mm and flagged a violation that does not exist in the true geometry.

Fixture (qa/data/pcbnew/issue24340/) – two modified R_0805 footprints, each with same-number THT + SMD overlap, sharing the same project rule min_via_annular_width = 0.1524 mm:

Bug-case footprint at board (130, 95.5): THT circle size 0.508 mm, drill 0.2032 mm – exact annular 0.1524 mm (equal to the constraint). Pre-fix: polygon path with ERROR_INSIDE under-reports the annular and falsely flags a violation. Post-fix: fast path is used, reports 0.1524 mm, passes.

Control footprint at board (176, 95.5): THT circle size 0.4 mm, drill 0.2 mm – annular 0.1 mm, well below the 0.1524 mm constraint. A genuine violation that the fix must still report (guards against accidentally suppressing real failures).

Expected: exactly 1 annular_width violation, on the control footprint.

Definition in file test_drc_annular_overlap_issue24340.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE()