DRC: special case circles for annular width check

Circles only use one dimension and we tend to ignore the other in our UI
but it is kept and reflects the previous second dimensional value.  When
checking DRC, we should only be concerned with the single value used
unless the pad has two dimensions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17944

(cherry picked from commit e3d2f338de)
This commit is contained in:
Seth Hillbrand 2024-05-03 10:05:12 -07:00
parent 279ef4210d
commit bbac5430cf
1 changed files with 5 additions and 1 deletions

View File

@ -163,13 +163,17 @@ bool DRC_TEST_PROVIDER_ANNULAR_WIDTH::Run()
{
switch( pad->GetShape() )
{
case PAD_SHAPE::CIRCLE:
annularWidth = ( pad->GetSizeX() - pad->GetDrillSizeX() ) / 2;
handled = true;
break;
case PAD_SHAPE::CHAMFERED_RECT:
if( pad->GetChamferRectRatio() > 0.30 )
break;
KI_FALLTHROUGH;
case PAD_SHAPE::CIRCLE:
case PAD_SHAPE::OVAL:
case PAD_SHAPE::RECTANGLE:
case PAD_SHAPE::ROUNDRECT: