router: SplitAdjacentSegments() should check if the end segment we are about to split is in the same net that the head segment

Otherwise, the router might add bogus segments to the node. The root of the problem is somewhere in the logic that delivers aEndItem to ROUTER::Move() though - as the end item (in line placement mode at least) should always be an item within the same net as the head and not belonging to the current head...
This commit is contained in:
Tomasz Wlostowski 2024-02-19 23:28:55 +01:00 committed by dsa-t
parent 8d76e4e171
commit 82312a0fae
1 changed files with 2 additions and 1 deletions

View File

@ -1490,7 +1490,8 @@ bool LINE_PLACER::Move( const VECTOR2I& aP, ITEM* aEndItem )
&& aEndItem && latestNode->Depth() >= eiDepth
&& current.SegmentCount() )
{
SplitAdjacentSegments( m_lastNode, aEndItem, current.CPoint( -1 ) );
if ( aEndItem->Net() == m_currentNet )
SplitAdjacentSegments( m_lastNode, aEndItem, current.CPoint( -1 ) );
if( Settings().RemoveLoops() )
removeLoops( m_lastNode, current );