Skip to content
Snippets Groups Projects
Commit 9f857309 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

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
#5606
parent 9f44d729
No related branches found
No related tags found
Loading
Pipeline #189350814 passed
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment