mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
router: initial fix for 'reshoving' tracks whose clearance has been increased
This commit is contained in:
parent
07a86873ca
commit
1907580b82
@ -113,14 +113,6 @@ bool DRAGGER::startDragSegment( const VECTOR2D& aP, SEGMENT* aSeg )
|
||||
m_draggedLine = m_world->AssembleLine( aSeg, &m_draggedSegmentIndex );
|
||||
m_lastDragSolution = m_draggedLine;
|
||||
|
||||
if ( m_world->CheckColliding( &m_draggedLine ) )
|
||||
{
|
||||
// If we're already in a state that violates DRC then there's not much we can do but
|
||||
// switch to mark obstacles mode.
|
||||
m_forceMarkObstaclesMode = true;
|
||||
}
|
||||
|
||||
|
||||
auto distA = ( aP - aSeg->Seg().A ).EuclideanNorm();
|
||||
auto distB = ( aP - aSeg->Seg().B ).EuclideanNorm();
|
||||
|
||||
@ -156,13 +148,6 @@ bool DRAGGER::startDragArc( const VECTOR2D& aP, ARC* aArc )
|
||||
m_draggedLine = m_world->AssembleLine( aArc, &m_draggedSegmentIndex );
|
||||
m_mode = DM_ARC;
|
||||
|
||||
if ( m_world->CheckColliding( &m_draggedLine ) )
|
||||
{
|
||||
// If we're already in a state that violates DRC then there's not much we can do but
|
||||
// switch to mark obstacles mode.
|
||||
m_forceMarkObstaclesMode = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -174,13 +159,6 @@ bool DRAGGER::startDragVia( VIA* aVia )
|
||||
|
||||
m_mode = DM_VIA;
|
||||
|
||||
if ( m_world->CheckColliding( aVia ) )
|
||||
{
|
||||
// If we're already in a state that violates DRC then there's not much we can do but
|
||||
// switch to mark obstacles mode.
|
||||
m_forceMarkObstaclesMode = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -641,7 +619,7 @@ bool DRAGGER::dragShove( const VECTOR2I& aP )
|
||||
}
|
||||
|
||||
m_shove->ClearHeads();
|
||||
m_shove->AddHeads( draggedPreShove, SHOVE::SHP_SHOVE );
|
||||
m_shove->AddHeads( draggedPreShove, SHOVE::SHP_SHOVE | SHOVE::SHP_DONT_LOCK_ENDPOINTS );
|
||||
ok = m_shove->Run() == SHOVE::SH_OK;
|
||||
|
||||
LINE draggedPostShove( draggedPreShove );
|
||||
|
@ -257,7 +257,7 @@ bool MULTI_DRAGGER::Start( const VECTOR2I& aP, ITEM_SET& aPrimitives )
|
||||
m_shove.reset( new SHOVE( m_preShoveNode, Router() ) );
|
||||
m_shove->SetLogger( Logger() );
|
||||
m_shove->SetDebugDecorator( Dbg() );
|
||||
m_shove->SetDefaultShovePolicy( SHOVE::SHP_SHOVE );
|
||||
m_shove->SetDefaultShovePolicy( SHOVE::SHP_SHOVE | SHOVE::SHP_DONT_LOCK_ENDPOINTS );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -2495,13 +2495,14 @@ SHOVE::SHOVE_STATUS SHOVE::Run()
|
||||
|
||||
currentHeadId++;
|
||||
|
||||
if( head.PointCount() > 0 )
|
||||
if( !( headLineEntry.policy & SHP_DONT_LOCK_ENDPOINTS ) )
|
||||
{
|
||||
m_currentNode->LockJoint( head.CPoint( 0 ), &head, true );
|
||||
}
|
||||
if( head.PointCount() > 0 )
|
||||
m_currentNode->LockJoint( head.CPoint( 0 ), &head, true );
|
||||
|
||||
if( !head.EndsWithVia() )
|
||||
m_currentNode->LockJoint( head.CPoint( -1 ), &head, true );
|
||||
if( !head.EndsWithVia() )
|
||||
m_currentNode->LockJoint( head.CPoint( -1 ), &head, true );
|
||||
}
|
||||
|
||||
SetShovePolicy( head, headLineEntry.policy );
|
||||
|
||||
|
@ -62,7 +62,8 @@ public:
|
||||
SHP_WALK_FORWARD = 0x2,
|
||||
SHP_WALK_BACK = 0x4,
|
||||
SHP_IGNORE = 0x8,
|
||||
SHP_DONT_OPTIMIZE = 0x10
|
||||
SHP_DONT_OPTIMIZE = 0x10,
|
||||
SHP_DONT_LOCK_ENDPOINTS = 0x20
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user