From: eap Date: Fri, 21 Mar 2014 14:42:23 +0000 (+0400) Subject: 22511: EDF 2845 SMESH : error with UseExistingFaces X-Git-Tag: V7_4_0a1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17de6ce8ed00e92f30be58067d14a09c11921eaa;p=modules%2Fsmesh.git 22511: EDF 2845 SMESH : error with UseExistingFaces Fix regression of SALOME_TESTS/Grids/smesh/bugs_19/X7 --- diff --git a/src/SMESHUtils/SMESH_OctreeNode.cxx b/src/SMESHUtils/SMESH_OctreeNode.cxx index 31c6ba660..1c85e0469 100644 --- a/src/SMESHUtils/SMESH_OctreeNode.cxx +++ b/src/SMESHUtils/SMESH_OctreeNode.cxx @@ -222,6 +222,7 @@ bool SMESH_OctreeNode::NodesAround(const gp_XYZ &node, } else if ( NbNodes() > 0 ) { + size_t nbFoundBefore = dist2Nodes.size(); double minDist = precision * precision; gp_Pnt p1 ( node.X(), node.Y(), node.Z() ); TIDSortedNodeSet::iterator nIt = myNodes.begin(); @@ -235,7 +236,7 @@ bool SMESH_OctreeNode::NodesAround(const gp_XYZ &node, // if ( dist2Nodes.size() > 1 ) // leave only closest node in dist2Nodes // dist2Nodes.erase( ++dist2Nodes.begin(), dist2Nodes.end()); - return ( sqrt( minDist) <= precision * ( 1 + 1e-12 )); + return ( nbFoundBefore < dist2Nodes.size() ); } } return false;