X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_MeshAlgos.cxx;h=957828474e306b0d3bb07286179f454aaf297c1c;hb=69f064e1222d71a85b8ac1e11d82e0480b6d6cea;hp=23a285f616ad0f9c9e5c6ce0ccba545f47b776a0;hpb=b0a908c0d20341651771d0249fb10882f54b2aad;p=modules%2Fsmesh.git diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index 23a285f61..957828474 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -759,10 +759,10 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt& point, { gp_Pnt boxCenter = 0.5 * ( _ebbTree->getBox()->CornerMin() + _ebbTree->getBox()->CornerMax() ); - double radius; + double radius = -1; if ( _ebbTree->getBox()->IsOut( point.XYZ() )) radius = point.Distance( boxCenter ) - 0.5 * _ebbTree->maxSize(); - else + if ( radius < 0 ) radius = _ebbTree->maxSize() / pow( 2., _ebbTree->getHeight()) / 2; while ( suspectElems.empty() ) {