22511: EDF 2845 SMESH : error with UseExistingFaces

Fix regression of SALOME_TESTS/Grids/smesh/bugs_19/X7
This commit is contained in:
eap 2014-03-21 18:42:23 +04:00
parent 99c67a994b
commit 17de6ce8ed

View File

@ -222,6 +222,7 @@ bool SMESH_OctreeNode::NodesAround(const gp_XYZ &node,
} }
else if ( NbNodes() > 0 ) else if ( NbNodes() > 0 )
{ {
size_t nbFoundBefore = dist2Nodes.size();
double minDist = precision * precision; double minDist = precision * precision;
gp_Pnt p1 ( node.X(), node.Y(), node.Z() ); gp_Pnt p1 ( node.X(), node.Y(), node.Z() );
TIDSortedNodeSet::iterator nIt = myNodes.begin(); 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 // if ( dist2Nodes.size() > 1 ) // leave only closest node in dist2Nodes
// dist2Nodes.erase( ++dist2Nodes.begin(), dist2Nodes.end()); // dist2Nodes.erase( ++dist2Nodes.begin(), dist2Nodes.end());
return ( sqrt( minDist) <= precision * ( 1 + 1e-12 )); return ( nbFoundBefore < dist2Nodes.size() );
} }
} }
return false; return false;