]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
take into account orphan nodes at mesh concatenation
authoreap <eap@opencascade.com>
Mon, 13 Dec 2010 11:47:02 +0000 (11:47 +0000)
committereap <eap@opencascade.com>
Mon, 13 Dec 2010 11:47:02 +0000 (11:47 +0000)
src/SMESH_I/SMESH_Gen_i.cxx

index 41aa724c5e9ec5768ffb0b96973b7933a8a4e4d2..6b4fac320715721468f0da0efc622a0fff92b734 100644 (file)
@@ -2026,7 +2026,23 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
                 }
               } 
             }//elems loop
-            
+
+            // copy orphan nodes
+            SMDS_NodeIteratorPtr  itNodes = anInitMeshDS->nodesIterator();
+            while ( itNodes->more() )
+            {
+              const SMDS_MeshNode* aNode = itNodes->next();
+              if ( aNode->NbInverseElements() == 0 )
+              {
+                const SMDS_MeshNode* aNewNode =
+                  aNewMeshDS->AddNode(aNode->X(), aNode->Y(), aNode->Z());
+                nodesMap.insert( make_pair(aNode->GetID(), aNewNode->GetID()) );
+                if( theCommonGroups )
+                  anIDsNodes[anNbNodes++] = aNewNode->GetID();
+              }
+            }
+
+
             aListOfGroups = anInitImpl->GetGroups();
             SMESH::SMESH_GroupBase_ptr aGroup;