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:
parent
871955444c
commit
363ea99157
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue