Make SHAPE_POLY_SET::CacheTriangulation() behavior same as previously.

Previously, SHAPE_POLY_SET::CacheTriangulation() was able to handle polygons
with holes.
Due to recent changes, CacheTriangulation( true ) handle polygons with holes,
but CacheTriangulation( false ) did not handle polygons with holes, due to a
missing call to Fracture(), lost in latest changes.
This is now fixed.

Fixes #5606
https://gitlab.com/kicad/code/kicad/issues/5606
This commit is contained in:
jean-pierre charras 2020-09-13 17:55:59 +02:00
parent 9f44d72923
commit 9f85730987
1 changed files with 5 additions and 0 deletions

View File

@ -1999,8 +1999,13 @@ void SHAPE_POLY_SET::CacheTriangulation( bool aPartition )
// This partitions into regularly-sized grids (1cm in pcbnew)
partitionPolyIntoRegularCellGrid( *this, 1e7, tmpSet );
else
{
tmpSet = *this;
if( tmpSet.HasHoles() )
tmpSet.Fracture( PM_FAST );
}
m_triangulatedPolys.clear();
m_triangulationValid = true;