mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-13 00:14:36 +05:00
New methods for SMDS_Mesh
GetElementType - returns element type by id
This commit is contained in:
parent
cf285acaa8
commit
4800541e9e
@ -2179,3 +2179,25 @@ void SMDS_Mesh::Renumber (const bool isNodes, const int startID, const int del
|
|||||||
ID += deltaID;
|
ID += deltaID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetElementType
|
||||||
|
//purpose : Return type of element or node with id
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMDSAbs_ElementType SMDS_Mesh::GetElementType( const int id, const bool iselem ) const
|
||||||
|
{
|
||||||
|
SMDS_MeshElement* elem = 0;
|
||||||
|
if( iselem )
|
||||||
|
elem = myElementIDFactory->MeshElement( id );
|
||||||
|
else
|
||||||
|
elem = myNodeIDFactory->MeshElement( id );
|
||||||
|
|
||||||
|
if( !elem )
|
||||||
|
{
|
||||||
|
//throw SALOME_Exception(LOCALIZED ("this element isn't exist"));
|
||||||
|
return SMDSAbs_All;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return elem->GetType();
|
||||||
|
}
|
||||||
|
@ -59,6 +59,8 @@ public:
|
|||||||
SMDS_VolumeIteratorPtr volumesIterator() const;
|
SMDS_VolumeIteratorPtr volumesIterator() const;
|
||||||
SMDS_ElemIteratorPtr elementsIterator() const;
|
SMDS_ElemIteratorPtr elementsIterator() const;
|
||||||
|
|
||||||
|
SMDSAbs_ElementType GetElementType( const int id, const bool iselem ) const;
|
||||||
|
|
||||||
SMDS_Mesh *AddSubMesh();
|
SMDS_Mesh *AddSubMesh();
|
||||||
|
|
||||||
virtual SMDS_MeshNode* AddNodeWithID(double x, double y, double z, int ID);
|
virtual SMDS_MeshNode* AddNodeWithID(double x, double y, double z, int ID);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user