Preflight routing so we can give a warning if it's not going to work.

Fixes https://gitlab.com/kicad/code/kicad/issues/4975
This commit is contained in:
Jeff Young 2020-11-02 00:09:46 +00:00
parent 8bfb255c96
commit 76ac8b5acf
1 changed files with 3 additions and 2 deletions

View File

@ -183,17 +183,18 @@ bool ROUTER::isStartingPointRoutable( const VECTOR2I& aWhere, ITEM* aStartItem,
return false; return false;
} }
if( m_mode == PNS_MODE_ROUTE_SINGLE ) if( m_mode == PNS_MODE_ROUTE_SINGLE && aStartItem )
{ {
VECTOR2I startPoint = aStartItem->Anchor( 0 ); VECTOR2I startPoint = aStartItem->Anchor( 0 );
SEGMENT dummyStartSeg( SEG( startPoint, startPoint ), aStartItem->Net() ); SEGMENT dummyStartSeg( SEG( startPoint, startPoint ), aStartItem->Net() );
dummyStartSeg.SetWidth( m_sizes.TrackWidth() ); dummyStartSeg.SetWidth( m_sizes.TrackWidth() );
dummyStartSeg.SetLayer( aLayer );
if( m_world->CheckColliding( &dummyStartSeg, ITEM::ANY_T ) ) if( m_world->CheckColliding( &dummyStartSeg, ITEM::ANY_T ) )
return false; return false;
} }
else if( m_mode == PNS_MODE_ROUTE_DIFF_PAIR ) else if( m_mode == PNS_MODE_ROUTE_DIFF_PAIR && aStartItem )
{ {
// TODO // TODO
} }