From bd9c37aa5f9e09803349856d68f0db8236bae32e Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 12 Nov 2022 02:11:12 +0500 Subject: [PATCH] Fix an incorrect calculation in length tuning tools. MEANDER_PLACER_BASE::lineLength wasn't calculating the length correctly when starting and ending pads were on different layers. Naturally, now jointA corresponds to the start of the path, jointB to the end. Fixes https://gitlab.com/kicad/code/kicad/issues/12881 (cherry picked from commit 348c3d4216b69b63aada08d732cfc5671f4bd643) --- pcbnew/router/pns_topology.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/router/pns_topology.cpp b/pcbnew/router/pns_topology.cpp index 31710ec35e..62c4f2582c 100644 --- a/pcbnew/router/pns_topology.cpp +++ b/pcbnew/router/pns_topology.cpp @@ -287,8 +287,8 @@ const ITEM_SET TOPOLOGY::AssembleTrivialPath( ITEM* aStart, JOINT* jointA = nullptr; JOINT* jointB = nullptr; - followTrivialPath( &l, false, path, visited, &jointA ); - followTrivialPath( &l, true, path, visited, &jointB ); + followTrivialPath( &l, false, path, visited, &jointB ); + followTrivialPath( &l, true, path, visited, &jointA ); if( aTerminalJoints ) {