disable zone dump (this dump is enabled only for zone fill debug)

This commit is contained in:
jean-pierre charras 2017-07-21 08:40:58 +02:00
parent c78a2ba4f8
commit c290e8a33b
1 changed files with 11 additions and 11 deletions

View File

@ -74,7 +74,7 @@
* To emit zone data to a file when filling zones for the debugging purposes,
* set this 'true' and build.
*/
static const bool g_DumpZonesWhenFilling = true;
static const bool s_DumpZonesWhenFilling = false;
extern void BuildUnconnectedThermalStubsPolygonList( SHAPE_POLY_SET& aCornerBuffer,
BOARD* aPcb, ZONE_CONTAINER* aZone,
@ -415,7 +415,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
std::unique_ptr<SHAPE_FILE_IO> dumper( new SHAPE_FILE_IO(
g_DumpZonesWhenFilling ? "zones_dump.txt" : "", SHAPE_FILE_IO::IOM_APPEND ) );
s_DumpZonesWhenFilling ? "zones_dump.txt" : "", SHAPE_FILE_IO::IOM_APPEND ) );
// Set the number of segments in arc approximations
if( m_ArcToSegmentsCount == ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF )
@ -432,7 +432,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
CPOLYGONS_LIST tmp;
if(g_DumpZonesWhenFilling)
if(s_DumpZonesWhenFilling)
dumper->BeginGroup("clipper-zone");
SHAPE_POLY_SET solidAreas = *m_smoothedPoly;
@ -442,18 +442,18 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
SHAPE_POLY_SET holes;
if(g_DumpZonesWhenFilling)
if(s_DumpZonesWhenFilling)
dumper->Write( &solidAreas, "solid-areas" );
tmp.RemoveAllContours();
buildFeatureHoleList( aPcb, holes );
if(g_DumpZonesWhenFilling)
if(s_DumpZonesWhenFilling)
dumper->Write( &holes, "feature-holes" );
holes.Simplify( POLY_CALC_MODE );
if (g_DumpZonesWhenFilling)
if (s_DumpZonesWhenFilling)
dumper->Write( &holes, "feature-holes-postsimplify" );
// Generate the filled areas (currently, without thermal shapes, which will
@ -462,13 +462,13 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
// needed by Gerber files and Fracture()
solidAreas.BooleanSubtract( holes, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
if (g_DumpZonesWhenFilling)
if (s_DumpZonesWhenFilling)
dumper->Write( &solidAreas, "solid-areas-minus-holes" );
SHAPE_POLY_SET areas_fractured = solidAreas;
areas_fractured.Fracture( POLY_CALC_MODE );
if (g_DumpZonesWhenFilling)
if (s_DumpZonesWhenFilling)
dumper->Write( &areas_fractured, "areas_fractured" );
m_FilledPolysList = areas_fractured;
@ -490,14 +490,14 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
// needed by Gerber files and Fracture()
solidAreas.BooleanSubtract( thermalHoles, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
if( g_DumpZonesWhenFilling )
if( s_DumpZonesWhenFilling )
dumper->Write( &thermalHoles, "thermal-holes" );
// put these areas in m_FilledPolysList
SHAPE_POLY_SET th_fractured = solidAreas;
th_fractured.Fracture( POLY_CALC_MODE );
if( g_DumpZonesWhenFilling )
if( s_DumpZonesWhenFilling )
dumper->Write ( &th_fractured, "th_fractured" );
m_FilledPolysList = th_fractured;
@ -509,7 +509,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
if( GetNetCode() > 0 )
TestForCopperIslandAndRemoveInsulatedIslands( aPcb );
if(g_DumpZonesWhenFilling)
if(s_DumpZonesWhenFilling)
dumper->EndGroup();
}