Merge V8_4_BR branch.

This commit is contained in:
rnv 2017-12-13 11:47:35 +03:00
commit 2736f682fe
275 changed files with 2221 additions and 3342 deletions

View File

@ -33,7 +33,7 @@ ENDIF(WIN32)
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 3) SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})

View File

@ -83,7 +83,7 @@ AdvancedEngine_DividedDiskDriver::AdvancedEngine_DividedDiskDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(LOGBOOK& log) const Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -138,11 +138,7 @@ Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -527,4 +523,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver);

View File

@ -41,9 +41,9 @@ public:
// Methods PUBLIC // Methods PUBLIC
// //
AdvancedEngine_DividedDiskDriver(); AdvancedEngine_DividedDiskDriver();
virtual Standard_Integer Execute(LOGBOOK& log) const; virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(LOGBOOK&) const {} virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID(); static const Standard_GUID& GetID();
~AdvancedEngine_DividedDiskDriver() {}; ~AdvancedEngine_DividedDiskDriver() {};
@ -56,7 +56,7 @@ private:
TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const; TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
TopoDS_Shape MakeDiskSquare (double R, double Ratio) const; TopoDS_Shape MakeDiskSquare (double R, double Ratio) const;
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(AdvancedEngine_DividedDiskDriver,GEOM_BaseDriver)
}; };
#endif // _AdvancedEngine_DividedDiskDriver_HXX #endif // _AdvancedEngine_DividedDiskDriver_HXX

View File

