mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-11 04:23:06 +05:00
PAL13460 (force the mesh to go through a point)
add SMDSAbs_ElementType arg to NbInverseNodes()
This commit is contained in:
parent
e406de3c30
commit
bc9732c239
@ -240,6 +240,24 @@ bool SMDS_MeshNode::emptyInverseElements()
|
|||||||
return myInverseElements.IsEmpty() != Standard_False;
|
return myInverseElements.IsEmpty() != Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Count inverse elements of given type
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
int SMDS_MeshNode::NbInverseNodes(SMDSAbs_ElementType type) const
|
||||||
|
{
|
||||||
|
if ( type == SMDSAbs_All )
|
||||||
|
return myInverseElements.Extent();
|
||||||
|
int nb = 0;
|
||||||
|
NCollection_List<const SMDS_MeshElement*>::Iterator it( myInverseElements );
|
||||||
|
for ( ; it.More(); it.Next() )
|
||||||
|
if ( it.Value()->GetType() == type )
|
||||||
|
nb++;
|
||||||
|
return nb;
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// To be used with STL set
|
/// To be used with STL set
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -57,7 +57,7 @@ class SMDS_WNT_EXPORT SMDS_MeshNode:public SMDS_MeshElement
|
|||||||
void ClearInverseElements();
|
void ClearInverseElements();
|
||||||
bool emptyInverseElements();
|
bool emptyInverseElements();
|
||||||
SMDS_ElemIteratorPtr GetInverseElementIterator(SMDSAbs_ElementType type=SMDSAbs_All) const;
|
SMDS_ElemIteratorPtr GetInverseElementIterator(SMDSAbs_ElementType type=SMDSAbs_All) const;
|
||||||
int NbInverseNodes() const { return myInverseElements.Extent(); }
|
int NbInverseNodes(SMDSAbs_ElementType type=SMDSAbs_All) const;
|
||||||
void SetPosition(const SMDS_PositionPtr& aPos);
|
void SetPosition(const SMDS_PositionPtr& aPos);
|
||||||
const SMDS_PositionPtr& GetPosition() const;
|
const SMDS_PositionPtr& GetPosition() const;
|
||||||
SMDSAbs_ElementType GetType() const;
|
SMDSAbs_ElementType GetType() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user