Modify transform shape to use filled/unfilled poly

This commit is contained in:
Seth Hillbrand 2018-12-05 04:13:52 -07:00
parent 5c54b9c46f
commit 02039be2d9
1 changed files with 3 additions and 4 deletions

View File

@ -578,17 +578,16 @@ void DRAWSEGMENT::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerB
poly[ii] += offset;
}
// On the edge cuts layer, a polygon should be treated as a closed set of lines
if( m_Layer == Edge_Cuts )
// If the polygon is not filled, treat it as a closed set of lines
if( !IsPolygonFilled() )
{
auto start = poly[0];
for( size_t ii = 1; ii < poly.size(); ii++ )
{
TransformOvalClearanceToPolygon( aCornerBuffer, poly[ii - 1], poly[ii],
linewidth, aCircleToSegmentsCount, aCorrectionFactor );
}
TransformOvalClearanceToPolygon( aCornerBuffer, poly[poly.size() - 1], start,
TransformOvalClearanceToPolygon( aCornerBuffer, poly.back(), poly.front(),
linewidth, aCircleToSegmentsCount, aCorrectionFactor );
break;
}