From 32db05b07f6505e78211bc3cfb5921a6a5885242 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 1 Apr 2014 20:48:00 +0400 Subject: [PATCH] Performance regression on SALOME_TESTS/Grids/smesh/bugs_16/S9 --- src/SMESHUtils/SMESH_MeshAlgos.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() ) { -- 2.30.2