67                        boost::unit_test::data::make( RegressionTriangulationTests_tests ), relPath )
 
   73    for( 
ZONE* zone : m_board->Zones() )
 
   75        if( zone->GetIsRuleArea() )
 
   80            auto poly = zone->GetFilledPolysList( layer );
 
   82            if( poly->OutlineCount() == 0 )
 
   86                    poly->IsTriangulationUpToDate(),
 
   87                    "Triangulation invalid for " + relPath + 
" layer " + 
LayerName( layer )
 
   88                            + 
" zone " + zone->GetFriendlyName() + 
" net '" + zone->GetNetname()
 
   89                            + 
"' with " + std::to_string( poly->OutlineCount() )
 
   90                            + 
" polygons at position " + std::to_string( poly->BBox().Centre().x )
 
   91                            + 
", " + std::to_string( poly->BBox().Centre().y ) );
 
   93            double area = poly->Area();
 
   94            double tri_area = 0.0;
 
   96            for( 
int ii = 0; ii < poly->TriangulatedPolyCount(); ii++ )
 
   98                const auto tri_poly = poly->TriangulatedPolygon( ii );
 
  100                for( 
const auto& tri : tri_poly->Triangles() )
 
  101                    tri_area += tri.Area();
 
  104            double diff = 
std::abs( area - tri_area );
 
  107            BOOST_CHECK_MESSAGE( diff < 1e9,
 
  108                                    "Triangulation area mismatch in " + relPath + 
" layer " 
  110                                            + 
" difference: " + std::to_string( diff ) );