Check vias before holes as we assume any hole is non-pushable.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15840

(cherry picked from commit fb84f4592b)
This commit is contained in:
Jeff Young 2023-10-22 22:45:23 +01:00
parent fb387a2c09
commit 05912b0381
1 changed files with 10 additions and 2 deletions

View File

@ -124,7 +124,15 @@ int SHOVE::getClearance( const ITEM* aA, const ITEM* aB ) const
if( m_forceClearance >= 0 )
return m_forceClearance;
return m_currentNode->GetClearance( aA, aB, false );
int clearance = m_currentNode->GetClearance( aA, aB, false );
if( aA->HasHole() )
clearance = std::max( clearance, m_currentNode->GetClearance( aA->Hole(), aB, false ) );
if( aB->HasHole() )
clearance = std::max( clearance, m_currentNode->GetClearance( aA, aB->Hole(), false ) );
return clearance;
}
@ -1308,7 +1316,7 @@ SHOVE::SHOVE_STATUS SHOVE::shoveIteration( int aIter )
PNS_DBG( Dbg(), AddItem, &currentLine, RED, currentLine.Width(), wxString::Format( wxT( "current-coll-chk rank %d" ), currentLine.Rank() ) );
for( ITEM::PnsKind search_order : { ITEM::HOLE_T, ITEM::SOLID_T, ITEM::VIA_T, ITEM::SEGMENT_T } )
for( ITEM::PnsKind search_order : { ITEM::SOLID_T, ITEM::VIA_T, ITEM::SEGMENT_T, ITEM::HOLE_T } )
{
COLLISION_SEARCH_OPTIONS opts;
opts.m_kindMask = search_order;