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:
parent
dbbecefcb9
commit
207820e112
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue