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
This commit is contained in:
Jon Evans 2021-04-18 21:01:07 -04:00
parent 4538d78828
commit dd828bd964
1 changed files with 6 additions and 1 deletions

View File

@ -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;