PNS: Collision search context may be null
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14741
This commit is contained in:
parent
d790865549
commit
94130716a5
|
@ -139,7 +139,8 @@ bool ITEM::collideSimple( const ITEM* aHead, const NODE* aNode,
|
|||
}
|
||||
else
|
||||
{
|
||||
clearance = aNode->GetClearance( this, aHead, aCtx->options.m_useClearanceEpsilon );
|
||||
clearance = aNode->GetClearance( this, aHead,
|
||||
aCtx ? aCtx->options.m_useClearanceEpsilon : false );
|
||||
}
|
||||
|
||||
if( clearance >= 0 )
|
||||
|
|
|
@ -598,6 +598,8 @@ bool LINE_PLACER::rhWalkBase( const VECTOR2I& aP, LINE& aWalkLine, int aCollisio
|
|||
|
||||
aViaOk = buildInitialLine( walkP, l1, round == 0 );
|
||||
PNS_DBG( Dbg(), AddItem, &l1, BLUE, 20000, wxT( "walk-base-l1" ) );
|
||||
|
||||
if( l1.EndsWithVia() )
|
||||
PNS_DBG( Dbg(), AddPoint, l1.Via().Pos(), BLUE, 100000, wxT( "walk-base-l1-via" ) );
|
||||
|
||||
LINE initTrack( m_tail );
|
||||
|
@ -731,7 +733,12 @@ bool LINE_PLACER::rhWalkBase( const VECTOR2I& aP, LINE& aWalkLine, int aCollisio
|
|||
}
|
||||
|
||||
PNS_DBG( Dbg(), AddItem, &walkFull, GREEN, 200000, wxT( "walk-full" ) );
|
||||
PNS_DBG( Dbg(), AddPoint, walkFull.Via().Pos(), GREEN, 200000, wxString::Format( "walk-via ok %d", aViaOk?1:0 ) );
|
||||
|
||||
if( walkFull.EndsWithVia() )
|
||||
{
|
||||
PNS_DBG( Dbg(), AddPoint, walkFull.Via().Pos(), GREEN, 200000,
|
||||
wxString::Format( "walk-via ok %d", aViaOk ? 1 : 0 ) );
|
||||
}
|
||||
|
||||
aWalkLine = walkFull;
|
||||
|
||||
|
@ -987,8 +994,11 @@ bool LINE_PLACER::rhShoveOnly( const VECTOR2I& aP, LINE& aNewHead, LINE& aNewTai
|
|||
|
||||
OPTIMIZER optimizer( m_currentNode );
|
||||
|
||||
if( newHead.EndsWithVia() )
|
||||
{
|
||||
PNS_DBG( Dbg(), AddPoint, newHead.Via().Pos(), GREEN, 1000000, "shove-via-preopt" );
|
||||
PNS_DBG( Dbg(), AddPoint, newHead.Via().Pos(), GREEN, 1000000, "shove-via-postopt" );
|
||||
}
|
||||
|
||||
if( ! splitHeadTail( newHead, m_tail, aNewHead, aNewTail ) )
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue