mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Enable Creepage check by default
This commit is contained in:
parent
c55d7d6eb4
commit
8a6910d96f
common
include
pcbnew
@ -64,7 +64,7 @@ namespace AC_KEYS
|
||||
static const wxChar IncrementalConnectivity[] = wxT( "IncrementalConnectivity" );
|
||||
static const wxChar Use3DConnexionDriver[] = wxT( "3DConnexionDriver" );
|
||||
static const wxChar ExtraFillMargin[] = wxT( "ExtraFillMargin" );
|
||||
static const wxChar EnableCreepageDRC[] = wxT( "EnableCreepageDRC" );
|
||||
static const wxChar EnableCreepageSlot[] = wxT( "EnableCreepageSlot" );
|
||||
static const wxChar DRCEpsilon[] = wxT( "DRCEpsilon" );
|
||||
static const wxChar DRCSliverWidthTolerance[] = wxT( "DRCSliverWidthTolerance" );
|
||||
static const wxChar DRCSliverMinimumLength[] = wxT( "DRCSliverMinimumLength" );
|
||||
@ -224,7 +224,7 @@ ADVANCED_CFG::ADVANCED_CFG()
|
||||
m_DrawTriangulationOutlines = false;
|
||||
|
||||
m_ExtraClearance = 0.0005;
|
||||
m_EnableCreepageDRC = false;
|
||||
m_EnableCreepageSlot = false;
|
||||
m_DRCEpsilon = 0.0005; // 0.5um is small enough not to materially violate
|
||||
// any constraints.
|
||||
m_SliverWidthTolerance = 0.08;
|
||||
@ -343,8 +343,8 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||
&m_ExtraClearance,
|
||||
m_ExtraClearance, 0.0, 1.0 ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableCreepageDRC,
|
||||
&m_EnableCreepageDRC, m_EnableCreepageDRC ) );
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableCreepageSlot,
|
||||
&m_EnableCreepageSlot, m_EnableCreepageSlot ) );
|
||||
|
||||
|
||||
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::DRCEpsilon,
|
||||
|
@ -125,12 +125,12 @@ public:
|
||||
double m_ExtraClearance;
|
||||
|
||||
/**
|
||||
* Enable the DRC creepage check
|
||||
* Enable the minimum slot width check for creepage
|
||||
*
|
||||
* Setting name: "EnableCreepageDRC"
|
||||
* Setting name: "EnableCreepageSlot"
|
||||
* Default value: false
|
||||
*/
|
||||
bool m_EnableCreepageDRC;
|
||||
bool m_EnableCreepageSlot;
|
||||
|
||||
/**
|
||||
* Epsilon for DRC tests.
|
||||
|
@ -77,7 +77,7 @@ PANEL_SETUP_CONSTRAINTS::PANEL_SETUP_CONSTRAINTS( wxWindow* aParentWindow, PCB_E
|
||||
ctrlSize.x = KIUI::GetTextSize( wxT( "XXX" ), m_minResolvedSpokeCountCtrl ).x;
|
||||
m_minResolvedSpokeCountCtrl->SetSize( ctrlSize );
|
||||
|
||||
if( !ADVANCED_CFG::GetCfg().m_EnableCreepageDRC )
|
||||
if( !ADVANCED_CFG::GetCfg().m_EnableCreepageSlot )
|
||||
{
|
||||
m_minGrooveWidthCtrl->Show( false );
|
||||
m_minGrooveWidthUnits->Show( false );
|
||||
|
@ -2452,7 +2452,7 @@ std::shared_ptr<GraphConnection> CreepageGraph::AddConnection( std::shared_ptr<G
|
||||
if( !aN1 || !aN2 )
|
||||
return nullptr;
|
||||
|
||||
assert((aN1 != aN2) && "Creepage: a connection connects a node to itself");
|
||||
wxASSERT_MSG( ( aN1 != aN2 ), "Creepage: a connection connects a node to itself" );
|
||||
|
||||
std::shared_ptr<GraphConnection> gc = std::make_shared<GraphConnection>( aN1, aN2, aPc );
|
||||
m_connections.push_back( gc );
|
||||
|
@ -73,11 +73,6 @@ private:
|
||||
|
||||
bool DRC_TEST_PROVIDER_CREEPAGE::Run()
|
||||
{
|
||||
if( !ADVANCED_CFG::GetCfg().m_EnableCreepageDRC )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
m_board = m_drcEngine->GetBoard();
|
||||
|
||||
//int errorMax = m_board->GetDesignSettings().m_MaxError;
|
||||
@ -343,7 +338,17 @@ int DRC_TEST_PROVIDER_CREEPAGE::testCreepage()
|
||||
|
||||
const DRAWINGS drawings = m_board->Drawings();
|
||||
CreepageGraph graph( *m_board );
|
||||
graph.m_minGrooveWidth = m_board->GetDesignSettings().m_MinGrooveWidth;
|
||||
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_EnableCreepageSlot )
|
||||
{
|
||||
graph.m_minGrooveWidth = m_board->GetDesignSettings().m_MinGrooveWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.m_minGrooveWidth = 0;
|
||||
}
|
||||
|
||||
graph.m_boardOutline = &outline;
|
||||
|
||||
this->CollectBoardEdges( graph.m_boardEdge );
|
||||
|
Loading…
Reference in New Issue
Block a user