Salome HOME
Do not recompute automatically if a submesh becomes empty
authoreap <eap@opencascade.com>
Fri, 8 Jun 2007 12:12:22 +0000 (12:12 +0000)
committereap <eap@opencascade.com>
Fri, 8 Jun 2007 12:12:22 +0000 (12:12 +0000)
src/SMESH/SMESH_MeshEditor.cxx

index 66ec1d36afcd07ccdad5e588e7d2c723b1d5394c..fd476a0a0339316c6758267c569186b03c64ee82 100644 (file)
@@ -270,17 +270,17 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
       continue;
 
     // Find sub-meshes to notify about modification
       continue;
 
     // Find sub-meshes to notify about modification
-    SMDS_ElemIteratorPtr nodeIt = elem->nodesIterator();
-    while ( nodeIt->more() ) {
-      const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
-      const SMDS_PositionPtr& aPosition = node->GetPosition();
-      if ( aPosition.get() ) {
-        if ( int aShapeID = aPosition->GetShapeId() ) {
-          if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShapeID ) )
-            smmap.insert( sm );
-        }
-      }
-    }
+//     SMDS_ElemIteratorPtr nodeIt = elem->nodesIterator();
+//     while ( nodeIt->more() ) {
+//       const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
+//       const SMDS_PositionPtr& aPosition = node->GetPosition();
+//       if ( aPosition.get() ) {
+//         if ( int aShapeID = aPosition->GetShapeId() ) {
+//           if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShapeID ) )
+//             smmap.insert( sm );
+//         }
+//       }
+//     }
 
     // Do remove
     if ( isNodes )
 
     // Do remove
     if ( isNodes )
@@ -290,15 +290,15 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
   }
 
   // Notify sub-meshes about modification
   }
 
   // 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 ) )
-    sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
+//   // Check if the whole mesh becomes empty
+//   if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( 1 ) )
+//     sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
 
   return true;
 }
 
   return true;
 }
@@ -7224,7 +7224,9 @@ SMESH_MeshEditor::Sew_Error
    */
 //================================================================================
 
    */
 //================================================================================
 
+#ifdef _DEBUG_
 //#define DEBUG_MATCHING_NODES
 //#define DEBUG_MATCHING_NODES
+#endif
 
 SMESH_MeshEditor::Sew_Error
 SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,
 
 SMESH_MeshEditor::Sew_Error
 SMESH_MeshEditor::FindMatchingNodes(set<const SMDS_MeshElement*>& theSide1,