From fa89263c8fb333fd98928ec186980b791ea23a7c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 24 Feb 2021 17:33:05 +0000 Subject: [PATCH] Push hole-to-hole min processing down a level. Also removes adding the track width to the via gap, which was never right. Fixes https://gitlab.com/kicad/code/kicad/issues/7173 --- pcbnew/router/pns_diff_pair_placer.cpp | 3 ++- pcbnew/router/pns_sizes_settings.h | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/router/pns_diff_pair_placer.cpp b/pcbnew/router/pns_diff_pair_placer.cpp index 7e065f452a..d17b2bf38d 100644 --- a/pcbnew/router/pns_diff_pair_placer.cpp +++ b/pcbnew/router/pns_diff_pair_placer.cpp @@ -534,7 +534,8 @@ bool DIFF_PAIR_PLACER::FindDpPrimitivePair( NODE* aWorld, const VECTOR2I& aP, IT int DIFF_PAIR_PLACER::viaGap() const { - return m_sizes.DiffPairViaGap() + m_sizes.DiffPairWidth(); + return std::max( m_sizes.DiffPairViaGap(), + m_sizes.GetHoleToHole() + m_viaDrill - m_viaDiameter ); } diff --git a/pcbnew/router/pns_sizes_settings.h b/pcbnew/router/pns_sizes_settings.h index 4667a3f633..52a62f2eca 100644 --- a/pcbnew/router/pns_sizes_settings.h +++ b/pcbnew/router/pns_sizes_settings.h @@ -62,9 +62,7 @@ public: int DiffPairViaGap() const { - int netClassGap = m_diffPairViaGapSameAsTraceGap ? m_diffPairGap : m_diffPairViaGap; - - return std::max( netClassGap, m_holeToHole - m_viaDiameter ); + return m_diffPairViaGapSameAsTraceGap ? m_diffPairGap : m_diffPairViaGap; } bool DiffPairViaGapSameAsTraceGap() const { return m_diffPairViaGapSameAsTraceGap; }