pcbnew: default tuning tool to time domain when netclass has a tuning profile

When a netclass has an assigned tuning profile but no explicit DRC
length constraint rule, the tuning tool was always starting in length
(space domain) mode. This occurred because CreateNew() and EditStart()
only detected time domain mode by querying LENGTH_CONSTRAINT via the
DRC engine, but the tuning profile only injects TRACK_WIDTH_CONSTRAINT
into the DRC rule set, never LENGTH_CONSTRAINT.

Fix by checking HasTuningProfile() on the effective netclass when no
explicit length constraint is found. Apply to both SINGLE and DIFF_PAIR
modes in CreateNew() and EditStart().
This commit is contained in:
Seth Hillbrand
2026-02-23 09:08:06 -08:00
parent fd04714981
commit c3c34f8158
+14
View File
@@ -459,6 +459,10 @@ PCB_TUNING_PATTERN* PCB_TUNING_PATTERN::CreateNew( GENERATOR_TOOL* aTool,
pattern->m_settings.m_isTimeDomain = false;
}
}
else if( aStartItem->GetEffectiveNetClass()->HasTuningProfile() )
{
pattern->m_settings.m_isTimeDomain = true;
}
}
else
{
@@ -574,6 +578,11 @@ void PCB_TUNING_PATTERN::EditStart( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_
m_settings.m_isTimeDomain = constraint.m_IsTimeDomain;
aTool->GetManager()->PostEvent( EVENTS::SelectedItemsModified );
}
else if( track->GetEffectiveNetClass()->HasTuningProfile() )
{
m_settings.m_isTimeDomain = true;
aTool->GetManager()->PostEvent( EVENTS::SelectedItemsModified );
}
}
else
{
@@ -606,6 +615,11 @@ void PCB_TUNING_PATTERN::EditStart( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_
m_settings.m_isTimeDomain = constraint.m_IsTimeDomain;
aTool->GetManager()->PostEvent( EVENTS::SelectedItemsModified );
}
else if( track->GetEffectiveNetClass()->HasTuningProfile() )
{
m_settings.m_isTimeDomain = true;
aTool->GetManager()->PostEvent( EVENTS::SelectedItemsModified );
}
}
else
{