@ -27,8 +27,6 @@
#include "AdvancedEngine_SmoothingSurfaceDriver.hxx" #include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
#include "AdvancedEngine_ISmoothingSurface.hxx" #include "AdvancedEngine_ISmoothingSurface.hxx"
#include <Basics_OCCTVersion.hxx>
#include <utilities.h> #include <utilities.h>
#include <OpUtil.hxx> #include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx> #include <Utils_ExceptHandlers.hxx>
@ -1554,9 +1552,8 @@ bool AdvancedEngine_IOperations::MakePipeTShapePartition(Handle(GEOM_Object) the
TopoDS_Shape aShape = Te3->GetValue(); TopoDS_Shape aShape = Te3->GetValue();
theShape->GetLastFunction()->SetValue(aShape); theShape->GetLastFunction()->SetValue(aShape);
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return false; return false;
} }
@ -1965,9 +1962,8 @@ Handle(TColStd_HSequenceOfTransient)
aFunction->SetValue(aResShape); aFunction->SetValue(aResShape);
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -1989,9 +1985,8 @@ Handle(TColStd_HSequenceOfTransient)
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2127,9 +2122,8 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
aFunction->SetValue(aResShape); aFunction->SetValue(aResShape);
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2160,9 +2154,8 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2270,9 +2263,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2323,9 +2315,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
try { try {
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges); aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
if (aChamfer.IsNull()) { if (aChamfer.IsNull()) {
@ -2359,9 +2350,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
aFunction->SetValue(aResShape); aFunction->SetValue(aResShape);
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2383,9 +2373,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2505,9 +2494,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2556,9 +2544,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
try { try {
aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges); aChamfer = myLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
if (aChamfer.IsNull()) { if (aChamfer.IsNull()) {
@ -2592,9 +2579,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
aFunction->SetValue(aResShape); aFunction->SetValue(aResShape);
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2622,9 +2608,8 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2730,9 +2715,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2782,9 +2766,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
try { try {
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges); aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
if (aFillet.IsNull()) { if (aFillet.IsNull()) {
@ -2844,9 +2827,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
aFunction->SetValue(aResShape); aFunction->SetValue(aResShape);
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2868,9 +2850,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -2987,9 +2968,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -3039,9 +3019,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
try { try {
aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges); aFillet = myLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
if (aFillet.IsNull()) { if (aFillet.IsNull()) {
@ -3100,9 +3079,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
aFunction->SetValue(aResShape); aFunction->SetValue(aResShape);
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -3130,9 +3108,8 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -3226,9 +3203,8 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, do
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -3301,9 +3277,8 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(G
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }
@ -3427,9 +3402,8 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail.GetMessageString());
SetErrorCode(aFail->GetMessageString());
return NULL; return NULL;
} }

View File

@ -400,7 +400,7 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakeQuarterPipeTShape (const doubl
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(LOGBOOK& log) const Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -623,11 +623,7 @@ Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -688,4 +684,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver);

View File

@ -36,9 +36,9 @@ public:
// Methods PUBLIC // Methods PUBLIC
// //
AdvancedEngine_PipeTShapeDriver(); AdvancedEngine_PipeTShapeDriver();
virtual Standard_Integer Execute(LOGBOOK& log) const; virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(LOGBOOK&) const {} virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID(); static const Standard_GUID& GetID();
~AdvancedEngine_PipeTShapeDriver() {}; ~AdvancedEngine_PipeTShapeDriver() {};
@ -47,7 +47,7 @@ public:
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
// Type management // Type management
// //
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver)
private: private:
/*! /*!

View File

@ -164,7 +164,7 @@ TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(LOGBOOK& log) const Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -222,11 +222,7 @@ Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(LOGBOOK& log) co
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -274,4 +270,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver);

View File

@ -33,9 +33,9 @@ public:
// Methods PUBLIC // Methods PUBLIC
// //
AdvancedEngine_SmoothingSurfaceDriver(); AdvancedEngine_SmoothingSurfaceDriver();
virtual Standard_Integer Execute(LOGBOOK& log) const; virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(LOGBOOK&) const {} virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID(); static const Standard_GUID& GetID();
~AdvancedEngine_SmoothingSurfaceDriver() {}; ~AdvancedEngine_SmoothingSurfaceDriver() {};
@ -44,7 +44,7 @@ public:
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
// Type management // Type management
// //
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver)
private: private:
TopoDS_Shape MakeSmoothingSurfaceUnClosed TopoDS_Shape MakeSmoothingSurfaceUnClosed
(const Handle(TColgp_HArray1OfPnt) &theListOfPoints, (const Handle(TColgp_HArray1OfPnt) &theListOfPoints,

View File

@ -54,7 +54,7 @@ BREPPlugin_ExportDriver::BREPPlugin_ExportDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer BREPPlugin_ExportDriver::Execute(LOGBOOK& log) const Standard_Integer BREPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
@ -95,4 +95,4 @@ GetCreationInformation( std::string& theOperationName,
return false; return false;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver ); IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ExportDriver,GEOM_BaseDriver );

View File

@ -32,14 +32,14 @@ public:
~BREPPlugin_ExportDriver() {}; ~BREPPlugin_ExportDriver() {};
static const Standard_GUID& GetID(); static const Standard_GUID& GetID();
virtual Standard_Integer Execute(LOGBOOK& log) const; virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(LOGBOOK&) const {} virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
virtual bool GetCreationInformation( std::string& theOperationName, virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params ); std::vector<GEOM_Param>& params );
OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver)
}; };
#endif // _BREPPlugin_ExportDriver_HXX #endif // _BREPPlugin_ExportDriver_HXX

View File

@ -96,9 +96,8 @@ void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object) theOrigi
return; return;
} }
} }
catch( Standard_Failure ) { catch( Standard_Failure& aFail ) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode( aFail.GetMessageString() );
SetErrorCode( aFail->GetMessageString() );
return; return;
} }
@ -152,9 +151,8 @@ BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
// Greate material groups. // Greate material groups.
// MakeMaterialGroups( anImported, aSeq ); // MakeMaterialGroups( anImported, aSeq );
} }
catch( Standard_Failure ) { catch( Standard_Failure& aFail ) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode( aFail.GetMessageString() );
SetErrorCode( aFail->GetMessageString() );
return NULL; return NULL;
} }

View File

@ -55,7 +55,7 @@ BREPPlugin_ImportDriver::BREPPlugin_ImportDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer BREPPlugin_ImportDriver::Execute(LOGBOOK& log) const Standard_Integer BREPPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if( Label().IsNull() ) return 0; if( Label().IsNull() ) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
@ -76,11 +76,7 @@ Standard_Integer BREPPlugin_ImportDriver::Execute(LOGBOOK& log) const
aFunction->SetValue( aShape ); aFunction->SetValue( aShape );
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -113,4 +109,4 @@ GetCreationInformation( std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver ); IMPLEMENT_STANDARD_RTTIEXT( BREPPlugin_ImportDriver, GEOM_BaseDriver );

View File

@ -32,14 +32,14 @@ public:
~BREPPlugin_ImportDriver() {}; ~BREPPlugin_ImportDriver() {};
static const Standard_GUID& GetID(); static const Standard_GUID& GetID();
virtual Standard_Integer Execute(LOGBOOK& log) const; virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; } Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
virtual void Validate( LOGBOOK& ) const {} virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName, virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params ); std::vector<GEOM_Param>& params );
OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
}; };
#endif // _BREPPlugin_ImportDriver_HXX #endif // _BREPPlugin_ImportDriver_HXX

View File

@ -30,13 +30,11 @@
#include <BlockFix_UnionFaces.hxx> #include <BlockFix_UnionFaces.hxx>
#include <BlockFix_UnionEdges.hxx> #include <BlockFix_UnionEdges.hxx>
#include <Basics_OCCTVersion.hxx>
#include <ShapeUpgrade_RemoveLocations.hxx> #include <ShapeUpgrade_RemoveLocations.hxx>
#include <Precision.hxx> #include <Precision.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, MMgt_TShared); IMPLEMENT_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, Standard_Transient);
//======================================================================= //=======================================================================
//function : BlockFix_BlockFixAPI //function : BlockFix_BlockFixAPI

View File

@ -25,17 +25,15 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <Standard_Transient.hxx>
#include <ShapeBuild_ReShape.hxx> #include <ShapeBuild_ReShape.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <MMgt_TShared.hxx>
#include <Basics_OCCTVersion.hxx> DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, Standard_Transient);
DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, MMgt_TShared); class BlockFix_BlockFixAPI : public Standard_Transient
class BlockFix_BlockFixAPI : public MMgt_TShared
{ {
public: public:
Standard_EXPORT BlockFix_BlockFixAPI(); Standard_EXPORT BlockFix_BlockFixAPI();
@ -48,7 +46,7 @@ public:
Standard_Integer& OptimumNbFaces(); Standard_Integer& OptimumNbFaces();
Standard_EXPORT void Perform(); Standard_EXPORT void Perform();
OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_BlockFixAPI,MMgt_TShared) DEFINE_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, Standard_Transient)
private: private:
Handle(ShapeBuild_ReShape) myContext; Handle(ShapeBuild_ReShape) myContext;

View File

@ -50,7 +50,7 @@
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification); IMPLEMENT_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
//======================================================================= //=======================================================================
//function : BlockFix_PeriodicSurfaceModifier() //function : BlockFix_PeriodicSurfaceModifier()

View File

@ -35,8 +35,6 @@
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <GeomAbs_Shape.hxx> #include <GeomAbs_Shape.hxx>
#include <Basics_OCCTVersion.hxx>
class TopoDS_Vertex; class TopoDS_Vertex;
class TopoDS_Edge; class TopoDS_Edge;
class TopoDS_Face; class TopoDS_Face;
@ -83,7 +81,7 @@ public:
const TopoDS_Face& NewF1, const TopoDS_Face& NewF1,
const TopoDS_Face& NewF2); const TopoDS_Face& NewF2);
OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier,BRepTools_Modification) DEFINE_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier,BRepTools_Modification)
private: private:
Standard_Real myTolerance; Standard_Real myTolerance;

View File

@ -56,7 +56,7 @@
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <gp_Sphere.hxx> #include <gp_Sphere.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier, BRepTools_Modification); IMPLEMENT_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier, BRepTools_Modification);
//======================================================================= //=======================================================================
//function : BlockFix_SphereSpaceModifier //function : BlockFix_SphereSpaceModifier

View File

@ -33,8 +33,6 @@
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <GeomAbs_Shape.hxx> #include <GeomAbs_Shape.hxx>
#include <Basics_OCCTVersion.hxx>
class TopoDS_Vertex; class TopoDS_Vertex;
class TopoDS_Edge; class TopoDS_Edge;
class TopoDS_Face; class TopoDS_Face;
@ -70,7 +68,7 @@ public:
const TopoDS_Face& NewF1, const TopoDS_Face& NewF2); const TopoDS_Face& NewF1, const TopoDS_Face& NewF2);
Standard_EXPORT Standard_Boolean ForRotation (const TopoDS_Face& F); Standard_EXPORT Standard_Boolean ForRotation (const TopoDS_Face& F);
OCCT_DEFINE_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier,BRepTools_Modification) DEFINE_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier,BRepTools_Modification)
private: private:
Standard_Real myTolerance; Standard_Real myTolerance;

View File

@ -26,8 +26,6 @@
#include <BlockFix_UnionFaces.hxx> #include <BlockFix_UnionFaces.hxx>
#include <Basics_OCCTVersion.hxx>
#include <ShapeAnalysis_WireOrder.hxx> #include <ShapeAnalysis_WireOrder.hxx>
#include <ShapeAnalysis_Edge.hxx> #include <ShapeAnalysis_Edge.hxx>
@ -246,9 +244,6 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
Standard_Boolean isValid = Standard_True; Standard_Boolean isValid = Standard_True;
if (BRep_Tool::IsClosed(theEdge, theFace)) { if (BRep_Tool::IsClosed(theEdge, theFace)) {
// Mantis issue 0023451, now code corresponds to the comment to this method
isValid = Standard_False;
// This is a seam edge. Check if there are another seam edges on the face. // This is a seam edge. Check if there are another seam edges on the face.
TopExp_Explorer anExp(theFace, TopAbs_EDGE); TopExp_Explorer anExp(theFace, TopAbs_EDGE);
@ -264,9 +259,7 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
TopoDS_Edge anEdge = TopoDS::Edge(aShEdge); TopoDS_Edge anEdge = TopoDS::Edge(aShEdge);
if (BRep_Tool::IsClosed(anEdge, theFace)) { if (BRep_Tool::IsClosed(anEdge, theFace)) {
// Mantis issue 0023451, now code corresponds to the comment to this method isValid = Standard_False;
//isValid = Standard_False;
isValid = Standard_True;
break; break;
} }
} }

View File

@ -23,8 +23,6 @@
#include "CurveCreator_Section.hxx" #include "CurveCreator_Section.hxx"
#include "CurveCreator_UtilsICurve.hxx" #include "CurveCreator_UtilsICurve.hxx"
#include <Basics_OCCTVersion.hxx>
#include <GEOMUtils.hxx> #include <GEOMUtils.hxx>
#include <gp_Pln.hxx> #include <gp_Pln.hxx>
@ -621,14 +619,10 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo
Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) ); Handle(SelectMgr_Selection) aSelection = anAISShape->Selection( AIS_Shape::SelectionMode( TopAbs_VERTEX ) );
for( aSelection->Init(); aSelection->More(); aSelection->Next() ) for( aSelection->Init(); aSelection->More(); aSelection->Next() )
{ {
#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive(); const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive();
if( aHSenEntity.IsNull() ) if( aHSenEntity.IsNull() )
continue; continue;
Handle(SelectBasics_SensitiveEntity) aSenEntity = aHSenEntity->BaseSensitive(); Handle(SelectBasics_SensitiveEntity) aSenEntity = aHSenEntity->BaseSensitive();
#else
Handle(SelectBasics_SensitiveEntity) aSenEntity = aSelection->Sensitive();
#endif
Handle(Select3D_SensitivePoint) aSenPnt = Handle(Select3D_SensitivePoint)::DownCast( aSenEntity ); Handle(Select3D_SensitivePoint) aSenPnt = Handle(Select3D_SensitivePoint)::DownCast( aSenEntity );

View File

@ -28,8 +28,6 @@
#include "EntityGUI_3DSketcherDlg.h" #include "EntityGUI_3DSketcherDlg.h"
#include "EntityGUI_Widgets.h" #include "EntityGUI_Widgets.h"
#include <Basics_OCCTVersion.hxx>
#include <GEOMBase.h> #include <GEOMBase.h>
#include <GeometryGUI.h> #include <GeometryGUI.h>
#include <Precision.hxx> #include <Precision.hxx>
@ -105,7 +103,7 @@ DEFINE_STANDARD_HANDLE(AIS_Text, AIS_InteractiveObject)
class AIS_Text:public AIS_InteractiveObject class AIS_Text:public AIS_InteractiveObject
{ {
public: public:
OCCT_DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject) DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
AIS_Text(){}; AIS_Text(){};
@ -147,7 +145,7 @@ protected:
Graphic3d_VerticalTextAlignment aVJustification; Graphic3d_VerticalTextAlignment aVJustification;
}; };
OCCT_IMPLEMENT_STANDARD_RTTIEXT(AIS_Text, AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(AIS_Text, AIS_InteractiveObject)
AIS_Text::AIS_Text( const TCollection_ExtendedString& text, const gp_Pnt& position, AIS_Text::AIS_Text( const TCollection_ExtendedString& text, const gp_Pnt& position,
Quantity_Color color = Quantity_NOC_YELLOW, Quantity_Color color = Quantity_NOC_YELLOW,

View File

@ -64,7 +64,8 @@
#include <BRepBuilderAPI_MakePolygon.hxx> #include <BRepBuilderAPI_MakePolygon.hxx>
#include <BRepBuilderAPI_Transform.hxx> #include <BRepBuilderAPI_Transform.hxx>
#include <AIS_TexturedShape.hxx> #include <AIS_Shape.hxx>
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <StdSelect_DisplayMode.hxx> #include <StdSelect_DisplayMode.hxx>

View File

@ -40,15 +40,13 @@ SET(_link_LIBRARIES
${CAS_TKCDF} ${CAS_TKCDF}
${CAS_TKG3d} ${CAS_TKG3d}
${CAS_TKStdL} ${CAS_TKStdL}
${CAS_TKStd}
${CAS_TKBin}
${KERNEL_SALOMELocalTrace} ${KERNEL_SALOMELocalTrace}
${KERNEL_OpUtil} ${KERNEL_OpUtil}
GEOMSketcher GEOMSketcher
) )
IF(CAS_VERSION_STR VERSION_GREATER "7.0.0")
LIST(APPEND _link_LIBRARIES ${CAS_TKStd} ${CAS_TKBin})
ENDIF()
# --- headers --- # --- headers ---
SET(GEOM_HEADERS SET(GEOM_HEADERS

View File

@ -22,7 +22,7 @@
#include <GEOM_Application.hxx> #include <GEOM_Application.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_Application) IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_Application)
//======================================================================= //=======================================================================
//function : GEOM_Application //function : GEOM_Application
@ -42,22 +42,6 @@ GEOM_Application::~GEOM_Application()
{ {
} }
#if OCC_VERSION_LARGE <= 0x07000000
//=======================================================================
//function : Formats
//purpose :
//=======================================================================
void GEOM_Application::Formats(TColStd_SequenceOfExtendedString& Formats)
{
Formats.Append(TCollection_ExtendedString ("SALOME_GEOM"));
#if OCC_VERSION_MAJOR > 6
Formats.Append(TCollection_ExtendedString ("BinOcaf"));
#endif
}
#endif
//======================================================================= //=======================================================================
//function : ResourcesName //function : ResourcesName
//purpose : //purpose :

View File

@ -28,21 +28,16 @@
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <TColStd_SequenceOfExtendedString.hxx> #include <TColStd_SequenceOfExtendedString.hxx>
#include <Basics_OCCTVersion.hxx>
class GEOM_Application : public TDocStd_Application class GEOM_Application : public TDocStd_Application
{ {
public: public:
Standard_EXPORT GEOM_Application(); Standard_EXPORT GEOM_Application();
Standard_EXPORT ~GEOM_Application(); Standard_EXPORT ~GEOM_Application();
#if OCC_VERSION_LARGE <= 0x07000000
Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats);
#endif
Standard_EXPORT Standard_CString ResourcesName(); Standard_EXPORT Standard_CString ResourcesName();
public: public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application) DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application)
}; };
DEFINE_STANDARD_HANDLE(GEOM_Application, TDocStd_Application) DEFINE_STANDARD_HANDLE(GEOM_Application, TDocStd_Application)

View File

@ -33,7 +33,7 @@
#include <TDataStd_Name.hxx> #include <TDataStd_Name.hxx>
#include <TDocStd_Owner.hxx> #include <TDocStd_Owner.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver); IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
//================================================================================ //================================================================================
/*! /*!

View File

@ -36,18 +36,10 @@
#include <TColStd_HSequenceOfTransient.hxx> #include <TColStd_HSequenceOfTransient.hxx>
#include <TColStd_HArray1OfInteger.hxx> #include <TColStd_HArray1OfInteger.hxx>
#include <Basics_OCCTVersion.hxx>
#include <string> #include <string>
#include <vector> #include <vector>
#include <sstream> #include <sstream>
#if OCC_VERSION_MAJOR < 7
#define LOGBOOK TFunction_Logbook
#else
#define LOGBOOK Handle(TFunction_Logbook)
#endif
struct GEOM_Param struct GEOM_Param
{ {
std::string name; std::string name;
@ -107,7 +99,7 @@ public:
return params.back(); return params.back();
} }
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver) DEFINE_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver)
}; };
DEFINE_STANDARD_HANDLE (GEOM_BaseDriver,TFunction_Driver); DEFINE_STANDARD_HANDLE (GEOM_BaseDriver,TFunction_Driver);

View File

@ -515,4 +515,4 @@ TDF_Label GEOM_BaseObject::GetFreeLabel()
return _label.FindChild(FREE_LABEL); return _label.FindChild(FREE_LABEL);
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient ); IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseObject, Standard_Transient );

View File

@ -166,7 +166,7 @@ public:
int _docID; int _docID;
public: public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient) DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
}; };
#endif #endif

View File

@ -34,8 +34,6 @@
#include "GEOM_SubShapeDriver.hxx" #include "GEOM_SubShapeDriver.hxx"
#include "Sketcher_Profile.hxx" #include "Sketcher_Profile.hxx"
#include <Basics_OCCTVersion.hxx>
#include "utilities.h" #include "utilities.h"
#include <Basics_Utils.hxx> #include <Basics_Utils.hxx>
@ -66,11 +64,9 @@
#include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx> #include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
#if OCC_VERSION_LARGE > 0x07000000
#include <BinDrivers.hxx> #include <BinDrivers.hxx>
#include <StdDrivers_DocumentRetrievalDriver.hxx> #include <StdDrivers_DocumentRetrievalDriver.hxx>
#include <PCDM_StorageDriver.hxx> #include <PCDM_StorageDriver.hxx>
#endif
#include <set> #include <set>
@ -241,11 +237,9 @@ GEOM_Engine::GEOM_Engine()
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver()); TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
_OCAFApp = new GEOM_Application(); _OCAFApp = new GEOM_Application();
#if OCC_VERSION_LARGE > 0x07000000
_OCAFApp->DefineFormat("SALOME_GEOM", "GEOM Document Version 1.0", "sgd", _OCAFApp->DefineFormat("SALOME_GEOM", "GEOM Document Version 1.0", "sgd",
new StdDrivers_DocumentRetrievalDriver, 0); new StdDrivers_DocumentRetrievalDriver, 0);
BinDrivers::DefineFormat(_OCAFApp); BinDrivers::DefineFormat(_OCAFApp);
#endif
_UndoLimit = 0; _UndoLimit = 0;
} }
@ -285,11 +279,7 @@ Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID)); aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
} }
else if (force) { else if (force) {
#if OCC_VERSION_MAJOR > 6
_OCAFApp->NewDocument("BinOcaf", aDoc); _OCAFApp->NewDocument("BinOcaf", aDoc);
#else
_OCAFApp->NewDocument("SALOME_GEOM", aDoc);
#endif
aDoc->SetUndoLimit(_UndoLimit); aDoc->SetUndoLimit(_UndoLimit);
_mapIDDocument.Bind(theDocID, aDoc); _mapIDDocument.Bind(theDocID, aDoc);
TDataStd_Integer::Set(aDoc->Main(), theDocID); TDataStd_Integer::Set(aDoc->Main(), theDocID);
@ -450,9 +440,8 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) th
return NULL; return NULL;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); MESSAGE("GEOM_Engine::AddSubShape Error: " << aFail.GetMessageString());
MESSAGE("GEOM_Engine::AddSubShape Error: " << aFail->GetMessageString());
return NULL; return NULL;
} }
@ -588,12 +577,10 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
return false; return false;
} }
#if OCC_VERSION_MAJOR > 6
// Replace old document format by the new one. // Replace old document format by the new one.
if (aDoc->StorageFormat().IsEqual("SALOME_GEOM")) { if (aDoc->StorageFormat().IsEqual("SALOME_GEOM")) {
aDoc->ChangeStorageFormat("BinOcaf"); aDoc->ChangeStorageFormat("BinOcaf");
} }
#endif
aDoc->SetUndoLimit(_UndoLimit); aDoc->SetUndoLimit(_UndoLimit);

View File

@ -27,8 +27,6 @@
#include "GEOM_Object.hxx" #include "GEOM_Object.hxx"
#include "GEOM_DataMapOfAsciiStringTransient.hxx" #include "GEOM_DataMapOfAsciiStringTransient.hxx"
#include <Basics_OCCTVersion.hxx>
#include <TColStd_DataMapOfIntegerTransient.hxx> #include <TColStd_DataMapOfIntegerTransient.hxx>
#include <Resource_DataMapOfAsciiStringAsciiString.hxx> #include <Resource_DataMapOfAsciiStringAsciiString.hxx>

View File

@ -756,5 +756,5 @@ const Standard_GUID& GEOM_FieldStep::GetDataID()
return TDataStd_ExtStringArray::GetID(); return TDataStd_ExtStringArray::GetID();
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject ); IMPLEMENT_STANDARD_RTTIEXT(GEOM_Field, GEOM_BaseObject );
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject ); IMPLEMENT_STANDARD_RTTIEXT(GEOM_FieldStep, GEOM_BaseObject );

View File

@ -123,7 +123,7 @@ class GEOM_Field : public GEOM_BaseObject
// Returns all steps // Returns all steps
Standard_EXPORT std::list< Handle(GEOM_FieldStep)> GetSteps(); Standard_EXPORT std::list< Handle(GEOM_FieldStep)> GetSteps();
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Field,GEOM_BaseObject) DEFINE_STANDARD_RTTIEXT(GEOM_Field,GEOM_BaseObject)
private: private:
@ -185,7 +185,7 @@ public:
// Returns GUID of CAF data array // Returns GUID of CAF data array
const Standard_GUID& GetDataID(); const Standard_GUID& GetDataID();
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_FieldStep,GEOM_BaseObject) DEFINE_STANDARD_RTTIEXT(GEOM_FieldStep,GEOM_BaseObject)
private: private:

View File

@ -27,8 +27,6 @@
#include <GEOM_Solver.hxx> #include <GEOM_Solver.hxx>
#include <GEOM_ISubShape.hxx> #include <GEOM_ISubShape.hxx>
#include <Basics_OCCTVersion.hxx>
#include "utilities.h" #include "utilities.h"
#include <TDF.hxx> #include <TDF.hxx>
@ -250,9 +248,8 @@ TopoDS_Shape GEOM_Function::GetValue()
return aShape; return aShape;
} }
} }
catch (Standard_Failure) { catch (Standard_Failure& aFail) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); MESSAGE("GEOM_Function::GetValue Error: " << aFail.GetMessageString());
MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
return aShape; return aShape;
} }
} }
@ -980,4 +977,4 @@ void* GEOM_Function::GetCallBackData()
return reinterpret_cast<void*> ( address ); return reinterpret_cast<void*> ( address );
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient ); IMPLEMENT_STANDARD_RTTIEXT(GEOM_Function, Standard_Transient );

View File

@ -36,8 +36,6 @@
#include <TDataStd_ListOfExtendedString.hxx> #include <TDataStd_ListOfExtendedString.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <Basics_OCCTVersion.hxx>
class GEOM_Function; class GEOM_Function;
DEFINE_STANDARD_HANDLE (GEOM_Function, Standard_Transient); DEFINE_STANDARD_HANDLE (GEOM_Function, Standard_Transient);
@ -197,7 +195,7 @@ public:
//Returns top label of this function's naming tree //Returns top label of this function's naming tree
Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create = Standard_True); Standard_EXPORT TDF_Label GetNamingEntry (const Standard_Boolean create = Standard_True);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Function,Standard_Transient) DEFINE_STANDARD_RTTIEXT(GEOM_Function,Standard_Transient)
private: private:

View File

@ -296,5 +296,5 @@ GEOM_Object::GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObject
return funs; return funs;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject ); IMPLEMENT_STANDARD_RTTIEXT(GEOM_Object, GEOM_BaseObject );

View File

@ -115,7 +115,7 @@ class GEOM_Object : public GEOM_BaseObject
GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects ); GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObjects );
public: public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject) DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
}; };
#endif #endif

View File

@ -170,41 +170,43 @@ namespace GEOM
return *this; return *this;
} }
Handle(GEOM_Object) GetCreatedLast(const Handle(GEOM_Object)& theObj1, Handle(GEOM_BaseObject) GetCreatedLast(const Handle(Standard_Transient)& theObj1,
const Handle(GEOM_Object)& theObj2) const Handle(Standard_Transient)& theObj2)
{ {
if (theObj1.IsNull()) return theObj2; Handle(GEOM_BaseObject) bo1 = Handle(GEOM_Object)::DownCast(theObj1);
if (theObj2.IsNull()) return theObj1; Handle(GEOM_BaseObject) bo2 = Handle(GEOM_Object)::DownCast(theObj2);
if (bo1.IsNull()) return bo2;
if (bo2.IsNull()) return bo1;
TColStd_ListOfInteger aTags1, aTags2; TColStd_ListOfInteger aTags1, aTags2;
TDF_Tool::TagList(theObj1->GetEntry(), aTags1); TDF_Tool::TagList(bo1->GetEntry(), aTags1);
TDF_Tool::TagList(theObj2->GetEntry(), aTags2); TDF_Tool::TagList(bo2->GetEntry(), aTags2);
TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2); TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2);
for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) { for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) {
if (!aListIter2.More()) if (!aListIter2.More())
return theObj1; // anObj1 is stored under anObj2 return bo1; // anObj1 is stored under anObj2
if (aListIter1.Value() > aListIter2.Value()) if (aListIter1.Value() > aListIter2.Value())
return theObj1; return bo1;
else if (aListIter1.Value() < aListIter2.Value()) else if (aListIter1.Value() < aListIter2.Value())
return theObj2; return bo2;
} }
return theObj1; return bo1;
} }
Handle(GEOM_Object) GetCreatedLast(const Handle(TColStd_HSequenceOfTransient)& theObjects) Handle(GEOM_BaseObject) GetCreatedLast(const Handle(TColStd_HSequenceOfTransient)& theObjects)
{ {
Handle(GEOM_Object) anObject, aLatest; Handle(GEOM_BaseObject) anObject, aLatest;
int i, aLen = theObjects->Length(); int i, aLen = theObjects->Length();
if (aLen < 1) if (aLen < 1)
return aLatest; return aLatest;
for (i = 1; i <= aLen; i++) { for (i = 1; i <= aLen; i++) {
anObject = Handle(GEOM_Object)::DownCast(theObjects->Value(i)); anObject = Handle(GEOM_BaseObject)::DownCast(theObjects->Value(i));
if ( anObject.IsNull() ) { if ( anObject.IsNull() ) {
Handle(GEOM_Function) fun = Handle(GEOM_Function)::DownCast(theObjects->Value(i)); Handle(GEOM_Function) fun = Handle(GEOM_Function)::DownCast(theObjects->Value(i));
if ( !fun.IsNull() ) if ( !fun.IsNull() )
anObject = GEOM_Object::GetObject( fun->GetOwnerEntry() ); anObject = GEOM_BaseObject::GetObject( fun->GetOwnerEntry() );
} }
aLatest = GetCreatedLast(aLatest, anObject); aLatest = GetCreatedLast(aLatest, anObject);
} }

View File

@ -48,10 +48,8 @@ namespace GEOM
//operator TCollection_AsciiString () const; //operator TCollection_AsciiString () const;
#if OCC_VERSION_MAJOR >= 7
template <class T> template <class T>
Standard_EXPORT TPythonDump& operator<< (const Handle(T)& theObject) { return *this << theObject.get(); } Standard_EXPORT TPythonDump& operator<< (const Handle(T)& theObject) { return *this << theObject.get(); }
#endif
Standard_EXPORT TPythonDump& operator<< (bool theArg); Standard_EXPORT TPythonDump& operator<< (bool theArg);
Standard_EXPORT TPythonDump& operator<< (long int theArg); Standard_EXPORT TPythonDump& operator<< (long int theArg);
Standard_EXPORT TPythonDump& operator<< (int theArg); Standard_EXPORT TPythonDump& operator<< (int theArg);
@ -69,12 +67,12 @@ namespace GEOM
/*! Returns an object from two given, which has the latest entry /*! Returns an object from two given, which has the latest entry
*/ */
Standard_EXPORT Handle(::GEOM_Object) GetCreatedLast (const Handle(::GEOM_Object)& theObj1, Standard_EXPORT Handle(::GEOM_BaseObject) GetCreatedLast (const Handle(Standard_Transient)& theObj1,
const Handle(::GEOM_Object)& theObj2); const Handle(Standard_Transient)& theObj2);
/*! Returns an object from \a theObjects, which has the latest entry /*! Returns an object from \a theObjects, which has the latest entry
*/ */
Standard_EXPORT Handle(::GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects); Standard_EXPORT Handle(::GEOM_BaseObject) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects);
} }
#endif #endif

View File

@ -64,11 +64,7 @@ bool GEOM_Solver::ComputeFunction(Handle(GEOM_Function) theFunction)
aDriver->Init(theFunction->GetEntry()); aDriver->Init(theFunction->GetEntry());
#if OCC_VERSION_MAJOR < 7
TFunction_Logbook aLog;
#else
Handle(TFunction_Logbook) aLog = TFunction_Logbook::Set( aDriver->Label() ); Handle(TFunction_Logbook) aLog = TFunction_Logbook::Set( aDriver->Label() );
#endif
if(aDriver->Execute(aLog) == 0) return false; if(aDriver->Execute(aLog) == 0) return false;
return true; return true;

View File

@ -48,7 +48,7 @@ GEOM_SubShapeDriver::GEOM_SubShapeDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOM_SubShapeDriver::Execute(LOGBOOK& log) const Standard_Integer GEOM_SubShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -101,11 +101,7 @@ Standard_Integer GEOM_SubShapeDriver::Execute(LOGBOOK& log) const
if (aShape.IsNull()) return 0; if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -159,4 +155,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOM_SubShapeDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOM_SubShapeDriver,GEOM_BaseDriver);

View File

@ -35,9 +35,9 @@ class GEOM_SubShapeDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOM_SubShapeDriver(); Standard_EXPORT GEOM_SubShapeDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOM_SubShapeDriver() {}; Standard_EXPORT ~GEOM_SubShapeDriver() {};
@ -46,7 +46,7 @@ public:
bool GetCreationInformation(std::string& theOperationName, bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -106,6 +106,4 @@ GEOMAlgo_ShapeInfo.hxx
GEOMAlgo_ShapeInfo.cxx GEOMAlgo_ShapeInfo.cxx
GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
Basics_OCCTVersion.hxx
GEOMAlgo_KindOfDef.hxx GEOMAlgo_KindOfDef.hxx

View File

@ -25,8 +25,6 @@
#include <GEOMAlgo_AlgoTools.hxx> #include <GEOMAlgo_AlgoTools.hxx>
#include <Basics_OCCTVersion.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx> #include <gp_Pnt2d.hxx>
#include <gp_Dir2d.hxx> #include <gp_Dir2d.hxx>
@ -197,12 +195,7 @@ Standard_Integer GEOMAlgo_AlgoTools::BuildPCurveForEdgeOnFace
(const TopoDS_Edge& aEold, (const TopoDS_Edge& aEold,
const TopoDS_Edge& aEnew, const TopoDS_Edge& aEnew,
const TopoDS_Face& aF, const TopoDS_Face& aF,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx)
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
)
{ {
Standard_Boolean bIsClosed, bUClosed, bHasOld; Standard_Boolean bIsClosed, bUClosed, bHasOld;
Standard_Integer iRet, aNbPoints; Standard_Integer iRet, aNbPoints;
@ -222,7 +215,6 @@ Standard_Integer GEOMAlgo_AlgoTools::BuildPCurveForEdgeOnFace
return iRet; return iRet;
} }
// //
#if OCC_VERSION_LARGE > 0x06080000
// Try to copy PCurve from old edge to the new one. // Try to copy PCurve from old edge to the new one.
iRet = BOPTools_AlgoTools2D::AttachExistingPCurve(aEold, aEnew, aF, aCtx); iRet = BOPTools_AlgoTools2D::AttachExistingPCurve(aEold, aEnew, aF, aCtx);
@ -233,7 +225,6 @@ Standard_Integer GEOMAlgo_AlgoTools::BuildPCurveForEdgeOnFace
// The PCurve is attached successfully. // The PCurve is attached successfully.
return iRet; return iRet;
} }
#endif
// //
BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace(aEnew, aF); BOPTools_AlgoTools2D::BuildPCurveForEdgeOnFace(aEnew, aF);
aC2D=BRep_Tool::CurveOnSurface(aEnew, aF, aT1, aT2); aC2D=BRep_Tool::CurveOnSurface(aEnew, aF, aT1, aT2);
@ -446,12 +437,7 @@ void GEOMAlgo_AlgoTools::RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
Standard_Boolean GEOMAlgo_AlgoTools::IsSplitToReverse Standard_Boolean GEOMAlgo_AlgoTools::IsSplitToReverse
(const TopoDS_Edge& aEF1, (const TopoDS_Edge& aEF1,
const TopoDS_Edge& aEF2, const TopoDS_Edge& aEF2,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aContext)
const Handle(IntTools_Context)& aContext
#else
const Handle(BOPInt_Context)& aContext
#endif
)
{ {
Standard_Boolean aFlag; Standard_Boolean aFlag;
Standard_Real aT1, aT2, aScPr, a, b; Standard_Real aT1, aT2, aScPr, a, b;
@ -496,12 +482,7 @@ Standard_Boolean GEOMAlgo_AlgoTools::ProjectPointOnShape
(const gp_Pnt& aP1, (const gp_Pnt& aP1,
const TopoDS_Shape& aS, const TopoDS_Shape& aS,
gp_Pnt& aP2, gp_Pnt& aP2,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx)
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
)
{ {
Standard_Boolean bIsDone = Standard_False; Standard_Boolean bIsDone = Standard_False;
Standard_Real aT2; Standard_Real aT2;
@ -648,12 +629,7 @@ Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
const TopTools_ListOfShape& aLE, const TopTools_ListOfShape& aLE,
const Standard_Real aTol, const Standard_Real aTol,
TopTools_ListOfShape& aLESD, TopTools_ListOfShape& aLESD,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx)
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
)
{ {
Standard_Boolean bIsDone; Standard_Boolean bIsDone;
Standard_Real aTol2, aD2; Standard_Real aTol2, aD2;
@ -692,12 +668,7 @@ Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
(const TopTools_ListOfShape& aLE, (const TopTools_ListOfShape& aLE,
const Standard_Real aTol, const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE, TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx)
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
)
{ {
Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr; Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
TopTools_ListOfShape aLESD; TopTools_ListOfShape aLESD;
@ -765,12 +736,7 @@ Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
Standard_Integer GEOMAlgo_AlgoTools::RefineSDShapes Standard_Integer GEOMAlgo_AlgoTools::RefineSDShapes
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE, (GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE,
const Standard_Real aTol, const Standard_Real aTol,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx)
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
)
{ {
Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd; Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd;
TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd; TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd;

View File

@ -26,16 +26,10 @@
#ifndef _GEOMAlgo_AlgoTools_HeaderFile #ifndef _GEOMAlgo_AlgoTools_HeaderFile
#define _GEOMAlgo_AlgoTools_HeaderFile #define _GEOMAlgo_AlgoTools_HeaderFile
#include <Basics_OCCTVersion.hxx>
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
@ -92,34 +86,19 @@ class GEOMAlgo_AlgoTools {
static Standard_Integer RefineSDShapes static Standard_Integer RefineSDShapes
(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD, (GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
const Standard_Real aTol, const Standard_Real aTol,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx) ;
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE, static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
const Standard_Real aTol, const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE, TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx) ;
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1, static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
const TopTools_ListOfShape& aLE, const TopTools_ListOfShape& aLE,
const Standard_Real aTol, const Standard_Real aTol,
TopTools_ListOfShape& aLESD, TopTools_ListOfShape& aLESD,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx) ;
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static void PointOnShape(const TopoDS_Shape& aS, static void PointOnShape(const TopoDS_Shape& aS,
@ -146,12 +125,7 @@ class GEOMAlgo_AlgoTools {
static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1, static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
const TopoDS_Shape& aS, const TopoDS_Shape& aS,
gp_Pnt& aP2, gp_Pnt& aP2,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx) ;
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static void CorrectTolerances(const TopoDS_Shape& aShape, static void CorrectTolerances(const TopoDS_Shape& aShape,
@ -169,12 +143,7 @@ class GEOMAlgo_AlgoTools {
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsSplitToReverse1 (const TopoDS_Edge& aEF1, static Standard_Boolean IsSplitToReverse1 (const TopoDS_Edge& aEF1,
const TopoDS_Edge& aEF2, const TopoDS_Edge& aEF2,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx) ;
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE, static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
const TopoDS_Face& aF, const TopoDS_Face& aF,
@ -191,42 +160,22 @@ class GEOMAlgo_AlgoTools {
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theSplit, static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theSplit,
const TopoDS_Edge& theEdge, const TopoDS_Edge& theEdge,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& theCtx) ;
const Handle(IntTools_Context)& theCtx
#else
const Handle(BOPInt_Context)& theCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theFSp, static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theFSp,
const TopoDS_Face& theFSr, const TopoDS_Face& theFSr,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& theCtx) ;
const Handle(IntTools_Context)& theCtx
#else
const Handle(BOPInt_Context)& theCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSp, static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSp,
const TopoDS_Shape& theSr, const TopoDS_Shape& theSr,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& theCtx) ;
const Handle(IntTools_Context)& theCtx
#else
const Handle(BOPInt_Context)& theCtx
#endif
) ;
Standard_EXPORT Standard_EXPORT
static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aEold, static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aEold,
const TopoDS_Edge& aEnew, const TopoDS_Edge& aEnew,
const TopoDS_Face& aF, const TopoDS_Face& aF,
#if OCC_VERSION_LARGE > 0x06070100 const Handle(IntTools_Context)& aCtx) ;
const Handle(IntTools_Context)& aCtx
#else
const Handle(BOPInt_Context)& aCtx
#endif
) ;
// //
Standard_EXPORT Standard_EXPORT

View File

@ -27,7 +27,7 @@
// //
#include <GEOMAlgo_Clsf.hxx> #include <GEOMAlgo_Clsf.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo); IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo);
//======================================================================= //=======================================================================
//function : //function :

View File

@ -69,7 +69,7 @@ class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo
Standard_EXPORT Standard_EXPORT
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_Clsf,GEOMAlgo_HAlgo) DEFINE_STANDARD_RTTIEXT(GEOMAlgo_Clsf,GEOMAlgo_HAlgo)
protected: protected:
Standard_EXPORT Standard_EXPORT

View File

@ -47,7 +47,7 @@
#include <GEOMAlgo_SurfaceTools.hxx> #include <GEOMAlgo_SurfaceTools.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf) IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf)
//======================================================================= //=======================================================================
//function : //function :

View File

@ -71,7 +71,7 @@ class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf
Standard_EXPORT Standard_EXPORT
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox,GEOMAlgo_Clsf) DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox,GEOMAlgo_Clsf)
protected: protected:
TopoDS_Shape myBox; TopoDS_Shape myBox;

View File

@ -31,7 +31,7 @@
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad, GEOMAlgo_Clsf); IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad, GEOMAlgo_Clsf);
//======================================================================= //=======================================================================
//function : //function :

View File

@ -78,7 +78,7 @@ public:
Standard_EXPORT Standard_EXPORT
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad,GEOMAlgo_Clsf) DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfQuad,GEOMAlgo_Clsf)
protected: protected:

View File

@ -32,7 +32,7 @@
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
#include <BRepClass3d_SolidClassifier.hxx> #include <BRepClass3d_SolidClassifier.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf) IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf)
//======================================================================= //=======================================================================
//function : //function :

View File

@ -58,7 +58,7 @@ class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf
Standard_EXPORT Standard_EXPORT
virtual void CheckData() ; virtual void CheckData() ;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid,GEOMAlgo_Clsf) DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid,GEOMAlgo_Clsf)
protected: protected:
TopoDS_Shape myShape; TopoDS_Shape myShape;

View File

@ -32,7 +32,7 @@
#include <GEOMAlgo_SurfaceTools.hxx> #include <GEOMAlgo_SurfaceTools.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf); IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf);
//======================================================================= //=======================================================================
//function : //function :

View File

@ -69,7 +69,7 @@ class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf
Standard_EXPORT Standard_EXPORT
virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf,GEOMAlgo_Clsf) DEFINE_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf,GEOMAlgo_Clsf)
protected: protected:
Handle(Geom_Surface) myS; Handle(Geom_Surface) myS;

View File

@ -26,8 +26,6 @@
#include <GEOMAlgo_FinderShapeOn.hxx> #include <GEOMAlgo_FinderShapeOn.hxx>
#include <Basics_OCCTVersion.hxx>
#include <Precision.hxx> #include <Precision.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>

View File

@ -68,12 +68,7 @@
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
#include <TopTools_IndexedMapOfShape.hxx> #include <TopTools_IndexedMapOfShape.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
//======================================================================= //=======================================================================
//function : //function :

View File

@ -554,11 +554,7 @@ Standard_Integer CheckAncesstors
// //
iRet=0; iRet=0;
// //
#if OCC_VERSION_MAJOR < 7
pLE=const_cast<TopTools_ListOfShape*>(&aMVE.FindFromKey(aVSD));
#else
pLE=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMVE).ChangeSeek(aVSD); pLE=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMVE).ChangeSeek(aVSD);
#endif
if (!pLE) { if (!pLE) {
return iRet; return iRet;
} }
@ -566,11 +562,7 @@ Standard_Integer CheckAncesstors
for (; aItLE.More(); aItLE.Next()) { for (; aItLE.More(); aItLE.Next()) {
const TopoDS_Shape& aE=aItLE.Value(); const TopoDS_Shape& aE=aItLE.Value();
// //
#if OCC_VERSION_MAJOR < 7
pLV=const_cast<TopTools_ListOfShape*>(&aMEV.FindFromKey(aE));
#else
pLV=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMEV).ChangeSeek(aE); pLV=const_cast<TopTools_IndexedDataMapOfShapeListOfShape&>(aMEV).ChangeSeek(aE);
#endif
if (!pLV) { if (!pLV) {
continue; // it should be not so continue; // it should be not so
} }
@ -594,11 +586,7 @@ Standard_Integer CheckAncesstors
// //
iRet=1; iRet=1;
// //
#if OCC_VERSION_MAJOR < 7
pLVZ=const_cast<TopTools_ListOfShape*>(&aMEVZ.FindFromKey(aE));
#else
pLVZ=aMEVZ.ChangeSeek(aE); pLVZ=aMEVZ.ChangeSeek(aE);
#endif
if (!pLVZ) { if (!pLVZ) {
aMEVZ.Add(aE, aLVX); aMEVZ.Add(aE, aLVX);
} }

View File

@ -27,8 +27,6 @@
// //
#include <GEOMAlgo_Gluer.hxx> #include <GEOMAlgo_Gluer.hxx>
#include <Basics_OCCTVersion.hxx>
#include <NCollection_UBTreeFiller.hxx> #include <NCollection_UBTreeFiller.hxx>
#include <TColStd_MapIteratorOfMapOfInteger.hxx> #include <TColStd_MapIteratorOfMapOfInteger.hxx>
@ -78,11 +76,7 @@
#include <BRepBndLib.hxx> #include <BRepBndLib.hxx>
// //
#include <IntTools_Tools.hxx> #include <IntTools_Tools.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <BOPTools_AlgoTools.hxx> #include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx> #include <BOPTools_AlgoTools3D.hxx>
#include <BOPTools_AlgoTools2D.hxx> #include <BOPTools_AlgoTools2D.hxx>

View File

@ -25,12 +25,7 @@
// <peter@PREFEX> // <peter@PREFEX>
// //
#include <GEOMAlgo_GluerAlgo.hxx> #include <GEOMAlgo_GluerAlgo.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
//======================================================================= //=======================================================================
//function : GEOMAlgo_GluerAlgo //function : GEOMAlgo_GluerAlgo
@ -101,11 +96,7 @@ Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry() const
//function : SetContext //function : SetContext
//purpose : //purpose :
//======================================================================= //=======================================================================
#if OCC_VERSION_LARGE > 0x06070100
void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext) void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext)
#else
void GEOMAlgo_GluerAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
#endif
{ {
myContext=theContext; myContext=theContext;
} }
@ -113,11 +104,7 @@ void GEOMAlgo_GluerAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
//function : Context //function : Context
//purpose : //purpose :
//======================================================================= //=======================================================================
#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context() const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context()
#else
const Handle(BOPInt_Context)& GEOMAlgo_GluerAlgo::Context()
#endif
{ {
return myContext; return myContext;
} }
@ -153,10 +140,6 @@ void GEOMAlgo_GluerAlgo::Clear()
void GEOMAlgo_GluerAlgo::Perform() void GEOMAlgo_GluerAlgo::Perform()
{ {
if (myContext.IsNull()) { if (myContext.IsNull()) {
#if OCC_VERSION_LARGE > 0x06070100
myContext=new IntTools_Context; myContext=new IntTools_Context;
#else
myContext=new BOPInt_Context;
#endif
} }
} }

