DIFF_PAIR_GAP_CONSTRAINT does not need to be restricted to two items

We just need one item to see what netclass we're in; the constraint
itself is specific to diff pairs so the condition doesn't need to be.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8205
This commit is contained in:
Jon Evans 2021-04-14 23:43:43 -04:00
parent 1d7e5a0443
commit 4920692bcd
1 changed files with 2 additions and 3 deletions

View File

@ -176,7 +176,7 @@ void DRC_ENGINE::loadImplicitRules()
rule->AddConstraint( courtyardClearanceConstraint );
DRC_CONSTRAINT diffPairGapConstraint( DIFF_PAIR_GAP_CONSTRAINT );
diffPairGapConstraint.Value().SetMin( bds.GetDefault()->GetClearance() );
diffPairGapConstraint.Value().SetMin( bds.m_MinClearance );
rule->AddConstraint( diffPairGapConstraint );
rule = createImplicitRule( _( "board setup constraints" ) );
@ -284,8 +284,7 @@ void DRC_ENGINE::loadImplicitRules()
ncName );
netclassRule->m_Implicit = true;
expr = wxString::Format( "A.NetClass == '%s' && AB.isCoupledDiffPair()",
ncName );
expr = wxString::Format( "A.NetClass == '%s'", ncName );
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
netclassItemSpecificRules.push_back( netclassRule );