From: mnt Date: Wed, 2 Mar 2016 13:11:45 +0000 (+0300) Subject: OCCT 7.0.0 porting X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=46e874455048d238c0a5333164f7e9e0924a6ab8;p=plugins%2Fcanrecplugin.git OCCT 7.0.0 porting --- diff --git a/adm_local/cmake_files/FindCR.cmake b/adm_local/cmake_files/FindCR.cmake index 3f7544b..5c4d815 100644 --- a/adm_local/cmake_files/FindCR.cmake +++ b/adm_local/cmake_files/FindCR.cmake @@ -46,8 +46,8 @@ IF(OCCTLICENSE_INCLUDE_DIRS) LIST(APPEND CR_INCLUDE_DIRS ${OCCTLICENSE_INCLUDE_DIRS}) ENDIF(OCCTLICENSE_INCLUDE_DIRS) -FIND_LIBRARY(CR_TKCR NAMES TKCR) -FIND_LIBRARY(CRKOCCLicense NAMES TKOCCLicense) +FIND_LIBRARY(CR_TKCR NAMES TKCR PATH_SUFFIXES lib lin64/gcc/lib bin) +FIND_LIBRARY(CRKOCCLicense NAMES TKOCCLicense PATH_SUFFIXES lib lin64/gcc/lib bin) SET(CR_LIBRARIES ${CR_TKCR} diff --git a/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc b/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc index 677edb7..a6f6dc9 100644 --- a/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc +++ b/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc @@ -58,7 +58,7 @@ CANRECPluginEngine_IOperations_i::MakeCanonicalRecognition( GEOM::GEOM_Object_pt GetOperations()->SetNotDone(); // Get the reference points - Handle(GEOM_Object) anInitObject = GetObjectImpl( theObject ); + HANDLE_NAMESPACE(GEOM_Object) anInitObject = GetObjectImpl( theObject ); if ( anInitObject.IsNull() ) { return GEOM::GEOM_Object::_nil(); @@ -66,7 +66,7 @@ CANRECPluginEngine_IOperations_i::MakeCanonicalRecognition( GEOM::GEOM_Object_pt // Make Canonical Recognition Handle(TColStd_HSequenceOfInteger) aStat = new TColStd_HSequenceOfInteger; - Handle(GEOM_Object) anObject = + HANDLE_NAMESPACE(GEOM_Object) anObject = GetOperations()->MakeCanonicalRecognition(anInitObject, theMergeSurf, theMergeCurves, @@ -106,7 +106,7 @@ CORBA::Long CANRECPluginEngine_IOperations_i::GetNbCanonicalFaces GetOperations()->SetNotDone(); // Get the reference points - Handle(GEOM_Object) anInitObject = GetObjectImpl(theObject); + HANDLE_NAMESPACE(GEOM_Object) anInitObject = GetObjectImpl(theObject); if (anInitObject.IsNull()) { return -1; diff --git a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx index d273e70..4858beb 100644 --- a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx +++ b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx @@ -102,16 +102,16 @@ CANRECPluginImpl_Driver::~CANRECPluginImpl_Driver() { } -Standard_Boolean CANRECPluginImpl_Driver::MustExecute( const TFunction_Logbook& ) const +Standard_Boolean CANRECPluginImpl_Driver::MustExecute( const LOGBOOK& ) const { return Standard_True; } -void CANRECPluginImpl_Driver::Validate( TFunction_Logbook& ) const +void CANRECPluginImpl_Driver::Validate( LOGBOOK& ) const { } -Standard_Integer CANRECPluginImpl_Driver::Execute( TFunction_Logbook& log ) const +Standard_Integer CANRECPluginImpl_Driver::Execute( LOGBOOK& log ) const { if ( Label().IsNull() ) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); @@ -188,7 +188,11 @@ Standard_Integer CANRECPluginImpl_Driver::Execute( TFunction_Logbook& log ) cons aFunction->SetValue( aResultingShape ); +#if OCC_VERSION_MAJOR < 7 log.SetTouched( Label() ); +#else + log->SetTouched( Label() ); +#endif return 1; } @@ -211,5 +215,4 @@ GetCreationInformation( std::string& theOperationName, return true; } -IMPLEMENT_STANDARD_HANDLE( CANRECPluginImpl_Driver, GEOM_BaseDriver ); -IMPLEMENT_STANDARD_RTTIEXT( CANRECPluginImpl_Driver, GEOM_BaseDriver ); +OCCT_IMPLEMENT_STANDARD_RTTIEXT( CANRECPluginImpl_Driver,GEOM_BaseDriver ); diff --git a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx index 1b18418..16f8ab2 100644 --- a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx +++ b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx @@ -34,14 +34,14 @@ public: static const Standard_GUID& GetID(); static Standard_Integer GetNbCanonicalFaces(const TopoDS_Shape &theShape); - virtual Standard_Integer Execute( TFunction_Logbook& ) const; - Standard_Boolean MustExecute( const TFunction_Logbook& ) const; - virtual void Validate( TFunction_Logbook& ) const; + virtual Standard_Integer Execute( LOGBOOK& ) const; + Standard_Boolean MustExecute( const LOGBOOK& ) const; + virtual void Validate( LOGBOOK& ) const; virtual bool GetCreationInformation( std::string&, std::vector& ); - DEFINE_STANDARD_RTTI( CANRECPluginImpl_Driver ); +OCCT_DEFINE_STANDARD_RTTIEXT( CANRECPluginImpl_Driver, GEOM_BaseDriver ) }; #endif // __CANRECPLUGINIMPL_DRIVER_HXX