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

Regression test for issue #24543: creepage DRC calculates an incorrect path from rectangular, chamfered-rectangular and trapezoidal pads placed at an arbitrary (non-orthogonal) rotation. More...

Go to the source code of this file.

Classes

struct  DRC_CREEPAGE_ROTATED_PAD_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (CreepageRotatedRectPadIssue24543, DRC_CREEPAGE_ROTATED_PAD_FIXTURE)
 

Detailed Description

Regression test for issue #24543: creepage DRC calculates an incorrect path from rectangular, chamfered-rectangular and trapezoidal pads placed at an arbitrary (non-orthogonal) rotation.

Rounded-rectangle pads are not affected.

The repro board has a capacitor footprint C4 with two THT rectangular pads straddling an NPTH oval slot. One pad is rotated by a non-orthogonal angle. For such a pad PAD::GetEffectiveShape() returns a SHAPE_SIMPLE (an arbitrary polygon) rather than the axis-aligned SHAPE_RECT used at orthogonal angles. CREEPAGE_GRAPH::Addshape() had no SH_SIMPLE case, so the rotated pad's copper outline was silently dropped from the creepage graph. With no copper anchor the path search snapped the violation to the nearest remaining feature - the pad's NPTH hole - so the reported creepage path started at the hole instead of the copper edge.

The geometric assertion below verifies that both endpoints of the reported creepage path lie on (or very near) the pad copper outlines, and crucially that neither endpoint snaps to the interior of an NPTH hole.

Definition in file test_drc_creepage_issue24543.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE()