Fix merge wreckage in building netclasses.

This commit is contained in:
Jeff Young 2021-04-13 17:21:47 +01:00
parent 7bc4f3efa7
commit d79057b83a
1 changed files with 8 additions and 19 deletions

View File

@ -259,7 +259,7 @@ void DRC_ENGINE::loadImplicitRules()
} }
} }
if( nc->GetDiffPairWidth() || nc->GetDiffPairGap() ) if( nc->GetDiffPairWidth() )
{ {
netclassRule = new DRC_RULE; netclassRule = new DRC_RULE;
netclassRule->m_Name = wxString::Format( _( "netclass '%s' (diff pair)" ), netclassRule->m_Name = wxString::Format( _( "netclass '%s' (diff pair)" ),
@ -271,23 +271,12 @@ void DRC_ENGINE::loadImplicitRules()
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr ); netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
netclassItemSpecificRules.push_back( netclassRule ); netclassItemSpecificRules.push_back( netclassRule );
if( nc->GetDiffPairWidth() )
{
DRC_CONSTRAINT constraint( TRACK_WIDTH_CONSTRAINT ); DRC_CONSTRAINT constraint( TRACK_WIDTH_CONSTRAINT );
constraint.Value().SetMin( bds.m_TrackMinWidth ); constraint.Value().SetMin( bds.m_TrackMinWidth );
constraint.Value().SetOpt( nc->GetDiffPairWidth() ); constraint.Value().SetOpt( nc->GetDiffPairWidth() );
netclassRule->AddConstraint( constraint ); netclassRule->AddConstraint( constraint );
} }
if( nc->GetDiffPairGap() )
{
DRC_CONSTRAINT constraint( DIFF_PAIR_GAP_CONSTRAINT );
constraint.Value().SetMin( bds.m_MinClearance );
constraint.Value().SetOpt( nc->GetDiffPairGap() );
netclassRule->AddConstraint( constraint );
}
}
if( nc->GetDiffPairGap() ) if( nc->GetDiffPairGap() )
{ {
netclassRule = new DRC_RULE; netclassRule = new DRC_RULE;
@ -300,9 +289,9 @@ void DRC_ENGINE::loadImplicitRules()
netclassRule->m_Condition = new DRC_RULE_CONDITION( expr ); netclassRule->m_Condition = new DRC_RULE_CONDITION( expr );
netclassItemSpecificRules.push_back( netclassRule ); netclassItemSpecificRules.push_back( netclassRule );
DRC_CONSTRAINT constraint( CLEARANCE_CONSTRAINT ); DRC_CONSTRAINT constraint( DIFF_PAIR_GAP_CONSTRAINT );
constraint.Value().SetMin( std::max( bds.m_MinClearance, constraint.Value().SetMin( bds.m_MinClearance );
nc->GetDiffPairGap() ) ); constraint.Value().SetOpt( nc->GetDiffPairGap() );
netclassRule->AddConstraint( constraint ); netclassRule->AddConstraint( constraint );
} }