View File

@ -27,18 +27,11 @@
#ifndef _GEOMAlgo_GluerAlgo_HeaderFile #ifndef _GEOMAlgo_GluerAlgo_HeaderFile
#define _GEOMAlgo_GluerAlgo_HeaderFile #define _GEOMAlgo_GluerAlgo_HeaderFile
#include <Basics_OCCTVersion.hxx>
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <TopTools_DataMapOfShapeListOfShape.hxx> #include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx> #include <TopTools_DataMapOfShapeShape.hxx>
@ -80,18 +73,10 @@ public:
virtual void Clear() ; virtual void Clear() ;
Standard_EXPORT Standard_EXPORT
#if OCC_VERSION_LARGE > 0x06070100
void SetContext(const Handle(IntTools_Context)&) ; void SetContext(const Handle(IntTools_Context)&) ;
#else
void SetContext(const Handle(BOPInt_Context)&) ;
#endif
Standard_EXPORT Standard_EXPORT
#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& Context() ; const Handle(IntTools_Context)& Context() ;
#else
const Handle(BOPInt_Context)& Context() ;
#endif
Standard_EXPORT Standard_EXPORT
const TopTools_DataMapOfShapeListOfShape& Images() const; const TopTools_DataMapOfShapeListOfShape& Images() const;
@ -103,11 +88,7 @@ protected:
TopoDS_Shape myArgument; TopoDS_Shape myArgument;
Standard_Real myTolerance; Standard_Real myTolerance;
Standard_Boolean myCheckGeometry; Standard_Boolean myCheckGeometry;
#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) myContext; Handle(IntTools_Context) myContext;
#else
Handle(BOPInt_Context) myContext;
#endif
TopTools_DataMapOfShapeListOfShape myImages; TopTools_DataMapOfShapeListOfShape myImages;
TopTools_DataMapOfShapeShape myOrigins; TopTools_DataMapOfShapeShape myOrigins;

