mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 12:00:33 +05:00
Fix bug of NodeSearcher: search fails if point is outside the mesh on the distance more than octree node precision value. Version 2 with improved performance.
This commit is contained in:
parent
97577f2731
commit
2343a5b385
@ -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() );
|
||||
|
Loading…
Reference in New Issue
Block a user