Salome HOME
Merge branch 'master' into V7_5_BR
[modules/smesh.git] / src / StdMeshers / StdMeshers_Import_1D2D.cxx
index 6aff7c2078072f33b097a32f716a5e43b500b2fe..c8b1a70c59eb01394404bbb31ce3b3bf3c8ce263 100644 (file)
@@ -97,6 +97,7 @@ StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(int hypId, int studyId, SMESH_Gen
 
   _compatibleHypothesis.push_back("ImportSource2D");
   _requireDiscreteBoundary = false;
+  _supportSubmeshes = true;
 }
 
 //=============================================================================
@@ -212,7 +213,7 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
     existingNodes.insert( n );
   }
 
-  // get EDGESs and their ids and get existing nodes on EDGEs
+  // get EDGEs and their ids and get existing nodes on EDGEs
   vector< TopoDS_Edge > edges;
   for ( exp.Init( theShape, TopAbs_EDGE ); exp.More(); exp.Next() )
   {
@@ -280,7 +281,8 @@ bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
         {
           // find a pre-existing node
           dist2foundNodes.clear();
-          if ( existingNodeOcTr.NodesAround( SMESH_TNodeXYZ( *node ), dist2foundNodes, groupTol ))
+          existingNodeOcTr.NodesAround( SMESH_TNodeXYZ( *node ), dist2foundNodes, groupTol );
+          if ( !dist2foundNodes.empty() )
             (*n2nIt).second = dist2foundNodes.begin()->second;
         }
         if ( !n2nIt->second )