View File

@ -27,7 +27,7 @@
// //
#include <GEOMAlgo_HAlgo.hxx> #include <GEOMAlgo_HAlgo.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, MMgt_TShared); IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, Standard_Transient);
//======================================================================= //=======================================================================
// function: // function:

View File

@ -32,17 +32,15 @@
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
#include <MMgt_TShared.hxx> #include <Standard_Transient.hxx>
#include <Basics_OCCTVersion.hxx> DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, Standard_Transient);
DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared);
//======================================================================= //=======================================================================
//class : GEOMAlgo_HAlgo //class : GEOMAlgo_HAlgo
//purpose : //purpose :
//======================================================================= //=======================================================================
class GEOMAlgo_HAlgo : public MMgt_TShared class GEOMAlgo_HAlgo : public Standard_Transient
{ {
public: public:
Standard_EXPORT Standard_EXPORT
@ -60,7 +58,7 @@ class GEOMAlgo_HAlgo : public MMgt_TShared
Standard_EXPORT Standard_EXPORT
Standard_Integer WarningStatus() const; Standard_Integer WarningStatus() const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMAlgo_HAlgo,MMgt_TShared) DEFINE_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, Standard_Transient)
protected: protected:
Standard_EXPORT Standard_EXPORT

View File

@ -26,8 +26,6 @@
#include <GEOMAlgo_RemoverWebs.hxx> #include <GEOMAlgo_RemoverWebs.hxx>
#include <GEOMAlgo_ShapeAlgo.hxx> #include <GEOMAlgo_ShapeAlgo.hxx>
#include <Basics_OCCTVersion.hxx>
#include <TopoDS_Iterator.hxx> #include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TopoDS_Solid.hxx> #include <TopoDS_Solid.hxx>
@ -37,11 +35,7 @@
#include <BRepClass3d_SolidClassifier.hxx> #include <BRepClass3d_SolidClassifier.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <BOPAlgo_BuilderSolid.hxx> #include <BOPAlgo_BuilderSolid.hxx>
@ -108,11 +102,7 @@ void GEOMAlgo_RemoverWebs::Perform()
if (!myContext.IsNull()) { if (!myContext.IsNull()) {
myContext.Nullify(); myContext.Nullify();
} }
#if OCC_VERSION_LARGE > 0x06070100
myContext=new IntTools_Context; myContext=new IntTools_Context;
#else
myContext=new BOPInt_Context;
#endif
// //
BuildSolid(); BuildSolid();
// //
@ -225,11 +215,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
aSB.SetContext(myContext); aSB.SetContext(myContext);
aSB.SetShapes(aSFS); aSB.SetShapes(aSFS);
aSB.Perform(); aSB.Perform();
#if OCC_VERSION_LARGE > 0x07010001
iErr=aSB.HasErrors(); iErr=aSB.HasErrors();
#else
iErr=aSB.ErrorStatus();
#endif
if (iErr) { if (iErr) {
myErrorStatus=20; // SolidBuilder failed myErrorStatus=20; // SolidBuilder failed
return; return;
@ -261,11 +247,7 @@ void GEOMAlgo_RemoverWebs::AddInternalShapes(const BOPCol_ListOfShape& aLSR,
TopoDS_Solid aSd; TopoDS_Solid aSd;
BRep_Builder aBB; BRep_Builder aBB;
BOPCol_ListIteratorOfListOfShape aItLS; BOPCol_ListIteratorOfListOfShape aItLS;
#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=new IntTools_Context; Handle(IntTools_Context) aCtx=new IntTools_Context;
#else
Handle(BOPInt_Context) aCtx=new BOPInt_Context;
#endif
// //
aNbSI=aMSI.Extent(); aNbSI=aMSI.Extent();
for (i=1; i<=aNbSI; ++i) { for (i=1; i<=aNbSI; ++i) {

View File

@ -26,11 +26,7 @@
// <pkv@irinox> // <pkv@irinox>
// //
#include <GEOMAlgo_ShapeAlgo.hxx> #include <GEOMAlgo_ShapeAlgo.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
//======================================================================= //=======================================================================
//function : GEOMAlgo_ShapeAlgo //function : GEOMAlgo_ShapeAlgo
@ -54,11 +50,7 @@ GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo()
//function : SetContext //function : SetContext
//purpose : //purpose :
//======================================================================= //=======================================================================
#if OCC_VERSION_LARGE > 0x06070100
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext) void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
#else
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
#endif
{ {
myContext=theContext; myContext=theContext;
} }
@ -66,11 +58,7 @@ void GEOMAlgo_ShapeAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
//function : Context //function : Context
//purpose : //purpose :
//======================================================================= //=======================================================================
#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
#else
const Handle(BOPInt_Context)& GEOMAlgo_ShapeAlgo::Context()const
#endif
{ {
return myContext; return myContext;
} }
@ -121,10 +109,6 @@ const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const
void GEOMAlgo_ShapeAlgo::Perform() void GEOMAlgo_ShapeAlgo::Perform()
{ {
if (myContext.IsNull()) { if (myContext.IsNull()) {
#if OCC_VERSION_LARGE > 0x06070100
myContext=new IntTools_Context; myContext=new IntTools_Context;
#else
myContext=new BOPInt_Context;
#endif
} }
} }

View File

@ -20,25 +20,14 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_ShapeAlgo.hxx
// Created: Tue Dec 7 12:06:54 2004
// Author: Peter KURNEV
// <pkv@irinox>
//
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#define _GEOMAlgo_ShapeAlgo_HeaderFile #define _GEOMAlgo_ShapeAlgo_HeaderFile
#include <Basics_OCCTVersion.hxx>
#include <Standard.hxx> #include <Standard.hxx>
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#if OCC_VERSION_LARGE > 0x06070100 #include <IntTools_Context.hxx>
#include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <GEOMAlgo_Algo.hxx> #include <GEOMAlgo_Algo.hxx>
//======================================================================= //=======================================================================
@ -47,23 +36,15 @@
//======================================================================= //=======================================================================
class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo
{ {
public: public:
//! Sets cashed geometrical tools <br> //! Sets cashed geometrical tools <br>
Standard_EXPORT Standard_EXPORT
#if OCC_VERSION_LARGE > 0x06070100
void SetContext(const Handle(IntTools_Context)& theContext) ; void SetContext(const Handle(IntTools_Context)& theContext) ;
#else
void SetContext(const Handle(BOPInt_Context)& theContext) ;
#endif
//! Returns cashed geometrical tools <br> //! Returns cashed geometrical tools <br>
Standard_EXPORT Standard_EXPORT
#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& Context() const; const Handle(IntTools_Context)& Context() const;
#else
const Handle(BOPInt_Context)& Context() const;
#endif
Standard_EXPORT Standard_EXPORT
void SetShape(const TopoDS_Shape& aS) ; void SetShape(const TopoDS_Shape& aS) ;
@ -90,14 +71,10 @@ protected:
Standard_EXPORT Standard_EXPORT
virtual ~GEOMAlgo_ShapeAlgo(); virtual ~GEOMAlgo_ShapeAlgo();
TopoDS_Shape myShape; TopoDS_Shape myShape;
Standard_Real myTolerance; Standard_Real myTolerance;
TopoDS_Shape myResult; TopoDS_Shape myResult;
#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) myContext; Handle(IntTools_Context) myContext;
#else
Handle(BOPInt_Context) myContext;
#endif
}; };
#endif #endif

View File

@ -27,8 +27,6 @@
// //
#include <GEOMAlgo_ShellSolid.hxx> #include <GEOMAlgo_ShellSolid.hxx>
#include <Basics_OCCTVersion.hxx>
#include <Standard_Failure.hxx> #include <Standard_Failure.hxx>
#include <gp_Pnt2d.hxx> #include <gp_Pnt2d.hxx>
@ -52,11 +50,7 @@
#include <BOPCol_DataMapOfShapeListOfShape.hxx> #include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx> #include <BOPCol_ListOfShape.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <BOPDS_DS.hxx> #include <BOPDS_DS.hxx>
#include <BOPAlgo_Builder.hxx> #include <BOPAlgo_Builder.hxx>
@ -101,9 +95,6 @@ GEOMAlgo_ShellSolidBuilder::~GEOMAlgo_ShellSolidBuilder()
//======================================================================= //=======================================================================
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller) void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
{ {
#if OCC_VERSION_LARGE <= 0x07010000
myErrorStatus=0;
#endif
// //
myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller; myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller;
myDS=myPaveFiller->PDS(); myDS=myPaveFiller->PDS();
@ -111,97 +102,57 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi
// //
// 1. CheckData // 1. CheckData
CheckData(); CheckData();
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// //
// 2. Prepare // 2. Prepare
Prepare(); Prepare();
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// //
// 3. Fill Images // 3. Fill Images
// 3.1 Vertice // 3.1 Vertice
FillImagesVertices(); FillImagesVertices();
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// //
BuildResult(TopAbs_VERTEX); BuildResult(TopAbs_VERTEX);
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// 3.2 Edges // 3.2 Edges
FillImagesEdges(); FillImagesEdges();
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// //
BuildResult(TopAbs_EDGE); BuildResult(TopAbs_EDGE);
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// //
// 3.3 Wires // 3.3 Wires
FillImagesContainers(TopAbs_WIRE); FillImagesContainers(TopAbs_WIRE);
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// //
BuildResult(TopAbs_WIRE); BuildResult(TopAbs_WIRE);
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// 3.4 Faces // 3.4 Faces
FillImagesFaces(); FillImagesFaces();
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
// //
BuildResult(TopAbs_FACE); BuildResult(TopAbs_FACE);
#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) { if (HasErrors()) {
#else
if (myErrorStatus) {
#endif
return; return;
} }
} }
@ -228,9 +179,6 @@ GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid()
//======================================================================= //=======================================================================
void GEOMAlgo_ShellSolid::Perform() void GEOMAlgo_ShellSolid::Perform()
{ {
#if OCC_VERSION_LARGE <= 0x07010000
myErrorStatus=0;
#endif
// //
try { try {
Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp; Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp;
@ -251,11 +199,7 @@ void GEOMAlgo_ShellSolid::Perform()
myErrorStatus=10; myErrorStatus=10;
return; return;
} }
#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) { if(myDSFiller->HasErrors()) {
#else
if(myDSFiller->ErrorStatus()) {
#endif
myErrorStatus=11; myErrorStatus=11;
return; return;
} }
@ -285,11 +229,7 @@ void GEOMAlgo_ShellSolid::Perform()
return; return;
} }
// //
#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=myDSFiller->Context(); Handle(IntTools_Context) aCtx=myDSFiller->Context();
#else
Handle(BOPInt_Context) aCtx=myDSFiller->Context();
#endif
const BOPDS_IndexRange& aRange=pDS->Range(iRank); const BOPDS_IndexRange& aRange=pDS->Range(iRank);
aRange.Indices(iBeg, iEnd); aRange.Indices(iBeg, iEnd);
const TopoDS_Solid& aSolid=(!iRank) ? *((TopoDS_Solid*)&aTool) : *((TopoDS_Solid*)&aObj); const TopoDS_Solid& aSolid=(!iRank) ? *((TopoDS_Solid*)&aTool) : *((TopoDS_Solid*)&aObj);
@ -299,11 +239,7 @@ void GEOMAlgo_ShellSolid::Perform()
GEOMAlgo_ShellSolidBuilder aSSB; GEOMAlgo_ShellSolidBuilder aSSB;
// //
aSSB.PerformWithFiller(*myDSFiller); aSSB.PerformWithFiller(*myDSFiller);
#if OCC_VERSION_LARGE > 0x07010001
iErr=aSSB.HasErrors(); iErr=aSSB.HasErrors();
#else
iErr=aSSB.ErrorStatus();
#endif
if (iErr) { if (iErr) {
myErrorStatus=15; myErrorStatus=15;
return; return;

View File

@ -37,8 +37,6 @@
#include <TopTools_ListIteratorOfListOfShape.hxx> #include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx> #include <TopTools_IndexedMapOfShape.hxx>
#include <Basics_OCCTVersion.hxx>
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx> #include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
//======================================================================= //=======================================================================
@ -85,11 +83,7 @@ void GEOMAlgo_SolidSolid::Perform()
myErrorStatus=10; myErrorStatus=10;
return; return;
} }
#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) { if(myDSFiller->HasErrors()) {
#else
if(myDSFiller->ErrorStatus()) {
#endif
myErrorStatus=11; myErrorStatus=11;
return; return;
} }

View File

