From 1d5db513a1479385cb33826c5de27e23f6e205b3 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 12 Aug 2022 20:05:45 -0700 Subject: [PATCH] Ensure arcs are handled in topology Use the connection-independent `Anchor()` function to get connection points for either arcs or segments in topology. This allows the ratsnest to be correctly drawn between nets with arcs Fixes https://gitlab.com/kicad/code/kicad/issues/12205 --- pcbnew/router/pns_topology.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/router/pns_topology.cpp b/pcbnew/router/pns_topology.cpp index 5ec87f25e3..31710ec35e 100644 --- a/pcbnew/router/pns_topology.cpp +++ b/pcbnew/router/pns_topology.cpp @@ -74,11 +74,10 @@ const TOPOLOGY::JOINT_SET TOPOLOGY::ConnectedJoints( JOINT* aStart ) for( ITEM* item : current->LinkList() ) { - if( item->OfKind( ITEM::SEGMENT_T ) ) + if( item->OfKind( ITEM::SEGMENT_T | ITEM::ARC_T ) ) { - SEGMENT* seg = static_cast( item ); - JOINT* a = m_world->FindJoint( seg->Seg().A, seg ); - JOINT* b = m_world->FindJoint( seg->Seg().B, seg ); + JOINT* a = m_world->FindJoint( item->Anchor( 0 ), item );; + JOINT* b = m_world->FindJoint( item->Anchor( 1 ), item );; JOINT* next = ( *a == *current ) ? b : a; if( processed.find( next ) == processed.end() )