Diff pair gap only overrides netclass clearance when it's smaller.

Fixes https://gitlab.com/kicad/code/kicad/issues/8676
This commit is contained in:
Jeff Young 2021-06-24 16:54:59 +01:00
parent 744dadd412
commit 232ffe97be
1 changed files with 17 additions and 14 deletions

View File

@ -295,8 +295,10 @@ void DRC_ENGINE::loadImplicitRules()
constraint.Value().SetOpt( nc->GetDiffPairGap() );
netclassRule->AddConstraint( constraint );
// The diffpair gap overrides the netclass min clearance, but not the board
// min clearance.
// A narrower diffpair gap overrides the netclass min clearance (but is still
// trimmed to the board min clearance, which is absolute).
if( nc->GetDiffPairGap() < nc->GetClearance() )
{
netclassRule = new DRC_RULE;
netclassRule->m_Name = wxString::Format( _( "netclass '%s' (diff pair)" ),
ncName );
@ -312,6 +314,7 @@ void DRC_ENGINE::loadImplicitRules()
nc->GetDiffPairGap() ) );
netclassRule->AddConstraint( min_clearanceConstraint );
}
}
if( nc->GetViaDiameter() || nc->GetViaDrill() )
{