X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_VTKUtils.cxx;h=4a72abca58cbc361903add17cdef0ef78606bb1c;hp=efc82df3d6272028d547ab4674113e5ed537c7b7;hb=824f011cef0dc8fee10a7eaca511e9f61690766b;hpb=fcec7fb454ef336224ec535af05b14732a85322d diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index efc82df3d..4a72abca5 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -1396,6 +1396,20 @@ namespace SMESH double theDist, double theBounds[6], double theOrigin[3] ) + { + bool anIsOk = false; + anIsOk = ComputeBounds( theActorList, theBounds ); + + + if( !anIsOk ) + return false; + + DistanceToPosition( theBounds, theNormal, theDist, theOrigin ); + return true; + } + + bool ComputeBounds( std::list theActorList, + double theBounds[6]) { bool anIsOk = false; theBounds[0] = theBounds[2] = theBounds[4] = VTK_DOUBLE_MAX; @@ -1416,12 +1430,7 @@ namespace SMESH } } } - - if( !anIsOk ) - return false; - - DistanceToPosition( theBounds, theNormal, theDist, theOrigin ); - return true; + return anIsOk; } #ifndef DISABLE_PLOT2DVIEWER