mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 17:10:32 +05:00
PAL16617 (Modification/Transformation operations with copy don't create a new mesh)
+ virtual bool Contains (const SMDS_MeshElement* elem);
This commit is contained in:
parent
53660eaf43
commit
2e446e7121
@ -77,6 +77,18 @@ bool SMESHDS_Group::Contains (const int theID)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Contains
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
bool SMESHDS_Group::Contains (const SMDS_MeshElement* elem)
|
||||||
|
{
|
||||||
|
if (elem)
|
||||||
|
return myGroup.Contains(elem);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
|
@ -51,6 +51,8 @@ class SMESHDS_EXPORT SMESHDS_Group : public SMESHDS_GroupBase
|
|||||||
|
|
||||||
virtual bool Contains (const int theID);
|
virtual bool Contains (const int theID);
|
||||||
|
|
||||||
|
virtual bool Contains (const SMDS_MeshElement* elem);
|
||||||
|
|
||||||
virtual SMDS_ElemIteratorPtr GetElements();
|
virtual SMDS_ElemIteratorPtr GetElements();
|
||||||
|
|
||||||
bool Add (const int theID);
|
bool Add (const int theID);
|
||||||
|
@ -132,12 +132,23 @@ bool SMESHDS_GroupBase::IsEmpty()
|
|||||||
|
|
||||||
bool SMESHDS_GroupBase::Contains (const int theID)
|
bool SMESHDS_GroupBase::Contains (const int theID)
|
||||||
{
|
{
|
||||||
SMDS_ElemIteratorPtr it = GetElements();
|
if ( SMDS_ElemIteratorPtr it = GetElements() ) {
|
||||||
bool contains = false;
|
while ( it->more() )
|
||||||
if ( it )
|
if ( it->next()->GetID() == theID )
|
||||||
while ( !contains && it->more() )
|
return true;
|
||||||
contains = ( it->next()->GetID() == theID );
|
}
|
||||||
return contains;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Contains
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
bool SMESHDS_GroupBase::Contains (const SMDS_MeshElement* elem)
|
||||||
|
{
|
||||||
|
if ( elem )
|
||||||
|
return Contains( elem->GetID() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -63,6 +63,8 @@ class SMESHDS_EXPORT SMESHDS_GroupBase
|
|||||||
|
|
||||||
virtual bool Contains (const int theID);
|
virtual bool Contains (const int theID);
|
||||||
|
|
||||||
|
virtual bool Contains (const SMDS_MeshElement* elem);
|
||||||
|
|
||||||
virtual SMDS_ElemIteratorPtr GetElements() = 0;
|
virtual SMDS_ElemIteratorPtr GetElements() = 0;
|
||||||
|
|
||||||
int GetID (const int theIndex);
|
int GetID (const int theIndex);
|
||||||
|
@ -110,3 +110,14 @@ bool SMESHDS_GroupOnGeom::Contains (const int theID)
|
|||||||
{
|
{
|
||||||
return mySubMesh->Contains( findInMesh( theID ));
|
return mySubMesh->Contains( findInMesh( theID ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Contains
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
bool SMESHDS_GroupOnGeom::Contains (const SMDS_MeshElement* elem)
|
||||||
|
{
|
||||||
|
return mySubMesh->Contains( elem );
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,8 @@ class SMESHDS_EXPORT SMESHDS_GroupOnGeom: public SMESHDS_GroupBase
|
|||||||
|
|
||||||
virtual bool Contains (const int theID);
|
virtual bool Contains (const int theID);
|
||||||
|
|
||||||
|
virtual bool Contains (const SMDS_MeshElement* elem);
|
||||||
|
|
||||||
virtual SMDS_ElemIteratorPtr GetElements();
|
virtual SMDS_ElemIteratorPtr GetElements();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user