From dd828bd964f876bc87dae15c23ac8acdd1da22ba Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 18 Apr 2021 21:01:07 -0400 Subject: [PATCH] PNS: Bring back original Highlight Collisions behavior From discussion with Tom, Jeff, and Wayne, it appears as though we all agreed that Highlight Collisions should behave like it did in 5.1, which is to say, always just highlight collisions, never prevent them. The Allow DRC Violations checkbox just controls whether or not you can fix/commit the head line if it has violations; you are not prevented from moving the head line to violating positions in any case. Right now, there does not seem to be much demand for a separate "Stop at First Obstacle" mode since Walkaround basically does that but better, but we agreed that if there is demand for it in the future, it should be implemented as a new router mode rather than a behavior of Highlight Collisions mode controlled by the Allow DRC Violations checkbox. Fixes https://gitlab.com/kicad/code/kicad/-/issues/7828 --- pcbnew/router/pns_line_placer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 5390e8cabd..bb8a8a00ef 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -519,7 +519,11 @@ bool LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, LINE& aNewHead ) buildInitialLine( aP, m_head ); m_head.SetBlockingObstacle( nullptr ); - // If we are enforcing DRC violations, push back to the hull + // Note: Something like the below could be used to implement a "stop at first obstacle" mode, + // but we don't have one right now and there isn't a lot of demand for one. If we do end up + // doing that, put it in a new routing mode as "highlight collisions" mode should not have + // collision handling other than highlighting. +#if 0 if( !Settings().AllowDRCViolations() ) { NODE::OPT_OBSTACLE obs = m_currentNode->NearestObstacle( &m_head ); @@ -530,6 +534,7 @@ bool LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, LINE& aNewHead ) m_head.SetBlockingObstacle( obs->m_item ); } } +#endif aNewHead = m_head;