PNS: Pick up diff pair starting width from continuation track

This commit is contained in:
Jon Evans 2021-04-12 23:10:15 -04:00
parent 1d9ca181a2
commit 296a9df530
1 changed files with 9 additions and 2 deletions

View File

@ -488,10 +488,17 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM*
int diffPairGap = bds.m_MinClearance;
int diffPairViaGap = bds.m_MinClearance;
found = false;
// First try to pick up diff pair width from starting track, if enabled
if( bds.m_UseConnectedTrackWidth && aStartItem )
found = inheritTrackWidth( aStartItem, &diffPairWidth );
// Next, pick up gap from netclass, and width also if we didn't get a starting width above
if( bds.UseNetClassDiffPair() && aStartItem )
{
if( m_ruleResolver->QueryConstraint( PNS::CONSTRAINT_TYPE::CT_WIDTH, aStartItem,
nullptr, aStartItem->Layer(), &constraint ) )
if( !found && m_ruleResolver->QueryConstraint( PNS::CONSTRAINT_TYPE::CT_WIDTH, aStartItem,
nullptr, aStartItem->Layer(), &constraint ) )
{
diffPairWidth = constraint.m_Value.Opt();
}