Do not call TransformToPoly for negative sized PADs
This commit is contained in:
parent
2515948a7b
commit
fd6a75b779
|
@ -322,8 +322,13 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
|
|||
if( ( clearance.x < 0 || clearance.x != clearance.y )
|
||||
&& aPad->GetShape() != PAD_SHAPE::CUSTOM )
|
||||
{
|
||||
wxSize dummySize = aPad->GetSize() + clearance + clearance;
|
||||
|
||||
if( dummySize.x <= 0 || dummySize.y <= 0 )
|
||||
return;
|
||||
|
||||
PAD dummy( *aPad );
|
||||
dummy.SetSize( aPad->GetSize() + clearance + clearance );
|
||||
dummy.SetSize( dummySize );
|
||||
dummy.TransformShapeWithClearanceToPolygon( poly, aLayer, 0, ARC_HIGH_DEF, ERROR_INSIDE );
|
||||
clearance = { 0, 0 };
|
||||
}
|
||||
|
|
|
@ -2266,8 +2266,13 @@ void FOOTPRINT::TransformPadsWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuff
|
|||
if( ( clearance.x < 0 || clearance.x != clearance.y )
|
||||
&& pad->GetShape() != PAD_SHAPE::CUSTOM )
|
||||
{
|
||||
wxSize dummySize = pad->GetSize() + clearance + clearance;
|
||||
|
||||
if( dummySize.x <= 0 || dummySize.y <= 0 )
|
||||
continue;
|
||||
|
||||
PAD dummy( *pad );
|
||||
dummy.SetSize( pad->GetSize() + clearance + clearance );
|
||||
dummy.SetSize( dummySize );
|
||||
dummy.TransformShapeWithClearanceToPolygon( aCornerBuffer, aLayer, 0,
|
||||
aMaxError, aErrorLoc );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue