]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMDS/SMDS_ElementFactory.cxx
Salome HOME
bos #26454 [EDF] (2021) SMESH: interactive mesh modification
[modules/smesh.git] / src / SMDS / SMDS_ElementFactory.cxx
index c3ab97c8c9444829f709486d0806ab1f3b60f812..dda4337c0ca814553eb4a25c0a064790717bbecc 100644 (file)
@@ -230,6 +230,18 @@ smIdType SMDS_ElementFactory::FromVtkToSmds( vtkIdType vtkID )
   return vtkID + 1;
 }
 
+//================================================================================
+/*!
+ * \brief Clear marked flag of all elements
+ */
+//================================================================================
+
+void SMDS_ElementFactory::SetAllNotMarked()
+{
+  for ( SMDS_ElementChunk& chunk : myChunks )
+    chunk.SetAllNotMarked();
+}
+
 //================================================================================
 /*!
  * \brief Mark the element as non-used
@@ -637,6 +649,13 @@ void SMDS_ElementChunk::SetVTKID( const SMDS_MeshElement* e, const vtkIdType vtk
     }
     myFactory->mySmdsIDs[ vtkID ] = e->GetID() - 1;
   }
+  else
+  {
+    if ((size_t) e->GetID() <= myFactory->myVtkIDs.size() )
+      myFactory->myVtkIDs[ e->GetID() - 1 ] = vtkID;
+    if ((size_t) vtkID < myFactory->mySmdsIDs.size() )
+      myFactory->mySmdsIDs[ vtkID ] = e->GetID() - 1;
+  }
 }
 
 //================================================================================
@@ -727,6 +746,17 @@ void SMDS_ElementChunk::SetIsMarked( const SMDS_MeshElement* e, bool is )
   myMarkedSet[ Index( e )] = is;
 }
 
+//================================================================================
+/*!
+ * \brief Clear marked flag of all elements
+ */
+//================================================================================
+
+void SMDS_ElementChunk::SetAllNotMarked()
+{
+  clearVector( myMarkedSet );
+}
+
 //================================================================================
 /*!
  * \brief Return SMDS_Position of a node on a shape