LIST(APPEND CMAKE_PREFIX_PATH "${OCCLICENSE_ROOT_DIR}")
ENDIF(OCCLICENSE_ROOT_DIR)
-FIND_PATH(CR_INCLUDE_DIRS ShapeConvert.hxx PATH_SUFFIXES inc)
-FIND_PATH(OCCTLICENSE_INCLUDE_DIRS OCCLicense_Activate.hxx PATH_SUFFIXES inc)
-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_PATH(CR_INCLUDE_DIRS ShapeConvert.hxx PATH_SUFFIXES include/opencascade)
+IF(CR_INCLUDE_DIRS)
+ SET(CR_UPCOUNT 2)
+ELSE(CR_INCLUDE_DIRS)
+ FIND_PATH(CR_INCLUDE_DIRS ShapeConvert.hxx PATH_SUFFIXES include inc)
+ENDIF(CR_INCLUDE_DIRS)
+
+FIND_PATH(OCCTLICENSE_INCLUDE_DIRS OCCLicense_Activate.hxx PATH_SUFFIXES include/opencascade)
+IF(NOT OCCTLICENSE_INCLUDE_DIRS)
+ FIND_PATH(OCCTLICENSE_INCLUDE_DIRS OCCLicense_Activate.hxx PATH_SUFFIXES include inc)
+ENDIF(NOT OCCTLICENSE_INCLUDE_DIRS)
+
+IF(CR_INCLUDE_DIRS AND OCCTLICENSE_INCLUDE_DIRS)
+ FILE(TO_NATIVE_PATH ${CR_INCLUDE_DIRS} _cr_dir)
+ FILE(TO_NATIVE_PATH ${OCCTLICENSE_INCLUDE_DIRS} _lic_dir)
+ STRING(COMPARE NOTEQUAL ${_cr_dir} ${_lic_dir} _diff_dir)
+ IF(_diff_dir)
+ LIST(APPEND CR_INCLUDE_DIRS ${OCCTLICENSE_INCLUDE_DIRS})
+ ENDIF()
+ENDIF(CR_INCLUDE_DIRS AND OCCTLICENSE_INCLUDE_DIRS)
+
+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}
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();
// Make Canonical Recognition
Handle(TColStd_HSequenceOfInteger) aStat = new TColStd_HSequenceOfInteger;
- Handle(GEOM_Object) anObject =
+ HANDLE_NAMESPACE(GEOM_Object) anObject =
GetOperations()->MakeCanonicalRecognition(anInitObject,
theMergeSurf,
theMergeCurves,
GetOperations()->SetNotDone();
// Get the reference points
- Handle(GEOM_Object) anInitObject = GetObjectImpl(theObject);
+ HANDLE_NAMESPACE(GEOM_Object) anInitObject = GetObjectImpl(theObject);
if (anInitObject.IsNull()) {
return -1;
{
}
-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() );
aFunction->SetValue( aResultingShape );
+#if OCC_VERSION_MAJOR < 7
log.SetTouched( Label() );
+#else
+ log->SetTouched( Label() );
+#endif
return 1;
}
return true;
}
-IMPLEMENT_STANDARD_HANDLE( CANRECPluginImpl_Driver, GEOM_BaseDriver );
-IMPLEMENT_STANDARD_RTTIEXT( CANRECPluginImpl_Driver, GEOM_BaseDriver );
+OCCT_IMPLEMENT_STANDARD_RTTIEXT( CANRECPluginImpl_Driver,GEOM_BaseDriver );
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<GEOM_Param>& );
- DEFINE_STANDARD_RTTI( CANRECPluginImpl_Driver );
+OCCT_DEFINE_STANDARD_RTTIEXT( CANRECPluginImpl_Driver, GEOM_BaseDriver )
};
#endif // __CANRECPLUGINIMPL_DRIVER_HXX