Remove virtual items from clearance calculations
Extends 3ea970f8c9
to ensure that virtual items do not interfere with
DRC calculations while routing
Fixes https://gitlab.com/kicad/code/kicad/issues/8788
This commit is contained in:
parent
3ea970f8c9
commit
ff2e470a6e
|
@ -103,6 +103,9 @@ int NODE::GetClearance( const ITEM* aA, const ITEM* aB ) const
|
|||
if( !m_ruleResolver )
|
||||
return 100000;
|
||||
|
||||
if( aA->IsVirtual() || aB->IsVirtual() )
|
||||
return 0;
|
||||
|
||||
return m_ruleResolver->Clearance( aA, aB );
|
||||
}
|
||||
|
||||
|
@ -112,6 +115,9 @@ int NODE::GetHoleClearance( const ITEM* aA, const ITEM* aB ) const
|
|||
if( !m_ruleResolver )
|
||||
return 0;
|
||||
|
||||
if( aA->IsVirtual() || aB->IsVirtual() )
|
||||
return 0;
|
||||
|
||||
return m_ruleResolver->HoleClearance( aA, aB );
|
||||
}
|
||||
|
||||
|
@ -121,6 +127,9 @@ int NODE::GetHoleToHoleClearance( const ITEM* aA, const ITEM* aB ) const
|
|||
if( !m_ruleResolver )
|
||||
return 0;
|
||||
|
||||
if( aA->IsVirtual() || aB->IsVirtual() )
|
||||
return 0;
|
||||
|
||||
return m_ruleResolver->HoleToHoleClearance( aA, aB );
|
||||
}
|
||||
|
||||
|
@ -257,6 +266,10 @@ struct NODE::DEFAULT_OBSTACLE_VISITOR : public OBSTACLE_VISITOR
|
|||
int NODE::QueryColliding( const ITEM* aItem, NODE::OBSTACLES& aObstacles, int aKindMask,
|
||||
int aLimitCount, bool aDifferentNetsOnly )
|
||||
{
|
||||
/// By default, virtual items cannot collide
|
||||
if( aItem->IsVirtual() )
|
||||
return 0;
|
||||
|
||||
DEFAULT_OBSTACLE_VISITOR visitor( aObstacles, aItem, aKindMask, aDifferentNetsOnly );
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
Loading…
Reference in New Issue