Handle zero-size pads in CornerListToPolygon

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13276
This commit is contained in:
Jon Evans 2022-12-26 09:18:24 -05:00
parent eb5a831a99
commit 68bc18425b
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ void CornerListToPolygon( SHAPE_POLY_SET& outline, std::vector<ROUNDED_CORNER>&
EDA_ANGLE angPos = lastSeg.IsZero() ? angDelta : ( angDelta + lastSeg ) / 2;
double arcTransitionDistance = radius / tanAngle2;
double arcTransitionDistance = ( tanAngle2 > 0 ) ? ( radius / tanAngle2 ) : 0;
VECTOR2I arcStart = cornerPosition - incoming.Resize( arcTransitionDistance );
VECTOR2I arcCenter = arcStart + incoming.Perpendicular().Resize( radius );
VECTOR2I arcEnd, arcStartOrigin;