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

(cherry picked from commit 207820e112)
This commit is contained in:
Seth Hillbrand 2022-03-22 13:29:40 -07:00
parent 871955444c
commit 363ea99157
1 changed files with 1 additions and 1 deletions

View File

@ -430,7 +430,7 @@ void TransformTrapezoidToPolygon( SHAPE_POLY_SET& aCornerBuffer, const VECTOR2I&
corners.emplace_back( size.x + aDeltaY, size.y - aDeltaX );
corners.emplace_back( -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 );
}