Salome HOME
fix FPE error at "Clear mesh data" by setting nb of nodes to zero
[modules/smesh.git] / src / SMDS / SMDS_MeshElement.cxx
index 185b3c5498408dcbcd048631ee9fc2c059ed4919..e032c3a333852320cb61dd718c516ea660cbd91b 100644 (file)
 
 using namespace std;
 
-SMDS_MeshElement::SMDS_MeshElement(int ID):myID(ID)
+SMDS_MeshElement::SMDS_MeshElement(int ID)
 {
+  init(ID);
+}
+
+SMDS_MeshElement::SMDS_MeshElement(int id, ShortType meshId, LongType shapeId)
+{
+  init(id, meshId, shapeId);
+}
+
+void SMDS_MeshElement::init(int id, ShortType meshId, LongType shapeId )
+{
+  myID = id;
+  myMeshId = meshId;
+  myShapeId = shapeId;
+  myIdInShape = -1;
 }
 
 void SMDS_MeshElement::Print(ostream & OS) const
@@ -146,6 +160,7 @@ class SMDS_MeshElement_MyIterator:public SMDS_ElemIterator
     return myElement;   
   }     
 };
+
 SMDS_ElemIteratorPtr SMDS_MeshElement::
         elementsIterator(SMDSAbs_ElementType type) const
 {
@@ -162,12 +177,18 @@ SMDS_ElemIteratorPtr SMDS_MeshElement::
         }
 }
 
-///////////////////////////////////////////////////////////////////////////////
-///Return the ID of the element
-///////////////////////////////////////////////////////////////////////////////
-int SMDS_MeshElement::GetID() const
+//! virtual, redefined in vtkEdge, vtkFace and vtkVolume classes
+SMDS_ElemIteratorPtr SMDS_MeshElement::nodesIteratorToUNV() const
+{
+  MESSAGE("Iterator not implemented");
+  return SMDS_ElemIteratorPtr((SMDS_ElemIterator*) NULL);
+}
+
+//! virtual, redefined in vtkEdge, vtkFace and vtkVolume classes
+SMDS_ElemIteratorPtr SMDS_MeshElement::interlacedNodesElemIterator() const
 {
-        return myID;
+  MESSAGE("Iterator not implemented");
+  return SMDS_ElemIteratorPtr((SMDS_ElemIterator*) NULL);
 }
 
 bool operator<(const SMDS_MeshElement& e1, const SMDS_MeshElement& e2)