mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-15 12:23:06 +05:00
add GetNodeIndex()
This commit is contained in:
parent
53781e4054
commit
69ddeca946
@ -218,3 +218,20 @@ bool SMDS_MeshElement::IsMediumNode(const SMDS_MeshNode* node) const
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Check if a node belongs to the element
|
||||||
|
* \param node - the node to check
|
||||||
|
* \retval int - node index within the element, -1 if not found
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
int SMDS_MeshElement::GetNodeIndex( const SMDS_MeshNode* node ) const
|
||||||
|
{
|
||||||
|
SMDS_ElemIteratorPtr nIt = nodesIterator();
|
||||||
|
for ( int i = 0; nIt->more(); ++i )
|
||||||
|
if ( nIt->next() == node )
|
||||||
|
return i;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
@ -108,6 +108,13 @@ public:
|
|||||||
return ind;
|
return ind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Check if a node belongs to the element
|
||||||
|
* \param node - the node to check
|
||||||
|
* \retval int - node index within the element, -1 if not found
|
||||||
|
*/
|
||||||
|
int GetNodeIndex( const SMDS_MeshNode* node ) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SMDS_MeshElement(int ID=-1);
|
SMDS_MeshElement(int ID=-1);
|
||||||
virtual void Print(std::ostream & OS) const;
|
virtual void Print(std::ostream & OS) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user