]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix idSourceToNodeSet() for the case of mesh with free nodes
authoreap <eap@opencascade.com>
Mon, 21 Mar 2011 10:19:55 +0000 (10:19 +0000)
committereap <eap@opencascade.com>
Mon, 21 Mar 2011 10:19:55 +0000 (10:19 +0000)
src/SMESH_I/SMESH_MeshEditor_i.cxx

index 74fe9545d264f5ab057d0b02cc8026ffa77a4028..cccac710f7eafd7175ba70f5628f18bba4b281b8 100644 (file)
@@ -311,7 +311,15 @@ namespace {
         if ( const SMDS_MeshNode * n = theMeshDS->FindNode( aElementsId[i] ))
           theNodeSet.insert( theNodeSet.end(), n);
     }
-    else {
+    else if ( SMESH::DownCast<SMESH_Mesh_i*>( theObject ))
+    {
+      SMDS_NodeIteratorPtr nIt = theMeshDS->nodesIterator();
+      while ( nIt->more( ))
+        if( const SMDS_MeshElement * elem = nIt->next() )
+          theNodeSet.insert( elem->begin_nodes(), elem->end_nodes());
+    }
+    else
+    {
       for(int i = 0; i < aElementsId->length(); i++)
         if( const SMDS_MeshElement * elem = theMeshDS->FindElement( aElementsId[i] ))
           theNodeSet.insert( elem->begin_nodes(), elem->end_nodes());