From 77eeda41916137cb03c23336850ccacab3325e8d Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 7 Oct 2018 19:15:01 -0700 Subject: [PATCH] pcbnew: fix pad distance calc in gateways The pad distance was fixed to 0, making the gateway priority set artificially to 1 --- pcbnew/router/pns_diff_pair.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/router/pns_diff_pair.cpp b/pcbnew/router/pns_diff_pair.cpp index 0fb5daf754..e4a05e9603 100644 --- a/pcbnew/router/pns_diff_pair.cpp +++ b/pcbnew/router/pns_diff_pair.cpp @@ -646,7 +646,7 @@ void DP_GATEWAYS::BuildGeneric( const VECTOR2I& p0_p, const VECTOR2I& p0_n, bool SEG d_n[2], d_p[2]; const int padToGapThreshold = 3; - int padDist = ( p0_p - p0_p ).EuclideanNorm(); + int padDist = ( p0_n - p0_p ).EuclideanNorm(); st_p[0] = SEG(p0_p + VECTOR2I( -100, 0 ), p0_p + VECTOR2I( 100, 0 ) ); st_n[0] = SEG(p0_n + VECTOR2I( -100, 0 ), p0_n + VECTOR2I( 100, 0 ) );