Move DebugZoneFiller to advanced config.
This will hopefully keep it from accidentally getting checked in again.
This commit is contained in:
parent
524603de14
commit
7d3eee8cf9
|
@ -138,6 +138,8 @@ static const wxChar PluginAltiumSch[] = wxT( "PluginAltiumSch" );
|
|||
*/
|
||||
static const wxChar MinPlotPenWidth[] = wxT( "MinPlotPenWidth" );
|
||||
|
||||
static const wxChar DebugZoneFiller[] = wxT( "DebugZoneFiller" );
|
||||
|
||||
} // namespace KEYS
|
||||
|
||||
|
||||
|
@ -233,6 +235,8 @@ ADVANCED_CFG::ADVANCED_CFG()
|
|||
|
||||
m_MinPlotPenWidth = 0.0212; // 1 pixel at 1200dpi.
|
||||
|
||||
m_DebugZoneFiller = false;
|
||||
|
||||
loadFromConfigFile();
|
||||
}
|
||||
|
||||
|
@ -307,6 +311,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::MinPlotPenWidth,
|
||||
&m_MinPlotPenWidth, 0.0212, 0.0, 1.0 ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::DebugZoneFiller,
|
||||
&m_DebugZoneFiller, false ) );
|
||||
|
||||
wxConfigLoadSetups( &aCfg, configParams );
|
||||
|
||||
for( PARAM_CFG* param : configParams )
|
||||
|
|
|
@ -62,16 +62,15 @@ public:
|
|||
* Get the singleton instance's config, which is shared by all
|
||||
* consumers of advanced config.
|
||||
*
|
||||
* This configuration is read-only - to set options, users should
|
||||
* add the parameters to their config files at ~/.config/kicad/advanced, or the
|
||||
* platform equivalent.
|
||||
* This configuration is read-only - to set options, users should add the parameters to
|
||||
* their config files at ~/.config/kicad/advanced, or the platform equivalent.
|
||||
*/
|
||||
static const ADVANCED_CFG& GetCfg();
|
||||
|
||||
/**
|
||||
* For drawsegments - arcs.
|
||||
* Distance from an arc end point and the estimated end point,
|
||||
* when rotating from the start point to the end point.
|
||||
* Distance from an arc end point and the estimated end point, when rotating from the
|
||||
* start point to the end point.
|
||||
*/
|
||||
double m_drawArcAccuracy;
|
||||
|
||||
|
@ -138,6 +137,11 @@ public:
|
|||
*/
|
||||
double m_MinPlotPenWidth;
|
||||
|
||||
/**
|
||||
* A mode that dumps the various stages of a F_Cu fill into In1_Cu through In9_Cu.
|
||||
*/
|
||||
bool m_DebugZoneFiller;
|
||||
|
||||
private:
|
||||
ADVANCED_CFG();
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <fctsys.h>
|
||||
#include <geometry/geometry_utils.h>
|
||||
#include <geometry/shape_null.h>
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <pcb_base_frame.h>
|
||||
#include <pcb_screen.h>
|
||||
#include <class_board.h>
|
||||
|
@ -36,7 +36,6 @@
|
|||
#include <math_for_graphics.h>
|
||||
#include <settings/color_settings.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include "zone_filler.h"
|
||||
|
||||
ZONE_CONTAINER::ZONE_CONTAINER( BOARD_ITEM_CONTAINER* aParent, bool aInModule )
|
||||
: BOARD_CONNECTED_ITEM( aParent, aInModule ? PCB_MODULE_ZONE_AREA_T : PCB_ZONE_AREA_T ),
|
||||
|
@ -365,7 +364,7 @@ void ZONE_CONTAINER::SetCornerRadius( unsigned int aRadius )
|
|||
|
||||
bool ZONE_CONTAINER::GetFilledPolysUseThickness( PCB_LAYER_ID aLayer ) const
|
||||
{
|
||||
if( ZONE_FILLER::s_DumpZonesWhenFilling && LSET::InternalCuMask().Contains( aLayer ) )
|
||||
if( ADVANCED_CFG::GetCfg().m_DebugZoneFiller && LSET::InternalCuMask().Contains( aLayer ) )
|
||||
return false;
|
||||
|
||||
return GetFilledPolysUseThickness();
|
||||
|
|
|
@ -58,6 +58,8 @@ ZONE_FILLER::ZONE_FILLER( BOARD* aBoard, COMMIT* aCommit ) :
|
|||
m_progressReporter( nullptr ),
|
||||
m_maxError( ARC_HIGH_DEF )
|
||||
{
|
||||
// To enable add "DebugZoneFiller=true" to kicad_advanced settings file.
|
||||
m_debugZoneFiller = ADVANCED_CFG::GetCfg().m_DebugZoneFiller;
|
||||
}
|
||||
|
||||
|
||||
|
@ -322,7 +324,7 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*>& aZones, bool aCheck, wxWin
|
|||
{
|
||||
for( PCB_LAYER_ID layer : zone.m_zone->GetLayerSet().Seq() )
|
||||
{
|
||||
if( s_DumpZonesWhenFilling && LSET::InternalCuMask().Contains( layer ) )
|
||||
if( m_debugZoneFiller && LSET::InternalCuMask().Contains( layer ) )
|
||||
continue;
|
||||
|
||||
if( !zone.m_islands.count( layer ) )
|
||||
|
@ -363,7 +365,7 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*>& aZones, bool aCheck, wxWin
|
|||
{
|
||||
for( PCB_LAYER_ID layer : zone->GetLayerSet().Seq() )
|
||||
{
|
||||
if( s_DumpZonesWhenFilling && LSET::InternalCuMask().Contains( layer ) )
|
||||
if( m_debugZoneFiller && LSET::InternalCuMask().Contains( layer ) )
|
||||
continue;
|
||||
|
||||
SHAPE_POLY_SET poly = zone->GetFilledPolysList( layer );
|
||||
|
@ -898,7 +900,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE_CONTAINER* aZone, PCB_LA
|
|||
|
||||
|
||||
#define DUMP_POLYS_TO_COPPER_LAYER( a, b, c ) \
|
||||
{ if( s_DumpZonesWhenFilling && dumpLayer == b ) \
|
||||
{ if( m_debugZoneFiller && dumpLayer == b ) \
|
||||
{ \
|
||||
m_board->SetLayerName( b, c ); \
|
||||
a.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE ); \
|
||||
|
@ -927,7 +929,7 @@ void ZONE_FILLER::computeRawFilledArea( const ZONE_CONTAINER* aZone, PCB_LAYER_I
|
|||
{
|
||||
PCB_LAYER_ID dumpLayer = aLayer;
|
||||
|
||||
if( s_DumpZonesWhenFilling && LSET::InternalCuMask().Contains( aLayer ) )
|
||||
if( m_debugZoneFiller && LSET::InternalCuMask().Contains( aLayer ) )
|
||||
aLayer = F_Cu;
|
||||
|
||||
m_maxError = m_board->GetDesignSettings().m_MaxError;
|
||||
|
|
|
@ -47,8 +47,6 @@ public:
|
|||
bool Fill( std::vector<ZONE_CONTAINER*>& aZones, bool aCheck = false,
|
||||
wxWindow* aParent = nullptr );
|
||||
|
||||
static const bool s_DumpZonesWhenFilling = false;
|
||||
|
||||
private:
|
||||
|
||||
void addKnockout( D_PAD* aPad, PCB_LAYER_ID aLayer, int aGap, SHAPE_POLY_SET& aHoles );
|
||||
|
@ -120,6 +118,8 @@ private:
|
|||
std::unique_ptr<WX_PROGRESS_REPORTER> m_uniqueReporter;
|
||||
|
||||
int m_maxError;
|
||||
|
||||
bool m_debugZoneFiller;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue