mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 17:30:32 +05:00
GetElementType method added
This commit is contained in:
parent
aff71929ea
commit
bbfbac1990
@ -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();
|
||||||
|
}
|
@ -58,6 +58,8 @@ public:
|
|||||||
SMDS_FaceIteratorPtr facesIterator() const;
|
SMDS_FaceIteratorPtr facesIterator() const;
|
||||||
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();
|
||||||
|
|
||||||
|
@ -1418,3 +1418,12 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
|||||||
save << "===========================================================================" << endl;
|
save << "===========================================================================" << endl;
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetElementType
|
||||||
|
//purpose : Returns type of mesh element with certain id
|
||||||
|
//=======================================================================
|
||||||
|
SMDSAbs_ElementType SMESH_Mesh::GetElementType( const int id, const bool iselem )
|
||||||
|
{
|
||||||
|
return _myMeshDS->GetElementType( id, iselem );
|
||||||
|
}
|
@ -221,6 +221,8 @@ public:
|
|||||||
bool RebuildPropagationChains();
|
bool RebuildPropagationChains();
|
||||||
bool RemovePropagationChain (const TopoDS_Shape& theMainEdge);
|
bool RemovePropagationChain (const TopoDS_Shape& theMainEdge);
|
||||||
bool BuildPropagationChain (const TopoDS_Shape& theMainEdge);
|
bool BuildPropagationChain (const TopoDS_Shape& theMainEdge);
|
||||||
|
|
||||||
|
SMDSAbs_ElementType GetElementType( const int id, const bool iselem );
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user