pcbnew: Allow DRC violations when marked
We shouldn't consider any obstacles when we are routing in DRC violation mode. Fixes: lp:1826723 * https://bugs.launchpad.net/kicad/+bug/1826723
This commit is contained in:
parent
98e68cd66a
commit
3b3165ad51
|
@ -436,21 +436,25 @@ bool LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, LINE& aNewHead )
|
||||||
|
|
||||||
m_currentNode->QueryColliding( &newHead, obstacles );
|
m_currentNode->QueryColliding( &newHead, obstacles );
|
||||||
|
|
||||||
for( auto& obs : obstacles )
|
// If we are allowing DRC violations, we don't push back to the hull
|
||||||
|
if( !Settings().CanViolateDRC() )
|
||||||
{
|
{
|
||||||
int cl = m_currentNode->GetClearance( obs.m_item, &newHead );
|
for( auto& obs : obstacles )
|
||||||
auto hull = obs.m_item->Hull( cl, newHead.Width() );
|
|
||||||
|
|
||||||
auto nearest = hull.NearestPoint( aP );
|
|
||||||
Dbg()->AddLine( hull, 2, 10000 );
|
|
||||||
|
|
||||||
if( ( nearest - aP ).EuclideanNorm() < newHead.Width() + cl )
|
|
||||||
{
|
{
|
||||||
buildInitialLine( nearest, newHead );
|
int cl = m_currentNode->GetClearance( obs.m_item, &newHead );
|
||||||
if ( newHead.CLine().Length() > bestHead.CLine().Length() )
|
auto hull = obs.m_item->Hull( cl, newHead.Width() );
|
||||||
|
|
||||||
|
auto nearest = hull.NearestPoint( aP );
|
||||||
|
Dbg()->AddLine( hull, 2, 10000 );
|
||||||
|
|
||||||
|
if( ( nearest - aP ).EuclideanNorm() < newHead.Width() + cl )
|
||||||
{
|
{
|
||||||
bestHead = newHead;
|
buildInitialLine( nearest, newHead );
|
||||||
hasBest = true;
|
if ( newHead.CLine().Length() > bestHead.CLine().Length() )
|
||||||
|
{
|
||||||
|
bestHead = newHead;
|
||||||
|
hasBest = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue