]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix bug of NodeSearcher: search fails if point is outside the mesh on the distance...
authorvsr <vsr@opencascade.com>
Mon, 21 Jun 2010 07:29:04 +0000 (07:29 +0000)
committervsr <vsr@opencascade.com>
Mon, 21 Jun 2010 07:29:04 +0000 (07:29 +0000)
src/SMESH/SMESH_MeshEditor.cxx

index 44ec9e40812e53a7b73a43ba8a53c76ea176584e..62d1da1f3178b79839b7bce945794fa4cdb06fb4 100644 (file)
@@ -5972,12 +5972,13 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
       treeList.push_back( myOctreeNode );
 
       SMDS_MeshNode pointNode( thePnt.X(), thePnt.Y(), thePnt.Z() );
+      bool pointInside = myOctreeNode->isInside( &pointNode, myHalfLeafSize );
       for ( trIt = treeList.begin(); trIt != treeList.end(); ++trIt)
       {
         SMESH_OctreeNode* tree = *trIt;
         if ( !tree->isLeaf() ) // put children to the queue
         {
-          //if ( !tree->isInside( &pointNode, myHalfLeafSize )) continue;
+          if ( pointInside && !tree->isInside( &pointNode, myHalfLeafSize )) continue;
           SMESH_OctreeNodeIteratorPtr cIt = tree->GetChildrenIterator();
           while ( cIt->more() )
             treeList.push_back( cIt->next() );