Salome HOME
Typo fixes by Kunda
[modules/smesh.git] / src / SMESH_I / SMESH_MeshEditor_i.cxx
index ba435e4aac7fde3eeb4d8931fa1d83b43341e0f6..c32453a9dbc4cd61651e439f4c6b726dee890fda 100644 (file)
@@ -7490,7 +7490,7 @@ void SMESH_MeshEditor_i::MakePolyLine(SMESH::ListOfPolySegments& theSegments,
 //================================================================================
 /*!
  * \brief Create a slot of given width around given 1D elements lying on a triangle mesh.
- *        The slot is consrtucted by cutting faces by cylindrical surfaces made
+ *        The slot is constructed by cutting faces by cylindrical surfaces made
  *        around each segment. Segments are expected to be created by MakePolyLine().
  * \return Edges located at the slot boundary
  */
@@ -7513,9 +7513,18 @@ SMESH::ListOfEdges* SMESH_MeshEditor_i::MakeSlot(SMESH::SMESH_GroupBase_ptr theS
 
   SMESHDS_Mesh* meshDS = getMeshDS();
 
+  // get standalone face groups to be updated
+  std::vector< SMDS_MeshGroup* > faceGroups;
+  const std::set<SMESHDS_GroupBase*>& allGroups = meshDS->GetGroups();
+  std::set<SMESHDS_GroupBase*>::const_iterator grIt = allGroups.begin();
+  for ( ; grIt != allGroups.end(); ++grIt )
+    if ( const SMESHDS_Group* gr = dynamic_cast< const SMESHDS_Group* >( *grIt ))
+      if ( gr->GetType() == SMDSAbs_Face )
+        faceGroups.push_back( & const_cast< SMESHDS_Group* >( gr )->SMDSGroup() );
+
   std::vector< SMESH_MeshAlgos::Edge > edges =
     SMESH_MeshAlgos::MakeSlot( SMESH_Mesh_i::GetElements( theSegments, SMESH::EDGE ),
-                               theWidth, meshDS );
+                               theWidth, meshDS, faceGroups );
 
   resultEdges->length( edges.size() );
   for ( size_t i = 0; i < edges.size(); ++i )