Don't sync zone if polygon triangulation fails

This commit is contained in:
Jon Evans 2018-02-18 17:23:24 -05:00 committed by Maciej Suminski
parent 463e944113
commit 0504a6db52
1 changed files with 7 additions and 0 deletions

View File

@ -801,6 +801,13 @@ bool PNS_KICAD_IFACE::syncZone( PNS::NODE* aWorld, ZONE_CONTAINER* aZone )
aZone->BuildSmoothedPoly( poly );
poly.CacheTriangulation();
if( !poly.IsTriangulationUpToDate() )
{
wxFAIL_MSG( wxString::Format( "Zone triangulation failed for %s",
aZone->GetSelectMenuText() ) );
return false;
}
LSET layers = aZone->GetLayerSet();
for( int layer = F_Cu; layer <= B_Cu; layer++ )