Include local clearances even if no implicit rule was found.
The real test should be to apply it any time an explicit rule is *not* found. Fixes https://gitlab.com/kicad/code/kicad/issues/6426
This commit is contained in:
parent
0517f783e1
commit
6e0c58adec
|
@ -968,12 +968,14 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRulesForItems( DRC_CONSTRAINT_TYPE_T aConstraintI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool explicitConstraintFound = constraintRef && !implicit;
|
||||||
|
|
||||||
// Unfortunately implicit rules don't work for local clearances (such as zones) because
|
// Unfortunately implicit rules don't work for local clearances (such as zones) because
|
||||||
// they have to be max'ed with netclass values (which are already implicit rules), and our
|
// they have to be max'ed with netclass values (which are already implicit rules), and our
|
||||||
// rule selection paradigm is "winner takes all".
|
// rule selection paradigm is "winner takes all".
|
||||||
if( constraintRef && aConstraintId == CLEARANCE_CONSTRAINT && implicit )
|
if( aConstraintId == CLEARANCE_CONSTRAINT && !explicitConstraintFound )
|
||||||
{
|
{
|
||||||
int global = constraintRef->m_Value.Min();
|
int global = constraintRef ? constraintRef->m_Value.Min() : 0;
|
||||||
int localA = ac ? ac->GetLocalClearance( nullptr ) : 0;
|
int localA = ac ? ac->GetLocalClearance( nullptr ) : 0;
|
||||||
int localB = bc ? bc->GetLocalClearance( nullptr ) : 0;
|
int localB = bc ? bc->GetLocalClearance( nullptr ) : 0;
|
||||||
int clearance = global;
|
int clearance = global;
|
||||||
|
|
Loading…
Reference in New Issue