@ -41,8 +41,6 @@
#include <BOPTools.hxx> #include <BOPTools.hxx>
#include <Basics_OCCTVersion.hxx>
static static
void TreatCompound(const TopoDS_Shape& aC, void TreatCompound(const TopoDS_Shape& aC,
BOPCol_ListOfShape& aLSX); BOPCol_ListOfShape& aLSX);
@ -150,10 +148,6 @@ void GEOMAlgo_Splitter::Clear()
//======================================================================= //=======================================================================
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType) void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
{ {
#if OCC_VERSION_LARGE <= 0x07010000
myErrorStatus=0;
#endif
//
TopAbs_ShapeEnum aType; TopAbs_ShapeEnum aType;
BRep_Builder aBB; BRep_Builder aBB;
BOPCol_MapOfShape aM; BOPCol_MapOfShape aM;

View File

@ -27,8 +27,6 @@
// //
#include <GEOMAlgo_VertexSolid.hxx> #include <GEOMAlgo_VertexSolid.hxx>
#include <Basics_OCCTVersion.hxx>
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <TopAbs_ShapeEnum.hxx> #include <TopAbs_ShapeEnum.hxx>
@ -48,11 +46,7 @@
#include <BRepClass3d_SolidClassifier.hxx> #include <BRepClass3d_SolidClassifier.hxx>
// //
#include <BOPCol_ListOfShape.hxx> #include <BOPCol_ListOfShape.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
// //
#include <BOPDS_DS.hxx> #include <BOPDS_DS.hxx>
#include <BOPDS_IndexRange.hxx> #include <BOPDS_IndexRange.hxx>
@ -90,11 +84,7 @@ void GEOMAlgo_VertexSolid::Perform()
myErrorStatus=10; myErrorStatus=10;
return; return;
} }
#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) { if(myDSFiller->HasErrors()) {
#else
if(myDSFiller->ErrorStatus()) {
#endif
myErrorStatus=11; myErrorStatus=11;
return; return;
} }
@ -152,11 +142,7 @@ void GEOMAlgo_VertexSolid::BuildResult()
const TopoDS_Shape& aTool=aLS.Last(); const TopoDS_Shape& aTool=aLS.Last();
const TopoDS_Solid& aSolid=(myRank==0) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj); const TopoDS_Solid& aSolid=(myRank==0) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj);
// //
#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=myDSFiller->Context(); Handle(IntTools_Context) aCtx=myDSFiller->Context();
#else
Handle(BOPInt_Context) aCtx=myDSFiller->Context();
#endif
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid); BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
// //
aNbRanges=aDS.NbRanges(); aNbRanges=aDS.NbRanges();

View File

@ -27,8 +27,6 @@
// //
#include <GEOMAlgo_WireSolid.hxx> #include <GEOMAlgo_WireSolid.hxx>
#include <Basics_OCCTVersion.hxx>
#include <Standard_Failure.hxx> #include <Standard_Failure.hxx>
#include <TopAbs_ShapeEnum.hxx> #include <TopAbs_ShapeEnum.hxx>
@ -40,17 +38,11 @@
#include <BOPDS_ListOfPaveBlock.hxx> #include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx> #include <BOPDS_PaveBlock.hxx>
#include <TopoDS_Solid.hxx> #include <TopoDS_Solid.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx> #include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <BRepClass3d_SolidClassifier.hxx> #include <BRepClass3d_SolidClassifier.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BOPTools_AlgoTools.hxx> #include <BOPTools_AlgoTools.hxx>
#include <Basics_OCCTVersion.hxx>
//======================================================================= //=======================================================================
//function : GEOMAlgo_WireSolid //function : GEOMAlgo_WireSolid
//purpose : //purpose :
@ -80,11 +72,7 @@ void GEOMAlgo_WireSolid::Perform()
myErrorStatus=10; myErrorStatus=10;
return; return;
} }
#if OCC_VERSION_LARGE > 0x07010001
if(myDSFiller->HasErrors()) { if(myDSFiller->HasErrors()) {
#else
if(myDSFiller->ErrorStatus()) {
#endif
myErrorStatus=11; myErrorStatus=11;
return; return;
} }
@ -154,11 +142,7 @@ void GEOMAlgo_WireSolid::BuildResult()
const TopoDS_Solid& aSolid=(iRank==0) ? *((TopoDS_Solid*)&aTool) : const TopoDS_Solid& aSolid=(iRank==0) ? *((TopoDS_Solid*)&aTool) :
*((TopoDS_Solid*)&aObj); *((TopoDS_Solid*)&aObj);
// //
#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=myDSFiller->Context(); Handle(IntTools_Context) aCtx=myDSFiller->Context();
#else
Handle(BOPInt_Context) aCtx=myDSFiller->Context();
#endif
//BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid); //BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid);
// //
const BOPDS_IndexRange& aRange=pDS->Range(iRank); const BOPDS_IndexRange& aRange=pDS->Range(iRank);

View File

@ -30,7 +30,7 @@
#include <AIS_InteractiveObject.hxx> #include <AIS_InteractiveObject.hxx>
#include <SelectMgr_EntityOwner.hxx> #include <SelectMgr_EntityOwner.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_OCCFilter, SelectMgr_Filter) IMPLEMENT_STANDARD_RTTIEXT(GEOM_OCCFilter, SelectMgr_Filter)
//======================================================================= //=======================================================================
// function : GEOM_OCCFilter // function : GEOM_OCCFilter

View File

@ -27,8 +27,6 @@
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <Basics_OCCTVersion.hxx>
class LightApp_SelectionMgr; class LightApp_SelectionMgr;
class GEOM_OCCFilter : public SelectMgr_Filter class GEOM_OCCFilter : public SelectMgr_Filter
@ -44,7 +42,7 @@ private:
public: public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_OCCFilter,SelectMgr_Filter) DEFINE_STANDARD_RTTIEXT(GEOM_OCCFilter,SelectMgr_Filter)
}; };

View File

