router: NODE now can also query joints
This commit is contained in:
parent
6b767d50c3
commit
a6d3ae3c5b
|
@ -1390,6 +1390,46 @@ ARC* NODE::findRedundantArc( ARC* aArc )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int NODE::QueryJoints( const BOX2I& aBox,
|
||||||
|
std::vector<JOINT*>& aJoints,
|
||||||
|
int aLayerMask,
|
||||||
|
int aKindMask
|
||||||
|
)
|
||||||
|
{
|
||||||
|
int n = 0;
|
||||||
|
|
||||||
|
aJoints.clear();
|
||||||
|
|
||||||
|
for( auto j = m_joints.begin(); j != m_joints.end(); ++j )
|
||||||
|
{
|
||||||
|
if ( aBox.Contains(j->second.Pos()) && j->second.LinkCount ( aKindMask ) )
|
||||||
|
{
|
||||||
|
aJoints.push_back( &j->second );
|
||||||
|
n++;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isRoot() )
|
||||||
|
return n;
|
||||||
|
|
||||||
|
for( auto j = m_root->m_joints.begin(); j != m_root->m_joints.end(); ++j )
|
||||||
|
{
|
||||||
|
if( ! Overrides( &j->second) )
|
||||||
|
{ if ( aBox.Contains(j->second.Pos()) && j->second.LinkCount ( aKindMask ) )
|
||||||
|
{
|
||||||
|
aJoints.push_back( &j->second );
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return n;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ITEM *NODE::FindItemByParent( const BOARD_CONNECTED_ITEM* aParent )
|
ITEM *NODE::FindItemByParent( const BOARD_CONNECTED_ITEM* aParent )
|
||||||
{
|
{
|
||||||
INDEX::NET_ITEMS_LIST* l_cur = m_index->GetItemsForNet( aParent->GetNetCode() );
|
INDEX::NET_ITEMS_LIST* l_cur = m_index->GetItemsForNet( aParent->GetNetCode() );
|
||||||
|
|
|
@ -207,6 +207,8 @@ public:
|
||||||
bool aDifferentNetsOnly = true,
|
bool aDifferentNetsOnly = true,
|
||||||
int aForceClearance = -1 );
|
int aForceClearance = -1 );
|
||||||
|
|
||||||
|
int QueryJoints( const BOX2I& aBox, std::vector<JOINT*> & aJoints, int aLayerMask = -1, int aKindMask = ITEM::ANY_T);
|
||||||
|
|
||||||
int QueryColliding( const ITEM* aItem,
|
int QueryColliding( const ITEM* aItem,
|
||||||
OBSTACLE_VISITOR& aVisitor
|
OBSTACLE_VISITOR& aVisitor
|
||||||
);
|
);
|
||||||
|
@ -464,6 +466,7 @@ private:
|
||||||
void unlinkParent();
|
void unlinkParent();
|
||||||
void releaseChildren();
|
void releaseChildren();
|
||||||
void releaseGarbage();
|
void releaseGarbage();
|
||||||
|
void rebuildJoint( JOINT* aJoint, ITEM* aItem );
|
||||||
|
|
||||||
bool isRoot() const
|
bool isRoot() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue