Zone fill: When using the fillet outline option, in some cases the shape is strange.

Due to some bug in Fillet() incorrect zone outline happens in (rare) polygon shapes.
So clip it with the initial polygon (aSmoothedPoly must be contained in m_Poly)
Fixes #9692
https://gitlab.com/kicad/code/kicad/issues/9692
This commit is contained in:
jean-pierre charras 2021-11-19 13:55:05 +01:00
parent 9a9c7856b3
commit 54c3031d74
1 changed files with 5 additions and 0 deletions

View File

@ -1307,6 +1307,11 @@ bool ZONE_CONTAINER::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly ) const
aSmoothedPoly = m_Poly->Fillet( m_cornerRadius, ARC_HIGH_DEF );
else
aSmoothedPoly = m_Poly->Fillet( m_cornerRadius, ARC_LOW_DEF );
// In some cases the resulting polygon is strange... due to some bug in Fillet()
// that happens in (rare) polygon shapes. So clip it with the
// initial polygon (in all cases aSmoothedPoly must be contained by m_Poly)
aSmoothedPoly.BooleanIntersection( *m_Poly, SHAPE_POLY_SET::PM_FAST );
break;
default: