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:
parent
9f44d72923
commit
9f85730987
|
@ -1999,8 +1999,13 @@ void SHAPE_POLY_SET::CacheTriangulation( bool aPartition )
|
||||||
// This partitions into regularly-sized grids (1cm in pcbnew)
|
// This partitions into regularly-sized grids (1cm in pcbnew)
|
||||||
partitionPolyIntoRegularCellGrid( *this, 1e7, tmpSet );
|
partitionPolyIntoRegularCellGrid( *this, 1e7, tmpSet );
|
||||||
else
|
else
|
||||||
|
{
|
||||||
tmpSet = *this;
|
tmpSet = *this;
|
||||||
|
|
||||||
|
if( tmpSet.HasHoles() )
|
||||||
|
tmpSet.Fracture( PM_FAST );
|
||||||
|
}
|
||||||
|
|
||||||
m_triangulatedPolys.clear();
|
m_triangulatedPolys.clear();
|
||||||
m_triangulationValid = true;
|
m_triangulationValid = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue