From 5b22346fc5e9864f5f426821dc5dd00957018036 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 7 May 2015 19:01:50 +0300 Subject: [PATCH] OCCT 6.9.0 (IR-2015-05-23) compatibility --- src/CurveCreator/CMakeLists.txt | 5 +++++ src/CurveCreator/CurveCreator_Utils.cxx | 4 ++++ src/GEOMGUI/CMakeLists.txt | 5 +++++ src/GEOMGUI/GEOMGUI_OCCSelector.cxx | 4 ++++ src/OBJECT/CMakeLists.txt | 5 +++++ src/OBJECT/GEOM_AISShape.cxx | 4 ++++ 6 files changed, 27 insertions(+) diff --git a/src/CurveCreator/CMakeLists.txt b/src/CurveCreator/CMakeLists.txt index e17655aa6..ed4a31fe3 100644 --- a/src/CurveCreator/CMakeLists.txt +++ b/src/CurveCreator/CMakeLists.txt @@ -39,6 +39,11 @@ ADD_DEFINITIONS( ${QT_DEFINITIONS} ) +# VSR: TEMPORARY, to be removed +IF(OCCT_690BETA_COMPAT) +ADD_DEFINITIONS(-DOCCT_690BETA_COMPAT) +ENDIF(OCCT_690BETA_COMPAT) + # libraries to link to SET(_link_LIBRARIES GEOMUtils diff --git a/src/CurveCreator/CurveCreator_Utils.cxx b/src/CurveCreator/CurveCreator_Utils.cxx index b8471abe8..9068bce45 100644 --- a/src/CurveCreator/CurveCreator_Utils.cxx +++ b/src/CurveCreator/CurveCreator_Utils.cxx @@ -582,7 +582,11 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo for( aSelection->Init(); aSelection->More(); aSelection->Next() ) { #if OCC_VERSION_LARGE > 0x06080100 +#ifndef OCCT_690BETA_COMPAT // VSR: temporarily, to be removed later and replace below implementation + const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive(); +#else // #ifndef OCCT_690BETA_COMPAT / VSR: temporarily, to be removed later and replace below implementation const SelectMgr_HSensitiveEntity aHSenEntity = aSelection->Sensitive(); +#endif // #ifndef OCCT_690BETA_COMPAT / VSR: temporarily, to be removed later and replace below implementation if( aHSenEntity.IsNull() ) continue; Handle_SelectBasics_SensitiveEntity aSenEntity = aHSenEntity->BaseSensitive(); diff --git a/src/GEOMGUI/CMakeLists.txt b/src/GEOMGUI/CMakeLists.txt index 211156716..880562ce3 100755 --- a/src/GEOMGUI/CMakeLists.txt +++ b/src/GEOMGUI/CMakeLists.txt @@ -50,6 +50,11 @@ ADD_DEFINITIONS( ${OPENCV_DEFINITIONS} ) +# VSR: TEMPORARY, to be removed +IF(OCCT_690BETA_COMPAT) +ADD_DEFINITIONS(-DOCCT_690BETA_COMPAT) +ENDIF(OCCT_690BETA_COMPAT) + # libraries to link to SET(_link_LIBRARIES GEOMObject diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index efb4dcd6b..778ce01f5 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -179,7 +179,11 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, for ( sel->Init(); sel->More(); sel->Next() ) { #if OCC_VERSION_LARGE > 0x06080100 +#ifndef OCCT_690BETA_COMPAT // VSR: temporarily, to be removed later and replace below implementation + const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive(); +#else // #ifndef OCCT_690BETA_COMPAT / VSR: temporarily, to be removed later and replace below implementation const SelectMgr_HSensitiveEntity aHSenEntity = sel->Sensitive(); +#endif // #ifndef OCCT_690BETA_COMPAT / VSR: temporarily, to be removed later and replace below implementation if( aHSenEntity.IsNull() ) continue; diff --git a/src/OBJECT/CMakeLists.txt b/src/OBJECT/CMakeLists.txt index 60a7497ca..91e700d0c 100755 --- a/src/OBJECT/CMakeLists.txt +++ b/src/OBJECT/CMakeLists.txt @@ -45,6 +45,11 @@ ADD_DEFINITIONS( ${QT_DEFINITIONS} ) +# VSR: TEMPORARY, to be removed +IF(OCCT_690BETA_COMPAT) +ADD_DEFINITIONS(-DOCCT_690BETA_COMPAT) +ENDIF(OCCT_690BETA_COMPAT) + # libraries to link to SET(_link_LIBRARIES OCC2VTK diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index 5415d5373..e89890038 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -109,7 +109,11 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, for ( sel->Init(); sel->More(); sel->Next() ) { #if OCC_VERSION_LARGE > 0x06080100 +#ifndef OCCT_690BETA_COMPAT // VSR: temporarily, to be removed later and replace below implementation + const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive(); +#else // #ifndef OCCT_690BETA_COMPAT / VSR: temporarily, to be removed later and replace below implementation const SelectMgr_HSensitiveEntity aHSenEntity = sel->Sensitive(); +#endif // #ifndef OCCT_690BETA_COMPAT / VSR: temporarily, to be removed later and replace below implementation if( aHSenEntity.IsNull() ) continue; -- 2.39.2