From cb561f9569d909b7a4bebdf26bc749cd013f49e2 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 21 Mar 2011 10:19:55 +0000 Subject: [PATCH] Fix idSourceToNodeSet() for the case of mesh with free nodes --- src/SMESH_I/SMESH_MeshEditor_i.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 74fe9545d..cccac710f 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -311,7 +311,15 @@ namespace { if ( const SMDS_MeshNode * n = theMeshDS->FindNode( aElementsId[i] )) theNodeSet.insert( theNodeSet.end(), n); } - else { + else if ( SMESH::DownCast( 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()); -- 2.39.2