///////////////////////////////////////////////////////////////////////////////
/// Return the sub mesh by Id of shape it is linked to
///////////////////////////////////////////////////////////////////////////////
-SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const int Index)
+SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const int Index) const
{
TShapeIndexToSubMesh::const_iterator anIter = myShapeIndexToSubMesh.find(Index);
if (anIter != myShapeIndexToSubMesh.end())
//function : SubMeshIndices
//purpose :
//=======================================================================
-list<int> SMESHDS_Mesh::SubMeshIndices()
+list<int> SMESHDS_Mesh::SubMeshIndices() const
{
list<int> anIndices;
- std::map<int,SMESHDS_SubMesh*>::iterator anIter = myShapeIndexToSubMesh.begin();
+ std::map<int,SMESHDS_SubMesh*>::const_iterator anIter = myShapeIndexToSubMesh.begin();
for (; anIter != myShapeIndexToSubMesh.end(); anIter++) {
anIndices.push_back((*anIter).first);
}
//function : HasMeshElements
//purpose :
//=======================================================================
-bool SMESHDS_Mesh::HasMeshElements(const TopoDS_Shape & S)
+bool SMESHDS_Mesh::HasMeshElements(const TopoDS_Shape & S) const
{
if (myShape.IsNull()) MESSAGE("myShape is NULL");
int Index = myIndexToShape.FindIndex(S);
const TopoDS_Shape & S);
void UnSetMeshElementOnShape(const SMDS_MeshElement * anElt,
const TopoDS_Shape & S);
- bool HasMeshElements(const TopoDS_Shape & S);
+ bool HasMeshElements(const TopoDS_Shape & S) const;
SMESHDS_SubMesh * MeshElements(const TopoDS_Shape & S) const;
- SMESHDS_SubMesh * MeshElements(const int Index);
- std::list<int> SubMeshIndices();
+ SMESHDS_SubMesh * MeshElements(const int Index) const;
+ std::list<int> SubMeshIndices() const;
const std::map<int,SMESHDS_SubMesh*>& SubMeshes() const
{ return myShapeIndexToSubMesh; }