@ -26,8 +26,6 @@
#include "GEOMGUI_OCCSelector.h" #include "GEOMGUI_OCCSelector.h"
#include "GEOM_Annotation.hxx" #include "GEOM_Annotation.hxx"
#include <Basics_OCCTVersion.hxx>
#include <LightApp_DataSubOwner.h> #include <LightApp_DataSubOwner.h>
#include <OCCViewer_ViewModel.h> #include <OCCViewer_ViewModel.h>
@ -179,15 +177,11 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
Handle(SelectMgr_Selection) sel = theObj->Selection( m ); Handle(SelectMgr_Selection) sel = theObj->Selection( m );
for ( sel->Init(); sel->More(); sel->Next() ) { for ( sel->Init(); sel->More(); sel->Next() ) {
#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive(); const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive();
if( aHSenEntity.IsNull() ) if( aHSenEntity.IsNull() )
continue; continue;
Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive(); Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
#else
Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
#endif
if ( entity.IsNull() ) if ( entity.IsNull() )
continue; continue;

View File

@ -59,8 +59,6 @@
#include <SUIT_ViewManager.h> #include <SUIT_ViewManager.h>
#include <SUIT_ResourceMgr.h> #include <SUIT_ResourceMgr.h>
#include <Basics_OCCTVersion.hxx>
#include <SalomeApp_Study.h> #include <SalomeApp_Study.h>
#include <SalomeApp_Application.h> #include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h> #include <LightApp_SelectionMgr.h>
@ -90,9 +88,6 @@
#include <AIS_AngleDimension.hxx> #include <AIS_AngleDimension.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx> #include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <Aspect_PolygonOffsetMode.hxx> #include <Aspect_PolygonOffsetMode.hxx>
#if OCC_VERSION_MAJOR < 7
#include <Aspect_ColorScale.hxx>
#endif
#include <Prs3d_IsoAspect.hxx> #include <Prs3d_IsoAspect.hxx>
#include <Prs3d_PointAspect.hxx> #include <Prs3d_PointAspect.hxx>
#include <StdSelect_TypeOfEdge.hxx> #include <StdSelect_TypeOfEdge.hxx>
@ -113,6 +108,7 @@
#include <TopoDS.hxx> #include <TopoDS.hxx>
#include <NCollection_DataMap.hxx> #include <NCollection_DataMap.hxx>
#include <NCollection_Map.hxx> #include <NCollection_Map.hxx>
#include <Graphic3d_Texture2Dmanual.hxx>
#include <Prs3d_ShadingAspect.hxx> #include <Prs3d_ShadingAspect.hxx>
@ -242,8 +238,11 @@ namespace
if ( aAISShape.IsNull() ) if ( aAISShape.IsNull() )
continue; continue;
#ifdef USE_TEXTURED_SHAPE const Handle(Graphic3d_TextureMap)& aTexture = aAISShape->Attributes()->ShadingAspect()->Aspect()->TextureMap();
const Handle(Image_PixMap)& aPixmap = aAISShape->TexturePixMap(); if ( aTexture.IsNull() )
continue;
const Handle(Image_PixMap)& aPixmap = aTexture->GetImage();
if ( aPixmap.IsNull() ) if ( aPixmap.IsNull() )
continue; continue;
@ -258,7 +257,6 @@ namespace
aPixmapUsersMap.UnBind( aPixmap ); aPixmapUsersMap.UnBind( aPixmap );
aPixmapCacheMap.remove( aPixmapCacheMap.key( aPixmap ) ); aPixmapCacheMap.remove( aPixmapCacheMap.key( aPixmap ) );
} }
#endif
} }
} }
@ -464,7 +462,7 @@ static std::string getName( GEOM::GEOM_BaseObject_ptr object )
*/ */
//================================================================= //=================================================================
GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st ) GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
: myUpdateColorScale(true), myIsRedisplayed( false ) : myUpdateColorScale( true ), myIsRedisplayed( false )
{ {
if( st ) if( st )
myApp = dynamic_cast<SalomeApp_Application*>( st->application() ); myApp = dynamic_cast<SalomeApp_Application*>( st->application() );
@ -512,13 +510,6 @@ GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
myViewFrame = 0; myViewFrame = 0;
#if OCC_VERSION_MAJOR >= 7
myColorScale = new AIS_ColorScale;
myColorScale->SetZLayer (Graphic3d_ZLayerId_TopOSD);
myColorScale->SetTransformPersistence (
Graphic3d_TransformPers::FromDeprecatedParams(Graphic3d_TMF_2d, gp_Pnt (-1,-1,0)));
#endif
myFieldDataType = GEOM::FDT_Double; myFieldDataType = GEOM::FDT_Double;
myFieldDimension = 0; myFieldDimension = 0;
myFieldStepRangeMin = 0; myFieldStepRangeMin = 0;
@ -866,11 +857,12 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
AISShape->SetLabelColor( qColorFromResources( "label_color", QColor( 255, 255, 255 ) ) ); AISShape->SetLabelColor( qColorFromResources( "label_color", QColor( 255, 255, 255 ) ) );
// set display mode // set display mode
AISShape->SetDisplayMode( HasDisplayMode() ? int displayMode = HasDisplayMode() ?
// predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function // predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function
GetDisplayMode() : GetDisplayMode() :
// display mode from properties // display mode from properties
propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt() ); propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt();
AISShape->SetDisplayMode( displayMode );
// - face boundaries color and line width // - face boundaries color and line width
anAspect = AISShape->Attributes()->FaceBoundaryAspect(); anAspect = AISShape->Attributes()->FaceBoundaryAspect();
@ -960,7 +952,6 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
aImagePath = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString(); aImagePath = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
} }
#ifdef USE_TEXTURED_SHAPE
Handle(Image_PixMap) aPixmap; Handle(Image_PixMap) aPixmap;
if ( !aImagePath.isEmpty() ) if ( !aImagePath.isEmpty() )
aPixmap = cacheTextureFor( aImagePath, AISShape ); aPixmap = cacheTextureFor( aImagePath, AISShape );
@ -969,14 +960,12 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// apply image to shape // apply image to shape
if ( !aPixmap.IsNull() ) { if ( !aPixmap.IsNull() ) {
AISShape->SetTexturePixMap( aPixmap ); AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap( new Graphic3d_Texture2Dmanual( aPixmap ) );
AISShape->SetTextureMapOn();
AISShape->DisableTextureModulate();
} }
else { if ( displayMode == GEOM_AISShape::TexturedShape )
AISShape->SetTextureMapOff(); AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn();
} else
#endif AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOff();
// set line width // set line width
AISShape->SetWidth( HasWidth() ? AISShape->SetWidth( HasWidth() ?
@ -2075,7 +2064,7 @@ void GEOM_Displayer::BeforeDisplay( SALOME_View* v, const SALOME_OCCPrs* )
void GEOM_Displayer::AfterDisplay( SALOME_View* v, const SALOME_OCCPrs* p ) void GEOM_Displayer::AfterDisplay( SALOME_View* v, const SALOME_OCCPrs* p )
{ {
UpdateColorScale(false,false); UpdateColorScale();
// visualize annotations for displayed presentation // visualize annotations for displayed presentation
SUIT_Session* session = SUIT_Session::session(); SUIT_Session* session = SUIT_Session::session();
@ -2099,7 +2088,7 @@ void GEOM_Displayer::BeforeErase( SALOME_View* v, const SALOME_OCCPrs* p )
void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p ) void GEOM_Displayer::AfterErase( SALOME_View* v, const SALOME_OCCPrs* p )
{ {
LightApp_Displayer::AfterErase( v, p ); LightApp_Displayer::AfterErase( v, p );
UpdateColorScale(false,false); UpdateColorScale();
if ( !myIsRedisplayed ) { if ( !myIsRedisplayed ) {
// hide annotations for erased presentation // hide annotations for erased presentation
@ -2965,11 +2954,7 @@ QList<QVariant> GEOM_Displayer::groupFieldData( const QList<QVariant>& theFieldS
{ {
QColor aQColor; QColor aQColor;
Quantity_Color aColor; Quantity_Color aColor;
#if OCC_VERSION_MAJOR < 7
if( FindColor( aVariant.toDouble(), theFieldStepRangeMin, theFieldStepRangeMax, anIsBoolean ? 2 : aNbIntervals, aColor ) )
#else
if( AIS_ColorScale::FindColor( aVariant.toDouble(), theFieldStepRangeMin, theFieldStepRangeMax, anIsBoolean ? 2 : aNbIntervals, aColor ) ) if( AIS_ColorScale::FindColor( aVariant.toDouble(), theFieldStepRangeMin, theFieldStepRangeMax, anIsBoolean ? 2 : aNbIntervals, aColor ) )
#endif
aQColor = QColor::fromRgbF( aColor.Red(), aColor.Green(), aColor.Blue() ); aQColor = QColor::fromRgbF( aColor.Red(), aColor.Green(), aColor.Blue() );
aResultList << aQColor; aResultList << aQColor;
} }
@ -2977,205 +2962,91 @@ QList<QVariant> GEOM_Displayer::groupFieldData( const QList<QVariant>& theFieldS
return aResultList; return aResultList;
} }
#if OCC_VERSION_MAJOR < 7 void GEOM_Displayer::UpdateColorScale()
// Note: the method is copied from Aspect_ColorScale class
Standard_Integer GEOM_Displayer::HueFromValue( const Standard_Integer aValue,
const Standard_Integer aMin,
const Standard_Integer aMax )
{ {
Standard_Integer minLimit( 0 ), maxLimit( 230 ); if ( !myUpdateColorScale )
return;
Standard_Integer aHue = maxLimit; SUIT_Session* session = SUIT_Session::session();
if ( aMin != aMax ) SUIT_Application* app = session->activeApplication();
aHue = (Standard_Integer)( maxLimit - ( maxLimit - minLimit ) * ( aValue - aMin ) / ( aMax - aMin ) ); if ( !app ) return;
aHue = Min( Max( minLimit, aHue ), maxLimit ); Handle(SALOME_InteractiveObject) io = myApp->selectionMgr()->soleSelectedObject();
return aHue; QList<SUIT_ViewWindow*> windows = app->desktop()->windows();
} foreach( SUIT_ViewWindow* window, windows )
// Note: the method is copied from Aspect_ColorScale class
Standard_Boolean GEOM_Displayer::FindColor( const Standard_Real aValue,
const Standard_Real aMin,
const Standard_Real aMax,
const Standard_Integer ColorsCount,
Quantity_Color& aColor )
{
if( aValue<aMin || aValue>aMax || aMax<aMin )
return Standard_False;
else
{ {
Standard_Real IntervNumber = 0; OCCViewer_ViewWindow* occWindow = dynamic_cast<OCCViewer_ViewWindow*>( window );
if( aValue<aMin ) if ( !occWindow ) continue;
IntervNumber = 0; if ( !occWindow->getViewManager() ) continue;
else if( aValue>aMax ) if ( !window->getViewManager() ) continue;
IntervNumber = ColorsCount-1; if ( !window->getViewManager()->getViewModel() ) continue;
else if( Abs( aMax-aMin ) > Precision::Approximation() ) SOCC_Viewer* view = dynamic_cast<SOCC_Viewer*>( window->getViewManager()->getViewModel() );
IntervNumber = Floor( Standard_Real( ColorsCount ) * ( aValue - aMin ) / ( aMax - aMin ) ); // 'Ceiling' replaced with 'Floor' if ( !view ) continue;
Handle(V3d_Viewer) viewer = view->getViewer3d();
Standard_Integer Interv = Standard_Integer( IntervNumber ); if ( !io.IsNull() && view->isVisible( io ) )
aColor = Quantity_Color( HueFromValue( Interv, 0, ColorsCount - 1 ), 1.0, 1.0, Quantity_TOC_HLS );
return Standard_True;
}
}
#endif
void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, const bool updateViewer )
{
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
if( !aStudy )
return;
SOCC_Viewer* aViewModel = dynamic_cast<SOCC_Viewer*>( GetActiveView() );
if( !aViewModel )
return;
Handle(V3d_Viewer) aViewer = aViewModel->getViewer3d();
if( aViewer.IsNull() )
return;
aViewer->InitActiveViews();
if( !aViewer->MoreActiveViews() )
return;
Handle(V3d_View) aView = aViewer->ActiveView();
if( aView.IsNull() )
return;
Standard_Boolean anIsDisplayColorScale = Standard_False;
TCollection_AsciiString aColorScaleTitle;
Standard_Real aColorScaleMin = 0, aColorScaleMax = 0;
Standard_Boolean anIsBoolean = Standard_False;
Handle(SALOME_InteractiveObject) anIO;
if ( myUpdateColorScale )
anIO = myApp->selectionMgr()->soleSelectedObject();
if( !anIO.IsNull() )
{
SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>( aViewModel->CreatePrs( anIO->getEntry() ) );
if( aPrs )
{ {
AIS_ListOfInteractive aList; bool visible = false;
aPrs->GetObjects( aList ); SOCC_Prs* prs = dynamic_cast<SOCC_Prs*>( view->CreatePrs( io->getEntry() ) );
AIS_ListIteratorOfListOfInteractive anIter( aList ); if ( prs )
for( ; anIter.More(); anIter.Next() )
{ {
Handle(GEOM_AISShape) aShape = Handle(GEOM_AISShape)::DownCast( anIter.Value() ); AIS_ListOfInteractive presentations;
if( !aShape.IsNull() ) prs->GetObjects( presentations );
AIS_ListIteratorOfListOfInteractive iter( presentations );
for ( ; iter.More(); iter.Next() )
{ {
GEOM::field_data_type aFieldDataType; Handle(GEOM_AISShape) shape = Handle(GEOM_AISShape)::DownCast( iter.Value() );
int aFieldDimension; if ( shape.IsNull() ) continue;
QList<QVariant> aFieldStepData; GEOM::field_data_type fieldDataType;
TCollection_AsciiString aFieldStepName; int fieldDimension;
double aFieldStepRangeMin, aFieldStepRangeMax; QList<QVariant> fieldStepData;
aShape->getFieldStepInfo( aFieldDataType, TCollection_AsciiString fieldStepName;
aFieldDimension, Standard_Real fieldStepRangeMin, fieldStepRangeMax;
aFieldStepData, shape->getFieldStepInfo( fieldDataType, fieldDimension, fieldStepData,
aFieldStepName, fieldStepName, fieldStepRangeMin, fieldStepRangeMax );
aFieldStepRangeMin, visible = !fieldStepData.isEmpty() && fieldDataType != GEOM::FDT_String;
aFieldStepRangeMax ); if ( visible )
if( !aFieldStepData.isEmpty() && aFieldDataType != GEOM::FDT_String )
{ {
anIsDisplayColorScale = Standard_True; SUIT_Session* session = SUIT_Session::session();
aColorScaleTitle = aFieldStepName; SUIT_ResourceMgr* resMgr = session->resourceMgr();
aColorScaleMin = aFieldStepRangeMin;
aColorScaleMax = aFieldStepRangeMax; Standard_Real xPos = resMgr->doubleValue( "Geometry", "scalar_bar_x_position", 0.05 );
anIsBoolean = aFieldDataType == GEOM::FDT_Bool; Standard_Real yPos = resMgr->doubleValue( "Geometry", "scalar_bar_y_position", 0.1 );
} Standard_Real width = resMgr->doubleValue( "Geometry", "scalar_bar_width", 0.2 );
Standard_Real height = resMgr->doubleValue( "Geometry", "scalar_bar_height", 0.5 );
Standard_Integer textHeight = resMgr->integerValue( "Geometry", "scalar_bar_text_height", 14 );
Standard_Integer nbIntervals = resMgr->integerValue( "Geometry", "scalar_bar_nb_intervals", 20 );
Standard_Integer viewWidth = 0, viewHeight = 0;
occWindow->getView(0)->getViewPort()->getView()->Window()->Size( viewWidth, viewHeight );
Handle(AIS_ColorScale) colorScale = view->getColorScale();
colorScale->SetPosition( viewWidth * xPos, viewHeight * yPos );
colorScale->SetBreadth( viewWidth * width );
colorScale->SetHeight( viewHeight * height );
colorScale->SetRange( fieldStepRangeMin, fieldStepRangeMax );
colorScale->SetNumberOfIntervals( fieldDataType == GEOM::FDT_Bool ? 2 : nbIntervals );
colorScale->SetTextHeight( textHeight );
colorScale->SetTitle( fieldStepName );
} // if ( visible )
} }
} }
} view->setColorScaleShown( visible );
} } // if ( view->isVisible( io ) )
else
if( anIsDisplayColorScale )
{
SUIT_Session* session = SUIT_Session::session();
SUIT_ResourceMgr* resMgr = session->resourceMgr();
Standard_Real anXPos = resMgr->doubleValue( "Geometry", "scalar_bar_x_position", 0.05 );
Standard_Real anYPos = resMgr->doubleValue( "Geometry", "scalar_bar_y_position", 0.1 );
Standard_Real aWidth = resMgr->doubleValue( "Geometry", "scalar_bar_width", 0.2 );
Standard_Real aHeight = resMgr->doubleValue( "Geometry", "scalar_bar_height", 0.5 );
Standard_Integer aTextHeight = resMgr->integerValue( "Geometry", "scalar_bar_text_height", 14 );
Standard_Integer aNbIntervals = resMgr->integerValue( "Geometry", "scalar_bar_nb_intervals", 20 );
#if OCC_VERSION_MAJOR < 7
Handle(Aspect_ColorScale) myColorScale = aView->ColorScale();
if( !myColorScale.IsNull() )
{ {
myColorScale->SetXPosition( anXPos ); view->setColorScaleShown( false );
myColorScale->SetYPosition( anYPos );
myColorScale->SetWidth( aWidth );
myColorScale->SetHeight( aHeight );
#else
Standard_Integer aWinWidth = 0, aWinHeight = 0;
aView->Window()->Size (aWinWidth, aWinHeight);
myColorScale->SetPosition (aWinWidth*anXPos, aWinHeight*anYPos);
//myColorScale->SetBreadth (aWinWidth); // ???
myColorScale->SetBreadth (aWinWidth*aWidth); // ???
myColorScale->SetHeight (aWinHeight*aHeight);
#endif
myColorScale->SetRange( aColorScaleMin, aColorScaleMax );
myColorScale->SetNumberOfIntervals( anIsBoolean ? 2 : aNbIntervals );
myColorScale->SetTextHeight( aTextHeight );
myColorScale->SetTitle( aColorScaleTitle );
#if OCC_VERSION_MAJOR < 7
} }
if( !aView->ColorScaleIsDisplayed() ) } // foreach( SUIT_ViewWindow* window, windows )
aView->ColorScaleDisplay();
}
else
if( aView->ColorScaleIsDisplayed() )
aView->ColorScaleErase();
#else
if( !aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
aViewModel->getAISContext()->Display( myColorScale, Standard_True);
}
else
if( aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
aViewModel->getAISContext()->Erase( myColorScale, Standard_True );
#endif
if( theIsRedisplayFieldSteps )
{
_PTR(Study) aStudyDS = aStudy->studyDS();
QList<SUIT_ViewManager*> vmList;
myApp->viewManagers( vmList );
for( QList<SUIT_ViewManager*>::Iterator vmIt = vmList.begin(); vmIt != vmList.end(); vmIt++ )
{
if( SUIT_ViewManager* aViewManager = *vmIt )
{
const ObjMap& anObjects = aStudy->getObjectProperties( aViewManager->getGlobalId() );
for( ObjMap::ConstIterator objIt = anObjects.begin(); objIt != anObjects.end(); objIt++ )
{
_PTR(SObject) aSObj( aStudyDS->FindObjectID( objIt.key().toLatin1().constData() ) );
if( aSObj )
{
CORBA::Object_var anObject = GeometryGUI::ClientSObjectToObject( aSObj );
if( !CORBA::is_nil( anObject ) )
{
GEOM::GEOM_FieldStep_var aFieldStep = GEOM::GEOM_FieldStep::_narrow( anObject );
if( !aFieldStep->_is_nil() )
{
CORBA::String_var aStepEntry = aFieldStep->GetStudyEntry();
Handle(SALOME_InteractiveObject) aStepIO =
new SALOME_InteractiveObject( aStepEntry.in(), "GEOM", "TEMP_IO" );
Redisplay( aStepIO, false, false );
}
}
}
}
}
}
}
if(updateViewer)
UpdateViewer();
} }
bool GEOM_Displayer::SetUpdateColorScale( bool toUpdate ) // IPAL54049
{
bool previous = myUpdateColorScale;
myUpdateColorScale = toUpdate;
if ( myUpdateColorScale && !previous )
UpdateColorScale();
return previous;
}

View File

@ -45,12 +45,8 @@ class SALOME_OCCViewType;
#include <LightApp_Displayer.h> #include <LightApp_Displayer.h>
#include <LightApp_Study.h> #include <LightApp_Study.h>
#include <Aspect_TypeOfMarker.hxx> #include <Aspect_TypeOfMarker.hxx>
#if OCC_VERSION_MAJOR >= 7
#include <AIS_ColorScale.hxx>
#endif
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <TColStd_MapOfInteger.hxx> #include <TColStd_MapOfInteger.hxx>
#include <Basics_OCCTVersion.hxx>
#include <QList> #include <QList>
#include <list> #include <list>
@ -229,8 +225,8 @@ public:
SALOME_View* = 0); SALOME_View* = 0);
/* Update visibility and parameters of the currently selected field step's color scale */ /* Update visibility and parameters of the currently selected field step's color scale */
void UpdateColorScale( const bool theIsRedisplayFieldSteps = false, const bool updateViewer = true ); void UpdateColorScale();
void SetUpdateColorScale(bool toUpdate) { myUpdateColorScale = toUpdate; } // IPAL54049 bool SetUpdateColorScale(bool);
protected: protected:
/* internal methods */ /* internal methods */
@ -277,20 +273,6 @@ protected:
double& theFieldStepRangeMin, double& theFieldStepRangeMin,
double& theFieldStepRangeMax ); double& theFieldStepRangeMax );
#if OCC_VERSION_MAJOR < 7
// Note: the method is copied from Aspect_ColorScale class
static Standard_Integer HueFromValue( const Standard_Integer aValue,
const Standard_Integer aMin,
const Standard_Integer aMax );
// Note: the method is copied from Aspect_ColorScale class
static Standard_Boolean FindColor( const Standard_Real aValue,
const Standard_Real aMin,
const Standard_Real aMax,
const Standard_Integer ColorsCount,
Quantity_Color& aColor );
#endif
protected: protected:
Handle(SALOME_InteractiveObject) myIO; Handle(SALOME_InteractiveObject) myIO;
TopoDS_Shape myShape; TopoDS_Shape myShape;
@ -304,10 +286,7 @@ protected:
std::string myTexture; std::string myTexture;
int myType; int myType;
SALOME_View* myViewFrame; SALOME_View* myViewFrame;
#if OCC_VERSION_MAJOR >= 7 bool myUpdateColorScale; // IPAL54049
Handle(AIS_ColorScale) myColorScale;
#endif
int myUpdateColorScale; // IPAL54049
// Attributes // Attributes
Quantity_Color myShadingColor; Quantity_Color myShadingColor;

View File

@ -473,7 +473,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>GEOM_COMPSOLIDS</source> <source>GEOM_COMPSOLIDS</source>
<translation type="unfinished">CompSolids</translation> <translation>CompSolides</translation>
</message> </message>
<message> <message>
<source>GEOM_COMPOUND_TITLE</source> <source>GEOM_COMPOUND_TITLE</source>
@ -575,6 +575,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>GEOM_DIMENSIONS</source> <source>GEOM_DIMENSIONS</source>
<translation>Dimensions</translation> <translation>Dimensions</translation>
</message> </message>
<message>
<source>GEOM_ANNOTATIONS</source>
<translation>Annotations</translation>
</message>
<message> <message>
<source>GEOM_SKETCHER_DIST</source> <source>GEOM_SKETCHER_DIST</source>
<translation>Distance</translation> <translation>Distance</translation>
@ -613,7 +617,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>GEOM_EDGES</source> <source>GEOM_EDGES</source>
<translation type="unfinished">Edges</translation> <translation>Arêtes</translation>
</message> </message>
<message> <message>
<source>GEOM_EDGE_TITLE</source> <source>GEOM_EDGE_TITLE</source>
@ -2026,7 +2030,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>GEOM_SOLIDS</source> <source>GEOM_SOLIDS</source>
<translation type="unfinished">Solids</translation> <translation>Solides</translation>
</message> </message>
<message> <message>
<source>GEOM_SOLID_TITLE</source> <source>GEOM_SOLID_TITLE</source>
@ -3494,47 +3498,47 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS</source> <source>PREF_SHAPE_ANNOTATIONS</source>
<translation type="unfinished">Shape annotations</translation> <translation>Annotations</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_FONT</source> <source>PREF_SHAPE_ANNOTATIONS_FONT</source>
<translation type="unfinished">Font</translation> <translation>Fonte</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_FONT_COLOR</source> <source>PREF_SHAPE_ANNOTATIONS_FONT_COLOR</source>
<translation type="unfinished">Font color</translation> <translation>Couleur du texte</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_COLOR</source> <source>PREF_SHAPE_ANNOTATIONS_LINE_COLOR</source>
<translation type="unfinished">Line color</translation> <translation>Couleur de la ligne</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_WIDTH</source> <source>PREF_SHAPE_ANNOTATIONS_LINE_WIDTH</source>
<translation type="unfinished">Line width</translation> <translation>Epaisseur de la ligne</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_STYLE</source> <source>PREF_SHAPE_ANNOTATIONS_LINE_STYLE</source>
<translation type="unfinished">Line style</translation> <translation>Style de la ligne</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_AUTOHIDE</source> <source>PREF_SHAPE_ANNOTATIONS_AUTOHIDE</source>
<translation type="unfinished">Hide when attachment is invisible</translation> <translation>Cacher quand l'objet attaché est invisible</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_SOLID</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_SOLID</source>
<translation type="unfinished">Solid</translation> <translation>Continu</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DASH</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DASH</source>
<translation type="unfinished">Dashed</translation> <translation>Tirets</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOT</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOT</source>
<translation type="unfinished">Dotted</translation> <translation>Points</translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOTDASH</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOTDASH</source>
<translation type="unfinished">Mixed</translation> <translation>Mélangé</translation>
</message> </message>
<message> <message>
<source>PREF_HIDE_INPUT_OBJECT</source> <source>PREF_HIDE_INPUT_OBJECT</source>
@ -4992,6 +4996,42 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>STB_MANAGE_DIMENSIONS</source> <source>STB_MANAGE_DIMENSIONS</source>
<translation>Gérer la cotation d&apos;un objet</translation> <translation>Gérer la cotation d&apos;un objet</translation>
</message> </message>
<message>
<source>TOP_ANNOTATION</source>
<translation>Annotation</translation>
</message>
<message>
<source>MEN_ANNOTATION</source>
<translation>Annotation</translation>
</message>
<message>
<source>STB_ANNOTATION</source>
<translation>Annotation</translation>
</message>
<message>
<source>TOP_EDIT_ANNOTATION</source>
<translation>Editer une annotation</translation>
</message>
<message>
<source>MEN_EDIT_ANNOTATION</source>
<translation>Editer</translation>
</message>
<message>
<source>STB_EDIT_ANNOTATION</source>
<translation>Editer une annotation</translation>
</message>
<message>
<source>TOP_DELETE_ANNOTATION</source>
<translation>Supprimer l'annotation</translation>
</message>
<message>
<source>MEN_DELETE_ANNOTATION</source>
<translation>Supprimer</translation>
</message>
<message>
<source>STB_DELETE_ANNOTATION</source>
<translation>Supprimer l'annotation</translation>
</message>
<message> <message>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source> <source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation>Montrer l&apos;arbre des dépendances</translation> <translation>Montrer l&apos;arbre des dépendances</translation>
@ -5034,27 +5074,27 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>MEN_POP_SHOW_ALL_ANNOTATIONS</source> <source>MEN_POP_SHOW_ALL_ANNOTATIONS</source>
<translation type="unfinished">Show all annotations</translation> <translation>Montrer toutes les annotations</translation>
</message> </message>
<message> <message>
<source>STB_POP_SHOW_ALL_ANNOTATIONS</source> <source>STB_POP_SHOW_ALL_ANNOTATIONS</source>
<translation type="unfinished">Show all shape annotations for the object</translation> <translation>Montrer toutes les annotations pour l'objet</translation>
</message> </message>
<message> <message>
<source>TOP_POP_SHOW_ALL_ANNOTATIONS</source> <source>TOP_POP_SHOW_ALL_ANNOTATIONS</source>
<translation type="unfinished">Show all shape annotations for the object</translation> <translation>Montrer toutes les annotations pour l'objet</translation>
</message> </message>
<message> <message>
<source>MEN_POP_HIDE_ALL_ANNOTATIONS</source> <source>MEN_POP_HIDE_ALL_ANNOTATIONS</source>
<translation type="unfinished">Hide all annotations</translation> <translation>Cacher toutes les annotations</translation>
</message> </message>
<message> <message>
<source>STB_POP_HIDE_ALL_ANNOTATIONS</source> <source>STB_POP_HIDE_ALL_ANNOTATIONS</source>
<translation type="unfinished">Hide all shape annotations for the object</translation> <translation>Cacher toutes les annotations pour l'objet</translation>
</message> </message>
<message> <message>
<source>TOP_POP_HIDE_ALL_ANNOTATIONS</source> <source>TOP_POP_HIDE_ALL_ANNOTATIONS</source>
<translation type="unfinished">Hide all shape annotations for the object</translation> <translation>Cacher toutes les annotations pour l'objet</translation>
</message> </message>
<message> <message>
<source>TOP_POP_AUTO_COLOR</source> <source>TOP_POP_AUTO_COLOR</source>
@ -5298,19 +5338,19 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>TOP_EXTRACTION</source> <source>TOP_EXTRACTION</source>
<translation type="unfinished">Extract and Rebuild</translation> <translation>Extrait et reconstruit</translation>
</message> </message>
<message> <message>
<source>MEN_EXTRACTION</source> <source>MEN_EXTRACTION</source>
<translation type="unfinished">Extract and Rebuild</translation> <translation>Extrait et reconstruit</translation>
</message> </message>
<message> <message>
<source>STB_EXTRACTION</source> <source>STB_EXTRACTION</source>
<translation type="unfinished">Extract and Rebuild</translation> <translation>Extrait et reconstruit</translation>
</message> </message>
<message> <message>
<source>TOP_EXTENSION</source> <source>TOP_EXTENSION</source>
<translation>Extend Edge or Face</translation> <translation>Etend l'arête ou la face</translation>
</message> </message>
<message> <message>
<source>MEN_EXTENSION</source> <source>MEN_EXTENSION</source>
@ -5318,7 +5358,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
</message> </message>
<message> <message>
<source>STB_EXTENSION</source> <source>STB_EXTENSION</source>
<translation>Extend Edge or Face</translation> <translation>Etend l'arête ou la face</translation>
</message> </message>
<message> <message>
<source>GEOM_PUBLISH_RESULT_GRP</source> <source>GEOM_PUBLISH_RESULT_GRP</source>
@ -6735,6 +6775,61 @@ Voulez-vous continuer?</translation>
Please specify suitable arguments.</translation> Please specify suitable arguments.</translation>
</message> </message>
</context> </context>
<context>
<name>MeasureGUI_AnnotationDlg</name>
<message>
<source>CREATE_ANNOTATION_TITLE</source>
<translation>Créer une annotation</translation>
</message>
<message>
<source>EDIT_ANNOTATION_TITLE</source>
<translation>Editer une annotation</translation>
</message>
<message>
<source>ANNOTATION_PREFIX</source>
<translation>Annotation</translation>
</message>
<message>
<source>ANNOTATION_NAME</source>
<translation>Nom de l'annotation</translation>
</message>
<message>
<source>ANNOTATION_PROPERTIES</source>
<translation>Propriétés</translation>
</message>
<message>
<source>ANNOTATION_TEXT</source>
<translation>Texte</translation>
</message>
<message>
<source>ANNOTATION_SHAPE</source>
<translation>Pièce</translation>
</message>
<message>
<source>ANNOTATION_TYPE</source>
<translation>Type</translation>
</message>
<message>
<source>ANNOTATION_SUB_SHAPE</source>
<translation>Type du sous-objet</translation>
</message>
<message>
<source>ANNOTATION_IS_SCREEN_FIXED</source>
<translation>Position fixe sur l'écran</translation>
</message>
<message>
<source>WHOLE_SHAPE</source>
<translation>Toute la pièce</translation>
</message>
<message>
<source>ANNOTATION_STYLE</source>
<translation>Style</translation>
</message>
<message>
<source>ANNOTATION_FONT</source>
<translation>Fonte</translation>
</message>
</context>
<context> <context>
<name>MeasureGUI_CheckShapeDlg</name> <name>MeasureGUI_CheckShapeDlg</name>
<message> <message>
@ -7713,51 +7808,51 @@ Voulez-vous en créer un nouveau ?</translation>
<name>OperationGUI_ExtractionDlg</name> <name>OperationGUI_ExtractionDlg</name>
<message> <message>
<source>GEOM_EXTRACT_TITLE</source> <source>GEOM_EXTRACT_TITLE</source>
<translation type="unfinished">Extract and Rebuild</translation> <translation>Extrait et reconstruit</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_TYPE</source> <source>GEOM_EXTRACT_TYPE</source>
<translation type="unfinished">Extraction type</translation> <translation>Type d'extraction</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_INPUT_PARAMS</source> <source>GEOM_EXTRACT_INPUT_PARAMS</source>
<translation type="unfinished">Input parameters</translation> <translation>Paramètres d'entrée</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_STATISTICS</source> <source>GEOM_EXTRACT_STATISTICS</source>
<translation type="unfinished">Statistics</translation> <translation>Statistiques</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_SUB_SHAPE_TYPE</source> <source>GEOM_EXTRACT_SUB_SHAPE_TYPE</source>
<translation type="unfinished">Sub-shape type</translation> <translation>Type de sous-objet</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_FILTERED_SHAPES</source> <source>GEOM_EXTRACT_FILTERED_SHAPES</source>
<translation type="unfinished">Filtered shapes</translation> <translation>Objets filtrés</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_SHAPES_TO_EXTRACT</source> <source>GEOM_EXTRACT_SHAPES_TO_EXTRACT</source>
<translation type="unfinished">Shapes to extract</translation> <translation>Objets à extraire</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_REBUILD</source> <source>GEOM_EXTRACT_REBUILD</source>
<translation type="unfinished">Rebuild</translation> <translation>Reconstruit</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_REMOVED</source> <source>GEOM_EXTRACT_REMOVED</source>
<translation type="unfinished">Removed</translation> <translation>Supprimé</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_MODIFIED</source> <source>GEOM_EXTRACT_MODIFIED</source>
<translation type="unfinished">Modified</translation> <translation>Modifié</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_ADDED</source> <source>GEOM_EXTRACT_ADDED</source>
<translation type="unfinished">Added</translation> <translation>Ajouté</translation>
</message> </message>
<message> <message>
<source>GEOM_EXTRACT_NAME</source> <source>GEOM_EXTRACT_NAME</source>
<translation type="unfinished">Extraction</translation> <translation>Extraction</translation>
</message> </message>
</context> </context>
</TS> </TS>

129
src/GEOMGUI/GEOM_msg_ja.ts Executable file → Normal file
View File

@ -571,6 +571,10 @@
<source>GEOM_DIMENSIONS</source> <source>GEOM_DIMENSIONS</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>GEOM_ANNOTATIONS</source>
<translation></translation>
</message>
<message> <message>
<source>GEOM_SKETCHER_DIST</source> <source>GEOM_SKETCHER_DIST</source>
<translation></translation> <translation></translation>
@ -3497,47 +3501,47 @@
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS</source> <source>PREF_SHAPE_ANNOTATIONS</source>
<translation type="unfinished">Shape annotations</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_FONT</source> <source>PREF_SHAPE_ANNOTATIONS_FONT</source>
<translation type="unfinished">Font</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_FONT_COLOR</source> <source>PREF_SHAPE_ANNOTATIONS_FONT_COLOR</source>
<translation type="unfinished">Font color</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_COLOR</source> <source>PREF_SHAPE_ANNOTATIONS_LINE_COLOR</source>
<translation type="unfinished">Line color</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_WIDTH</source> <source>PREF_SHAPE_ANNOTATIONS_LINE_WIDTH</source>
<translation type="unfinished">Line width</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINE_STYLE</source> <source>PREF_SHAPE_ANNOTATIONS_LINE_STYLE</source>
<translation type="unfinished">Line style</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_AUTOHIDE</source> <source>PREF_SHAPE_ANNOTATIONS_AUTOHIDE</source>
<translation type="unfinished">Hide when attachment is invisible</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_SOLID</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_SOLID</source>
<translation type="unfinished">Solid</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DASH</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DASH</source>
<translation type="unfinished">Dashed</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOT</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOT</source>
<translation type="unfinished">Dotted</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOTDASH</source> <source>PREF_SHAPE_ANNOTATIONS_LINESTYLE_DOTDASH</source>
<translation type="unfinished">Mixed</translation> <translation></translation>
</message> </message>
<message> <message>
<source>PREF_HIDE_INPUT_OBJECT</source> <source>PREF_HIDE_INPUT_OBJECT</source>
@ -4995,6 +4999,42 @@
<source>STB_MANAGE_DIMENSIONS</source> <source>STB_MANAGE_DIMENSIONS</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>TOP_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>MEN_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>STB_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>TOP_EDIT_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>MEN_EDIT_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>STB_EDIT_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>TOP_DELETE_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>MEN_DELETE_ANNOTATION</source>
<translation></translation>
</message>
<message>
<source>STB_DELETE_ANNOTATION</source>
<translation></translation>
</message>
<message> <message>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source> <source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation></translation> <translation></translation>
@ -5037,27 +5077,27 @@
</message> </message>
<message> <message>
<source>MEN_POP_SHOW_ALL_ANNOTATIONS</source> <source>MEN_POP_SHOW_ALL_ANNOTATIONS</source>
<translation type="unfinished">Show all annotations</translation> <translation></translation>
</message> </message>
<message> <message>
<source>STB_POP_SHOW_ALL_ANNOTATIONS</source> <source>STB_POP_SHOW_ALL_ANNOTATIONS</source>
<translation type="unfinished">Show all shape annotations for the object</translation> <translation></translation>
</message> </message>
<message> <message>
<source>TOP_POP_SHOW_ALL_ANNOTATIONS</source> <source>TOP_POP_SHOW_ALL_ANNOTATIONS</source>
<translation type="unfinished">Show all shape annotations for the object</translation> <translation></translation>
</message> </message>
<message> <message>
<source>MEN_POP_HIDE_ALL_ANNOTATIONS</source> <source>MEN_POP_HIDE_ALL_ANNOTATIONS</source>
<translation type="unfinished">Hide all annotations</translation> <translation></translation>
</message> </message>
<message> <message>
<source>STB_POP_HIDE_ALL_ANNOTATIONS</source> <source>STB_POP_HIDE_ALL_ANNOTATIONS</source>
<translation type="unfinished">Hide all shape annotations for the object</translation> <translation></translation>
</message> </message>
<message> <message>
<source>TOP_POP_HIDE_ALL_ANNOTATIONS</source> <source>TOP_POP_HIDE_ALL_ANNOTATIONS</source>
<translation type="unfinished">Hide all shape annotations for the object</translation> <translation></translation>
</message> </message>
<message> <message>
<source>TOP_POP_AUTO_COLOR</source> <source>TOP_POP_AUTO_COLOR</source>
@ -6728,6 +6768,61 @@
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context>
<name>MeasureGUI_AnnotationDlg</name>
<message>
<source>CREATE_ANNOTATION_TITLE</source>
<translation></translation>
</message>
<message>
<source>EDIT_ANNOTATION_TITLE</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_PREFIX</source>
<translation>Annotation</translation>
</message>
<message>
<source>ANNOTATION_NAME</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_PROPERTIES</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_TEXT</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_SHAPE</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_TYPE</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_SUB_SHAPE</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_IS_SCREEN_FIXED</source>
<translation></translation>
</message>
<message>
<source>WHOLE_SHAPE</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_STYLE</source>
<translation></translation>
</message>
<message>
<source>ANNOTATION_FONT</source>
<translation></translation>
</message>
</context>
<context> <context>
<name>MeasureGUI_CheckShapeDlg</name> <name>MeasureGUI_CheckShapeDlg</name>
<message> <message>

View File

@ -88,7 +88,6 @@
#include <SALOMEDS_SObject.hxx> #include <SALOMEDS_SObject.hxx>
#include <Basics_OCCTVersion.hxx>
#include <QtxFontEdit.h> #include <QtxFontEdit.h>
// External includes // External includes
@ -231,7 +230,7 @@ GeometryGUI::GeometryGUI() :
myTextTreeWdg = 0; myTextTreeWdg = 0;
myAnnotationMgr = 0; myAnnotationMgr = 0;
connect( Material_ResourceMgr::resourceMgr(), SIGNAL( changed() ), this, SLOT( updateMaterials() ) ); connect( Material_ResourceMgr::resourceMgr(), SIGNAL( changed() ), this, SLOT( updateMaterials() ), Qt::UniqueConnection );
Q_INIT_RESOURCE( GEOMGUI ); Q_INIT_RESOURCE( GEOMGUI );
} }
@ -1864,7 +1863,7 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
// end of GEOM plugins loading // end of GEOM plugins loading
connect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), connect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ), Qt::UniqueConnection );
// Reset actions accelerator keys // Reset actions accelerator keys
action(GEOMOp::OpDelete)->setEnabled( true ); // Delete: Key_Delete action(GEOMOp::OpDelete)->setEnabled( true ); // Delete: Key_Delete
@ -1875,9 +1874,9 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
LightApp_SelectionMgr* sm = getApp()->selectionMgr(); LightApp_SelectionMgr* sm = getApp()->selectionMgr();
connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateCreationInfo() )); connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateCreationInfo() ), Qt::UniqueConnection );
connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( onAutoBringToFront() )); connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( onAutoBringToFront() ), Qt::UniqueConnection );
connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() )); connect( sm, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() ), Qt::UniqueConnection );
if ( !myCreationInfoWdg ) if ( !myCreationInfoWdg )
myCreationInfoWdg = new GEOMGUI_CreationInfoWdg( getApp() ); myCreationInfoWdg = new GEOMGUI_CreationInfoWdg( getApp() );
@ -1914,7 +1913,7 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
QMenu* viewMenu = menuMgr()->findMenu( STD_Application::MenuViewId ); QMenu* viewMenu = menuMgr()->findMenu( STD_Application::MenuViewId );
if ( viewMenu ) if ( viewMenu )
connect( viewMenu, SIGNAL( aboutToShow() ), this, SLOT( onViewAboutToShow() ) ); connect( viewMenu, SIGNAL( aboutToShow() ), this, SLOT( onViewAboutToShow() ), Qt::UniqueConnection );
// 0020836 (Basic vectors and origin) // 0020836 (Basic vectors and origin)
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
@ -1953,7 +1952,7 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study )
LightApp_SelectionMgr* selMrg = getApp()->selectionMgr(); LightApp_SelectionMgr* selMrg = getApp()->selectionMgr();
disconnect( selMrg, SIGNAL( currentSelectionChanged() ), this, SLOT( updateCreationInfo() )); disconnect( selMrg, SIGNAL( currentSelectionChanged() ), this, SLOT( updateCreationInfo() ));
disconnect( selMrg, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() )); //disconnect( selMrg, SIGNAL( currentSelectionChanged() ), this, SLOT( updateFieldColorScale() ));
if ( myCreationInfoWdg ) { if ( myCreationInfoWdg ) {
getApp()->removeDockWindow( myCreationInfoWdg->getWinID() ); getApp()->removeDockWindow( myCreationInfoWdg->getWinID() );
myCreationInfoWdg = 0; myCreationInfoWdg = 0;
@ -2213,8 +2212,7 @@ void GeometryGUI::updateFieldColorScale()
{ {
if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) ) if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
{ {
GEOM_Displayer aDisplayer( aStudy ); GEOM_Displayer( aStudy ).UpdateColorScale();
aDisplayer.UpdateColorScale();
} }
} }
@ -2819,9 +2817,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
param == QString("scalar_bar_nb_intervals")) { param == QString("scalar_bar_nb_intervals")) {
if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) ) if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
{ {
GEOM_Displayer aDisplayer( aStudy ); updateFieldColorScale();
bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
} }
} }
else if ( param == QString("dimensions_color") || else if ( param == QString("dimensions_color") ||

View File

@ -29,8 +29,6 @@
#include "GEOM_GEOMGUI.hxx" #include "GEOM_GEOMGUI.hxx"
#include <Basics_OCCTVersion.hxx>
#include <SalomeApp_Module.h> #include <SalomeApp_Module.h>
#include <GEOM_Client.hxx> #include <GEOM_Client.hxx>

View File

@ -65,7 +65,7 @@ GEOMImpl_3DSketcherDriver::GEOMImpl_3DSketcherDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_3DSketcherDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_3DSketcherDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -319,11 +319,7 @@ Standard_Integer GEOMImpl_3DSketcherDriver::Execute(LOGBOOK& log) const
if (aShape.IsNull()) return 0; if (aShape.IsNull()) return 0;
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -369,4 +365,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver);

View File

@ -32,9 +32,9 @@ class GEOMImpl_3DSketcherDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_3DSketcherDriver(); Standard_EXPORT GEOMImpl_3DSketcherDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_3DSketcherDriver() {}; Standard_EXPORT ~GEOMImpl_3DSketcherDriver() {};
@ -42,7 +42,7 @@ public:
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName, Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -74,7 +74,7 @@ GEOMImpl_ArcDriver::GEOMImpl_ArcDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_ArcDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_ArcDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -157,11 +157,7 @@ Standard_Integer GEOMImpl_ArcDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -207,4 +203,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArcDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArcDriver,GEOM_BaseDriver);

