Salome HOME
NPAL16182 ("Propagation on opposite edges" don't work with 5 edges quadrangle)
authoreap <eap@opencascade.com>
Fri, 15 Jun 2007 09:31:58 +0000 (09:31 +0000)
committereap <eap@opencascade.com>
Fri, 15 Jun 2007 09:31:58 +0000 (09:31 +0000)
   Notify VERTEX sub-meshes about modification

src/SMESH/SMESH_MeshEditor.cxx

index fd476a0a0339316c6758267c569186b03c64ee82..54d446c987f16ca14e268dccd49923329a88d244 100644 (file)
@@ -269,6 +269,14 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
     if ( !elem )
       continue;
 
+    // Notify VERTEX sub-meshes about modification
+    if ( isNodes ) {
+      const SMDS_MeshNode* node = cast2Node( elem );
+      if ( node->GetPosition()->GetTypeOfPosition() == SMDS_TOP_VERTEX )
+        if ( int aShapeID = node->GetPosition()->GetShapeId() )
+          if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShapeID ) )
+            smmap.insert( sm );
+    }
     // Find sub-meshes to notify about modification
 //     SMDS_ElemIteratorPtr nodeIt = elem->nodesIterator();
 //     while ( nodeIt->more() ) {
@@ -290,11 +298,11 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
   }
 
   // Notify sub-meshes about modification
-//   if ( !smmap.empty() ) {
-//     set< SMESH_subMesh *>::iterator smIt;
-//     for ( smIt = smmap.begin(); smIt != smmap.end(); smIt++ )
-//       (*smIt)->ComputeStateEngine( SMESH_subMesh::MESH_ENTITY_REMOVED );
-//   }
+  if ( !smmap.empty() ) {
+    set< SMESH_subMesh *>::iterator smIt;
+    for ( smIt = smmap.begin(); smIt != smmap.end(); smIt++ )
+      (*smIt)->ComputeStateEngine( SMESH_subMesh::MESH_ENTITY_REMOVED );
+  }
 
 //   // Check if the whole mesh becomes empty
 //   if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( 1 ) )