Don't expect a B item when evaling DIFF_PAIR_GAP_CONSTRAINT.

The checker first builds a map with only the
A items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19825

(cherry picked from commit ea8b0c0e8ad2415381365bf4cc550c74ace9c9b9)
This commit is contained in:
Jeff Young 2025-05-06 14:14:36 +01:00
parent f0b110bdb8
commit 6f0e548bd6

View File

@ -1154,10 +1154,12 @@ static void isCoupledDiffPairFunc( LIBEVAL::CONTEXT* aCtx, void* self )
if( !DRC_ENGINE::MatchDpSuffix( netinfo->GetNetname(), coupledNet, dummy ) )
return 0.0;
if( context->GetConstraint() == DRC_CONSTRAINT_T::LENGTH_CONSTRAINT
if( context->GetConstraint() == DRC_CONSTRAINT_T::DIFF_PAIR_GAP_CONSTRAINT
|| context->GetConstraint() == DRC_CONSTRAINT_T::LENGTH_CONSTRAINT
|| context->GetConstraint() == DRC_CONSTRAINT_T::SKEW_CONSTRAINT )
{
// DRC engine evaluates these singly, so we won't have a B item
// DRC engine evaluates these only in the context of a diffpair, but doesn't
// always supply the second (B) item.
return 1.0;
}