From: eap Date: Tue, 1 Apr 2014 16:48:00 +0000 (+0400) Subject: Performance regression on SALOME_TESTS/Grids/smesh/bugs_16/S9 X-Git-Tag: V7_4_0a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=32db05b07f6505e78211bc3cfb5921a6a5885242;p=modules%2Fsmesh.git Performance regression on SALOME_TESTS/Grids/smesh/bugs_16/S9 --- 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() ) {