View File

@ -35,16 +35,16 @@ class GEOMImpl_ArcDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_ArcDriver(); Standard_EXPORT GEOMImpl_ArcDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArcDriver() {}; Standard_EXPORT ~GEOMImpl_ArcDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName, Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArcDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArcDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -26,8 +26,6 @@
#include "Archimede_VolumeSection.hxx" #include "Archimede_VolumeSection.hxx"
#include <Basics_OCCTVersion.hxx>
#include <stdio.h> #include <stdio.h>
#include <BRepBuilderAPI_MakeFace.hxx> #include <BRepBuilderAPI_MakeFace.hxx>
@ -69,7 +67,7 @@ GEOMImpl_ArchimedeDriver::GEOMImpl_ArchimedeDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_ArchimedeDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_ArchimedeDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -138,11 +136,7 @@ Standard_Integer GEOMImpl_ArchimedeDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(tirant); aFunction->SetValue(tirant);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -174,4 +168,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ArchimedeDriver,GEOM_BaseDriver);

View File

@ -35,16 +35,16 @@ class GEOMImpl_ArchimedeDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_ArchimedeDriver(); Standard_EXPORT GEOMImpl_ArchimedeDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArchimedeDriver() {}; Standard_EXPORT ~GEOMImpl_ArchimedeDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName, Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArchimedeDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArchimedeDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -28,8 +28,6 @@
#include "utilities.h" #include "utilities.h"
#include <Basics_OCCTVersion.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRep_TFace.hxx> #include <BRep_TFace.hxx>
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
@ -1363,7 +1361,6 @@ TCollection_AsciiString GEOMImpl_Block6Explorer::MakeAnyFace (const TopoDS_Wire&
if (!theResult.IsNull()) { if (!theResult.IsNull()) {
// try to deal with result of BRepBuilderAPI_MakeFace + ShHealOper_ShapeProcess // try to deal with result of BRepBuilderAPI_MakeFace + ShHealOper_ShapeProcess
#if OCC_VERSION_LARGE >= 0x06080000
#ifdef MAKE_FACE_PCURVES_FIX_TOLERANCE #ifdef MAKE_FACE_PCURVES_FIX_TOLERANCE
// check and fix pcurves, if necessary // check and fix pcurves, if necessary
Standard_Real aT, aTolE, aD, aDMax; Standard_Real aT, aTolE, aD, aDMax;
@ -1395,7 +1392,6 @@ TCollection_AsciiString GEOMImpl_Block6Explorer::MakeAnyFace (const TopoDS_Wire&
for (; aDMETolIt.More(); aDMETolIt.Next()) { for (; aDMETolIt.More(); aDMETolIt.Next()) {
sat.LimitTolerance(aDMETolIt.Key(), aDMETolIt.Value()); sat.LimitTolerance(aDMETolIt.Key(), aDMETolIt.Value());
} }
#endif
#endif #endif
} }
else { else {

View File

@ -123,7 +123,7 @@ GEOMImpl_BlockDriver::GEOMImpl_BlockDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_BlockDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_BlockDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -755,11 +755,7 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -1160,4 +1156,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BlockDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BlockDriver,GEOM_BaseDriver);

View File

@ -37,9 +37,9 @@ class GEOMImpl_BlockDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_BlockDriver(); Standard_EXPORT GEOMImpl_BlockDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BlockDriver() {}; Standard_EXPORT ~GEOMImpl_BlockDriver() {};
@ -63,7 +63,7 @@ private:
const Standard_Integer theNbIterV, const Standard_Integer theNbIterV,
TopoDS_Shape& theResult) const; TopoDS_Shape& theResult) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BlockDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_BlockDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -114,7 +114,7 @@ GEOMImpl_BooleanDriver::GEOMImpl_BooleanDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -150,19 +150,11 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList2.Append(aShape2); aList2.Append(aShape2);
aCSI.SetArguments(aList1); aCSI.SetArguments(aList1);
aCSI.Perform(); aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
aCSI.SetArguments(aList2); aCSI.SetArguments(aList2);
aCSI.Perform(); aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
} }
@ -213,11 +205,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList1.Append(aShape); aList1.Append(aShape);
aCSI.SetArguments(aList1); aCSI.SetArguments(aList1);
aCSI.Perform(); aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
} }
} }
@ -241,11 +229,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList2.Append(aShape2); aList2.Append(aShape2);
aCSI.SetArguments(aList2); aCSI.SetArguments(aList2);
aCSI.Perform(); aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
} }
} }
@ -286,11 +270,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList1.Append(aShape); aList1.Append(aShape);
aCSI.SetArguments(aList1); aCSI.SetArguments(aList1);
aCSI.Perform(); aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
} }
} }
@ -320,11 +300,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList2.Append(aTool); aList2.Append(aTool);
aCSI.SetArguments(aList2); aCSI.SetArguments(aList2);
aCSI.Perform(); aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
} }
} }
@ -347,11 +323,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -454,12 +426,10 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
// This allows to avoid adding empty compounds, // This allows to avoid adding empty compounds,
// resulting from COMMON on two non-intersecting shapes. // resulting from COMMON on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) { if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
#if OCC_VERSION_MAJOR >= 7
if ((aValue1.ShapeType() == TopAbs_FACE || aValue1.ShapeType() == TopAbs_SHELL) && if ((aValue1.ShapeType() == TopAbs_FACE || aValue1.ShapeType() == TopAbs_SHELL) &&
(aValue2.ShapeType() == TopAbs_FACE || aValue2.ShapeType() == TopAbs_SHELL)) { (aValue2.ShapeType() == TopAbs_FACE || aValue2.ShapeType() == TopAbs_SHELL)) {
aStepResult = makeCompoundShellFromFaces(aStepResult); aStepResult = makeCompoundShellFromFaces(aStepResult);
} }
#endif
TopoDS_Iterator aCompIter (aStepResult); TopoDS_Iterator aCompIter (aStepResult);
for (; aCompIter.More(); aCompIter.Next()) { for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result // add shape in a result
@ -517,12 +487,10 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
// This allows to avoid adding empty compounds, // This allows to avoid adding empty compounds,
// resulting from CUT of parts // resulting from CUT of parts
if (aCut.ShapeType() == TopAbs_COMPOUND) { if (aCut.ShapeType() == TopAbs_COMPOUND) {
#if OCC_VERSION_MAJOR >= 7
if (itSub1.Value().ShapeType() == TopAbs_FACE || if (itSub1.Value().ShapeType() == TopAbs_FACE ||
itSub1.Value().ShapeType() == TopAbs_SHELL) { itSub1.Value().ShapeType() == TopAbs_SHELL) {
aCut = makeCompoundShellFromFaces(aCut); aCut = makeCompoundShellFromFaces(aCut);
} }
#endif
TopoDS_Iterator aCompIter (aCut); TopoDS_Iterator aCompIter (aCut);
for (; aCompIter.More(); aCompIter.Next()) { for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result // add shape in a result
@ -550,7 +518,6 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
// perform FUSE operation // perform FUSE operation
else if (theType == BOOLEAN_FUSE) { else if (theType == BOOLEAN_FUSE) {
#if OCC_VERSION_MAJOR >= 7
Standard_Boolean isFaces = Standard_False; Standard_Boolean isFaces = Standard_False;
TopTools_ListOfShape listShape1, listShape2; TopTools_ListOfShape listShape1, listShape2;
GEOMUtils::AddSimpleShapes(theShape1, listShape1); GEOMUtils::AddSimpleShapes(theShape1, listShape1);
@ -568,7 +535,6 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
} }
} }
} }
#endif
// Perform // Perform
BRepAlgoAPI_Fuse BO (theShape1, theShape2); BRepAlgoAPI_Fuse BO (theShape1, theShape2);
@ -576,10 +542,8 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
StdFail_NotDone::Raise("Fuse operation can not be performed on the given shapes"); StdFail_NotDone::Raise("Fuse operation can not be performed on the given shapes");
} }
aShape = BO.Shape(); aShape = BO.Shape();
#if OCC_VERSION_MAJOR >= 7
if (isFaces) if (isFaces)
aShape = makeCompoundShellFromFaces(aShape); aShape = makeCompoundShellFromFaces(aShape);
#endif
} }
// perform SECTION operation // perform SECTION operation
@ -739,4 +703,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BooleanDriver,GEOM_BaseDriver);

