Avoid duplicate points in trapezoid pads

Duplicate points can be either positive-facing or negative facing, so
test absolutes

Fixes https://gitlab.com/kicad/code/kicad/issues/11025
This commit is contained in:
Seth Hillbrand 2022-03-22 13:29:40 -07:00
parent dbbecefcb9
commit 207820e112
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ void TransformTrapezoidToPolygon( SHAPE_POLY_SET& aCornerBuffer, const wxPoint&
corners.push_back( ROUNDED_CORNER( size.x + aDeltaY, size.y - aDeltaX ) ); corners.push_back( ROUNDED_CORNER( size.x + aDeltaY, size.y - aDeltaX ) );
corners.push_back( ROUNDED_CORNER( -size.x - aDeltaY, size.y + aDeltaX ) ); corners.push_back( ROUNDED_CORNER( -size.x - aDeltaY, size.y + aDeltaX ) );
if( aDeltaY == size.x || aDeltaX == size.y ) if( std::abs( aDeltaY ) == std::abs( size.x ) || std::abs( aDeltaX ) == std::abs( size.y ) )
CornerListRemoveDuplicates( corners ); CornerListRemoveDuplicates( corners );
} }