From f73b74c32f7e444c717eb90ea425a3788c6f66f5 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 26 Dec 2008 12:05:00 +0000 Subject: [PATCH] Fix of the bug IPAL20572 - Box for creation of Clipping plane is in a lot of times more than bounding box of considered model. --- src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx | 2 +- src/VISUGUI/VisuGUI_Tools.cxx | 3 +-- src/VISUGUI/VisuGUI_Tools.h | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx b/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx index c8165c18..62e2938a 100644 --- a/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx @@ -66,7 +66,7 @@ VisuGUI_ClippingPlaneDlg::VisuGUI_ClippingPlaneDlg(VisuGUI* theModule) myPlaneId(-1) { myViewWindow = VISU::GetActiveViewWindow(myModule); - ComputeVisiblePropBounds(myViewWindow->getRenderer(), myBounds); + VISU::ComputeVisiblePropBounds(myViewWindow, myBounds); setWindowTitle(tr("TITLE")); setSizeGripEnabled(true); diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 8e17c4f1..34ae14e7 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -818,11 +818,10 @@ namespace VISU } //------------------------------------------------------------ - static bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow, vtkFloatingPointType allBounds[6], - const char* theActorClassName = "VISU_Actor") + const char* theActorClassName) { vtkRenderer *aRen = theViewWindow->getRenderer(); vtkActorCollection *anActColl = aRen->GetActors(); diff --git a/src/VISUGUI/VisuGUI_Tools.h b/src/VISUGUI/VisuGUI_Tools.h index 681d45f3..1faa3d7d 100644 --- a/src/VISUGUI/VisuGUI_Tools.h +++ b/src/VISUGUI/VisuGUI_Tools.h @@ -181,6 +181,10 @@ namespace VISU void RecreateActor(const SalomeApp_Module* theModule, VISU::Prs3d_i* thePrs); + bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow, + vtkFloatingPointType allBounds[6], + const char* theActorClassName = "VISU_Actor"); + /*! * \brief Advanced FitAll, sets view projection in accordance with current view contents * -- 2.39.2