From 9d59c1d0558377eec5fb5448eb9a703efbd6f15b Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 13 Dec 2010 11:47:02 +0000 Subject: [PATCH] take into account orphan nodes at mesh concatenation --- src/SMESH_I/SMESH_Gen_i.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 41aa724c5..6b4fac320 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -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; -- 2.39.2