BOARD_ADAPTER::addText() do not call Fracture twice: it is useless.

This commit is contained in:
jean-pierre charras 2023-05-09 09:18:20 +02:00
parent e1db4e0694
commit 484acd4246
1 changed files with 2 additions and 1 deletions

View File

@ -97,8 +97,9 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
aText->TransformBoundingBoxToPolygon( &finalPoly, margin ); aText->TransformBoundingBoxToPolygon( &finalPoly, margin );
finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST ); finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST );
finalPoly.Fracture( SHAPE_POLY_SET::PM_FAST );
// Do not call finalPoly.Fracture() here: ConvertPolygonToTriangles() call it
// if needed, and Fracture() called twice can create bad results and is useless
ConvertPolygonToTriangles( finalPoly, *aContainer, m_biuTo3Dunits, *aOwner ); ConvertPolygonToTriangles( finalPoly, *aContainer, m_biuTo3Dunits, *aOwner );
} }
else else