From 8c3bcb06c1f514ec44fe9373e7edc80067e62dce Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 27 Oct 2014 13:11:49 +0300 Subject: [PATCH] OCCT dev (6.8.0) compatibility --- src/CAF/CAF_Study.cxx | 2 -- src/DDS/DDS_Dictionary.cxx | 2 -- src/LightApp/LightApp_Application.cxx | 2 -- src/OCCViewer/OCCViewer_ClippingDlg.cxx | 12 ++++++++++++ src/OCCViewer/OCCViewer_CubeAxesDlg.cxx | 2 -- src/OCCViewer/OCCViewer_ViewModel.cxx | 12 ++++++++++++ src/OCCViewer/OCCViewer_ViewModel.h | 1 - src/OCCViewer/OCCViewer_ViewWindow.cxx | 10 ++++++++++ 8 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/CAF/CAF_Study.cxx b/src/CAF/CAF_Study.cxx index 0b60a95fd..3b69c88eb 100755 --- a/src/CAF/CAF_Study.cxx +++ b/src/CAF/CAF_Study.cxx @@ -25,8 +25,6 @@ #include "CAF_Tools.h" #include "CAF_Application.h" -#include - #include #include #include diff --git a/src/DDS/DDS_Dictionary.cxx b/src/DDS/DDS_Dictionary.cxx index 823bfe1a8..d22fdb0ba 100644 --- a/src/DDS/DDS_Dictionary.cxx +++ b/src/DDS/DDS_Dictionary.cxx @@ -24,8 +24,6 @@ #include "DDS_KeyWords.h" -#include - #include #include diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 3017896cf..ef2f6c55d 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -58,9 +58,7 @@ #include "LightApp_WgViewModel.h" #include "LightApp_FullScreenHelper.h" - #include -#include #include diff --git a/src/OCCViewer/OCCViewer_ClippingDlg.cxx b/src/OCCViewer/OCCViewer_ClippingDlg.cxx index ec75a1052..d6359071f 100644 --- a/src/OCCViewer/OCCViewer_ClippingDlg.cxx +++ b/src/OCCViewer/OCCViewer_ClippingDlg.cxx @@ -37,6 +37,8 @@ #include "OCCViewer_ViewManager.h" #include "OCCViewer_ClipPlaneInteractor.h" +#include + #include #include #include @@ -92,7 +94,17 @@ void getMinMaxFromContext( Handle(AIS_InteractiveContext) ic, if ( !aPrs->IsEmpty() && !aPrs->IsInfinite() ) { isFound = true; double xmin, ymin, zmin, xmax, ymax, zmax; +#if OCC_VERSION_LARGE > 0x06070100 + Bnd_Box aBox = aPrs->MinMaxValues(); + xmin = aBox.CornerMin().X(); + ymin = aBox.CornerMin().Y(); + zmin = aBox.CornerMin().Z(); + xmax = aBox.CornerMax().X(); + ymax = aBox.CornerMax().Y(); + zmax = aBox.CornerMax().Z(); +#else aPrs->MinMaxValues( xmin, ymin, zmin, xmax, ymax, zmax ); +#endif aXMin = qMin( aXMin, xmin ); aXMax = qMax( aXMax, xmax ); aYMin = qMin( aYMin, ymin ); aYMax = qMax( aYMax, ymax ); aZMin = qMin( aZMin, zmin ); aZMax = qMax( aZMax, zmax ); diff --git a/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx b/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx index 31561c3a5..c62789d55 100644 --- a/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx +++ b/src/OCCViewer/OCCViewer_CubeAxesDlg.cxx @@ -29,8 +29,6 @@ #include "QtxAction.h" #include "QtxIntSpinBox.h" -#include - #include #include #include diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 64e558564..c11d24ca0 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -36,6 +36,8 @@ #include "ViewerData_AISShape.hxx" +#include + #include "QtxActionToolMgr.h" #include "QtxBackgroundTool.h" @@ -956,7 +958,17 @@ double OCCViewer_Viewer::computeSceneSize(const Handle(V3d_View)& view3d) const double aMaxSide = 0; double Xmin = 0, Ymin = 0, Zmin = 0, Xmax = 0, Ymax = 0, Zmax = 0; +#if OCC_VERSION_LARGE > 0x06070100 + Bnd_Box aBox = view3d->View()->MinMaxValues(); + Xmin = aBox.CornerMin().X(); + Ymin = aBox.CornerMin().Y(); + Zmin = aBox.CornerMin().Z(); + Xmax = aBox.CornerMax().X(); + Ymax = aBox.CornerMax().Y(); + Zmax = aBox.CornerMax().Z(); +#else view3d->View()->MinMaxValues( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax ); +#endif if ( Xmin != RealFirst() && Ymin != RealFirst() && Zmin != RealFirst() && Xmax != RealLast() && Ymax != RealLast() && Zmax != RealLast() ) diff --git a/src/OCCViewer/OCCViewer_ViewModel.h b/src/OCCViewer/OCCViewer_ViewModel.h index 5ca95ef26..685e362b0 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.h +++ b/src/OCCViewer/OCCViewer_ViewModel.h @@ -36,7 +36,6 @@ #include #include #include -#include #include class QKeyEvent; diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 4f38b4110..621df3289 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -651,7 +651,17 @@ bool OCCViewer_ViewWindow::computeGravityCenter( double& theX, double& theY, dou continue; } +#if OCC_VERSION_LARGE > 0x06070100 + Bnd_Box aBox = aStructure->MinMaxValues(); + aXmin = aBox.CornerMin().X(); + aYmin = aBox.CornerMin().Y(); + aZmin = aBox.CornerMin().Z(); + aXmax = aBox.CornerMax().X(); + aYmax = aBox.CornerMax().Y(); + aZmax = aBox.CornerMax().Z(); +#else aStructure->MinMaxValues( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ); +#endif // Infinite structures are skipped Standard_Real aLIM = ShortRealLast() - 1.0; -- 2.39.2