View File

@ -37,9 +37,9 @@ class GEOMImpl_BooleanDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_BooleanDriver(); Standard_EXPORT GEOMImpl_BooleanDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BooleanDriver() {}; Standard_EXPORT ~GEOMImpl_BooleanDriver() {};
@ -54,7 +54,7 @@ private:
TopoDS_Shape makeCompoundShellFromFaces(const TopoDS_Shape theShape) const; TopoDS_Shape makeCompoundShellFromFaces(const TopoDS_Shape theShape) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BooleanDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_BooleanDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -64,7 +64,7 @@ GEOMImpl_BoxDriver::GEOMImpl_BoxDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_BoxDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_BoxDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -116,11 +116,7 @@ Standard_Integer GEOMImpl_BoxDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -160,4 +156,4 @@ bool GEOMImpl_BoxDriver::GetCreationInformation(std::string& theOper
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BoxDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_BoxDriver,GEOM_BaseDriver);

View File

@ -35,9 +35,9 @@ class GEOMImpl_BoxDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_BoxDriver(); Standard_EXPORT GEOMImpl_BoxDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BoxDriver() {}; Standard_EXPORT ~GEOMImpl_BoxDriver() {};
@ -45,7 +45,7 @@ public:
bool GetCreationInformation(std::string& theOperationNameName, bool GetCreationInformation(std::string& theOperationNameName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BoxDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_BoxDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -95,7 +95,7 @@ static Standard_Boolean isGoodForChamfer (const TopoDS_Shape& theShape)
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_ChamferDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_ChamferDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -267,11 +267,7 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -361,4 +357,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ChamferDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ChamferDriver,GEOM_BaseDriver);

View File

@ -35,9 +35,9 @@ class GEOMImpl_ChamferDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_ChamferDriver(); Standard_EXPORT GEOMImpl_ChamferDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ChamferDriver() {}; Standard_EXPORT ~GEOMImpl_ChamferDriver() {};
@ -45,7 +45,7 @@ public:
bool GetCreationInformation(std::string& theOperationName, bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ChamferDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_ChamferDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -71,7 +71,7 @@ GEOMImpl_CircleDriver::GEOMImpl_CircleDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_CircleDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_CircleDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -187,11 +187,7 @@ Standard_Integer GEOMImpl_CircleDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
return 1; return 1;
} }
@ -237,4 +233,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CircleDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CircleDriver,GEOM_BaseDriver);

View File

@ -35,9 +35,9 @@ class GEOMImpl_CircleDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_CircleDriver(); Standard_EXPORT GEOMImpl_CircleDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CircleDriver() {}; Standard_EXPORT ~GEOMImpl_CircleDriver() {};
@ -46,7 +46,7 @@ public:
bool GetCreationInformation(std::string& theOperationName, bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_CircleDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_CircleDriver,GEOM_BaseDriver)
}; };
#endif #endif

View File

@ -67,7 +67,7 @@ GEOMImpl_ConeDriver::GEOMImpl_ConeDriver()
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_ConeDriver::Execute(LOGBOOK& log) const Standard_Integer GEOMImpl_ConeDriver::Execute(Handle(TFunction_Logbook)& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -137,11 +137,7 @@ Standard_Integer GEOMImpl_ConeDriver::Execute(LOGBOOK& log) const
} }
if (aShape.IsNull()) return 0; if (aShape.IsNull()) return 0;
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label()); log->SetTouched(Label());
#endif
aFunction->SetValue(aShape); aFunction->SetValue(aShape);
return 1; return 1;
@ -185,4 +181,4 @@ GetCreationInformation(std::string& theOperationName,
return true; return true;
} }
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ConeDriver,GEOM_BaseDriver); IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_ConeDriver,GEOM_BaseDriver);

View File

@ -35,9 +35,9 @@ class GEOMImpl_ConeDriver : public GEOM_BaseDriver {
public: public:
Standard_EXPORT GEOMImpl_ConeDriver(); Standard_EXPORT GEOMImpl_ConeDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const; Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {} Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; } Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID(); Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ConeDriver() {}; Standard_EXPORT ~GEOMImpl_ConeDriver() {};
@ -45,7 +45,7 @@ public:
bool GetCreationInformation(std::string& theOperationName, bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params); std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ConeDriver,GEOM_BaseDriver) DEFINE_STANDARD_RTTIEXT(GEOMImpl_ConeDriver,GEOM_BaseDriver)
}; };
#endif #endif

Some files were not shown because too many files have changed in this diff Show More