pcbnew/router: respect default net clearance for objects that don't have any net (e.g. board outline)

Fixes: lp:1753904
* https://bugs.launchpad.net/kicad/+bug/1753904
This commit is contained in:
Tomasz Włostowski 2018-03-07 11:46:07 +01:00
parent a3562b354b
commit ebd2b78f86
1 changed files with 12 additions and 3 deletions

View File

@ -146,10 +146,19 @@ PNS_PCBNEW_RULE_RESOLVER::PNS_PCBNEW_RULE_RESOLVER( BOARD* aBoard, PNS::ROUTER*
}
}
//printf("DefaultCL : %d\n", m_board->GetDesignSettings().m_NetClasses.Find ("Default clearance")->GetClearance());
m_overrideEnabled = false;
m_defaultClearance = Millimeter2iu( 0.254 ); // m_board->m_NetClasses.Find ("Default clearance")->GetClearance();
auto defaultRule = m_board->GetDesignSettings().m_NetClasses.Find ("Default");
if( defaultRule )
{
m_defaultClearance = defaultRule->GetClearance();
}
else
{
m_defaultClearance = Millimeter2iu(0.254);
}
m_overrideNetA = 0;
m_overrideNetB = 0;
m_overrideClearance = 0;