Fix diff pair coupling test when gap constraint is in a different rule
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8519
This commit is contained in:
parent
c4cabb38d5
commit
6381ffd10a
|
@ -410,8 +410,10 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
|||
{
|
||||
auto val = gapConstraint->GetValue();
|
||||
bool insideRange = true;
|
||||
|
||||
if( val.HasMin() && gap < val.Min() )
|
||||
insideRange = false;
|
||||
|
||||
if( val.HasMax() && gap > val.Max() )
|
||||
insideRange = false;
|
||||
|
||||
|
@ -419,10 +421,14 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
|||
// drc_dbg(10, "Vmin %d vmax %d\n", val.Min(), val.Max() );
|
||||
|
||||
cpair.couplingOK = insideRange;
|
||||
|
||||
if( insideRange )
|
||||
it.second.totalCoupled += length;
|
||||
}
|
||||
else
|
||||
{
|
||||
cpair.couplingOK = true;
|
||||
}
|
||||
|
||||
if( cpair.couplingOK )
|
||||
it.second.totalCoupled += length;
|
||||
}
|
||||
|
||||
int totalLen = std::max( it.second.totalLengthN, it.second.totalLengthP );
|
||||
|
|
Loading…
Reference in New Issue