From 0504a6db52f6129402f6610125fffe5bf24b2d41 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 18 Feb 2018 17:23:24 -0500 Subject: [PATCH] Don't sync zone if polygon triangulation fails --- pcbnew/router/pns_kicad_iface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index f23cf3e488..5e677337ef 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -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++ )