From 7d57e1ee016aab858d23f2a5641e4a7e9b48ed89 Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 27 Apr 2010 08:41:31 +0000 Subject: [PATCH] Fix of the bug IPAL21687 - TC5.1.4: it's impossible to show correcly the copied LocalCS - regression --- src/SOCC/SOCC_ViewModel.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SOCC/SOCC_ViewModel.cxx b/src/SOCC/SOCC_ViewModel.cxx index 53a78938d..260bed36e 100755 --- a/src/SOCC/SOCC_ViewModel.cxx +++ b/src/SOCC/SOCC_ViewModel.cxx @@ -59,6 +59,8 @@ #include +#include + // in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study. // SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from // SALOMEDS::StudyManager - no linkage with SalomeApp. @@ -674,6 +676,12 @@ bool SOCC_Viewer::getTrihedronSize( double& theNewSize, double& theSize ) if ( aMaxSide < Ymax -Ymin ) aMaxSide = Ymax -Ymin; if ( aMaxSide < Zmax -Zmin ) aMaxSide = Zmax -Zmin; + // IPAL21687 + // The boundary box of the view may be initialized but nullified + // (case of infinite objects) + if ( aMaxSide < Precision::Confusion() ) + return false; + float aSizeInPercents = SUIT_Session::session()->resourceMgr()->doubleValue("Viewer","TrihedronSize", 105.); static float EPS = 5.0E-3; -- 2.39.2