0023450: Fields are not displayed in GEOM

+ IPAL54211: SALOME-8.3.0: Geometry fields are displayed incorrectly
+ Clean-up deprecated OCCT-related code
This commit is contained in:
asl 2017-06-26 11:49:43 +03:00 committed by vsr
parent 7a3c2d25cc
commit 47e260a974
261 changed files with 1352 additions and 2358 deletions

View File

@ -83,7 +83,7 @@ AdvancedEngine_DividedDiskDriver::AdvancedEngine_DividedDiskDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(LOGBOOK& log) const
Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -138,11 +138,7 @@ Standard_Integer AdvancedEngine_DividedDiskDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -527,4 +523,4 @@ GetCreationInformation(std::string& theOperationName,
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
//
AdvancedEngine_DividedDiskDriver();
virtual Standard_Integer Execute(LOGBOOK& log) const;
virtual void Validate(LOGBOOK&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID();
~AdvancedEngine_DividedDiskDriver() {};
@ -56,7 +56,7 @@ private:
TopoDS_Shell MakeDiskHexagon (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

View File

@ -27,8 +27,6 @@
#include "AdvancedEngine_SmoothingSurfaceDriver.hxx"
#include "AdvancedEngine_ISmoothingSurface.hxx"
#include <Basics_OCCTVersion.hxx>
#include <utilities.h>
#include <OpUtil.hxx>
#include <Utils_ExceptHandlers.hxx>

View File

@ -400,7 +400,7 @@ TopoDS_Shape AdvancedEngine_PipeTShapeDriver::MakeQuarterPipeTShape (const doubl
//function : Execute
//purpose :
//=======================================================================
Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(LOGBOOK& log) const
Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -623,11 +623,7 @@ Standard_Integer AdvancedEngine_PipeTShapeDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -688,4 +684,4 @@ GetCreationInformation(std::string& theOperationName,
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
//
AdvancedEngine_PipeTShapeDriver();
virtual Standard_Integer Execute(LOGBOOK& log) const;
virtual void Validate(LOGBOOK&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID();
~AdvancedEngine_PipeTShapeDriver() {};
@ -47,7 +47,7 @@ public:
std::vector<GEOM_Param>& params);
// Type management
//
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(AdvancedEngine_PipeTShapeDriver,GEOM_BaseDriver)
private:
/*!

View File

@ -164,7 +164,7 @@ TopoDS_Shape AdvancedEngine_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
//function : Execute
//purpose :
//=======================================================================
Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(LOGBOOK& log) const
Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -222,11 +222,7 @@ Standard_Integer AdvancedEngine_SmoothingSurfaceDriver::Execute(LOGBOOK& log) co
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -274,4 +270,4 @@ GetCreationInformation(std::string& theOperationName,
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
//
AdvancedEngine_SmoothingSurfaceDriver();
virtual Standard_Integer Execute(LOGBOOK& log) const;
virtual void Validate(LOGBOOK&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
static const Standard_GUID& GetID();
~AdvancedEngine_SmoothingSurfaceDriver() {};
@ -44,7 +44,7 @@ public:
std::vector<GEOM_Param>& params);
// Type management
//
OCCT_DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(AdvancedEngine_SmoothingSurfaceDriver,GEOM_BaseDriver)
private:
TopoDS_Shape MakeSmoothingSurfaceUnClosed
(const Handle(TColgp_HArray1OfPnt) &theListOfPoints,

View File

@ -54,7 +54,7 @@ BREPPlugin_ExportDriver::BREPPlugin_ExportDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer BREPPlugin_ExportDriver::Execute(LOGBOOK& log) const
Standard_Integer BREPPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
@ -95,4 +95,4 @@ GetCreationInformation( std::string& theOperationName,
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() {};
static const Standard_GUID& GetID();
virtual Standard_Integer Execute(LOGBOOK& log) const;
virtual void Validate(LOGBOOK&) const {}
Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(BREPPlugin_ExportDriver,GEOM_BaseDriver)
};
#endif // _BREPPlugin_ExportDriver_HXX

View File

@ -55,7 +55,7 @@ BREPPlugin_ImportDriver::BREPPlugin_ImportDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer BREPPlugin_ImportDriver::Execute(LOGBOOK& log) const
Standard_Integer BREPPlugin_ImportDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if( Label().IsNull() ) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
@ -76,11 +76,7 @@ Standard_Integer BREPPlugin_ImportDriver::Execute(LOGBOOK& log) const
aFunction->SetValue( aShape );
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -113,4 +109,4 @@ GetCreationInformation( std::string& theOperationName,
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() {};
static const Standard_GUID& GetID();
virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; }
virtual void Validate( LOGBOOK& ) const {}
virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; }
virtual void Validate( Handle(TFunction_Logbook)& ) const {}
virtual bool GetCreationInformation( std::string& theOperationName,
std::vector<GEOM_Param>& params );
OCCT_DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(BREPPlugin_ImportDriver,GEOM_BaseDriver)
};
#endif // _BREPPlugin_ImportDriver_HXX

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,8 +33,6 @@
#include <Standard_Boolean.hxx>
#include <GeomAbs_Shape.hxx>
#include <Basics_OCCTVersion.hxx>
class TopoDS_Vertex;
class TopoDS_Edge;
class TopoDS_Face;
@ -70,7 +68,7 @@ public:
const TopoDS_Face& NewF1, const TopoDS_Face& NewF2);
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:
Standard_Real myTolerance;

View File

@ -26,8 +26,6 @@
#include <BlockFix_UnionFaces.hxx>
#include <Basics_OCCTVersion.hxx>
#include <ShapeAnalysis_WireOrder.hxx>
#include <ShapeAnalysis_Edge.hxx>

View File

@ -23,8 +23,6 @@
#include "CurveCreator_Section.hxx"
#include "CurveCreator_UtilsICurve.hxx"
#include <Basics_OCCTVersion.hxx>
#include <GEOMUtils.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 ) );
for( aSelection->Init(); aSelection->More(); aSelection->Next() )
{
#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = aSelection->Sensitive();
if( aHSenEntity.IsNull() )
continue;
Handle(SelectBasics_SensitiveEntity) aSenEntity = aHSenEntity->BaseSensitive();
#else
Handle(SelectBasics_SensitiveEntity) aSenEntity = aSelection->Sensitive();
#endif
Handle(Select3D_SensitivePoint) aSenPnt = Handle(Select3D_SensitivePoint)::DownCast( aSenEntity );

View File

@ -28,8 +28,6 @@
#include "EntityGUI_3DSketcherDlg.h"
#include "EntityGUI_Widgets.h"
#include <Basics_OCCTVersion.hxx>
#include <GEOMBase.h>
#include <GeometryGUI.h>
#include <Precision.hxx>
@ -105,7 +103,7 @@ DEFINE_STANDARD_HANDLE(AIS_Text, AIS_InteractiveObject)
class AIS_Text:public AIS_InteractiveObject
{
public:
OCCT_DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
DEFINE_STANDARD_RTTIEXT(AIS_Text,AIS_InteractiveObject)
AIS_Text(){};
@ -147,7 +145,7 @@ protected:
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,
Quantity_Color color = Quantity_NOC_YELLOW,

View File

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

View File

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

View File

@ -22,7 +22,7 @@
#include <GEOM_Application.hxx>
OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_Application)
IMPLEMENT_STANDARD_RTTIEXT(GEOM_Application, TDocStd_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
//purpose :

View File

@ -28,21 +28,16 @@
#include <Standard_DefineHandle.hxx>
#include <TColStd_SequenceOfExtendedString.hxx>
#include <Basics_OCCTVersion.hxx>
class GEOM_Application : public TDocStd_Application
{
public:
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();
public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application)
DEFINE_STANDARD_RTTIEXT(GEOM_Application,TDocStd_Application)
};
DEFINE_STANDARD_HANDLE(GEOM_Application, TDocStd_Application)

View File

@ -33,7 +33,7 @@
#include <TDataStd_Name.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_HArray1OfInteger.hxx>
#include <Basics_OCCTVersion.hxx>
#include <string>
#include <vector>
#include <sstream>
#if OCC_VERSION_MAJOR < 7
#define LOGBOOK TFunction_Logbook
#else
#define LOGBOOK Handle(TFunction_Logbook)
#endif
struct GEOM_Param
{
std::string name;
@ -107,7 +99,7 @@ public:
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);

View File

@ -515,4 +515,4 @@ TDF_Label GEOM_BaseObject::GetFreeLabel()
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;
public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
};
#endif

View File

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

View File

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

View File

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

View File

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

View File

@ -27,8 +27,6 @@
#include <GEOM_Solver.hxx>
#include <GEOM_ISubShape.hxx>
#include <Basics_OCCTVersion.hxx>
#include "utilities.h"
#include <TDF.hxx>
@ -980,4 +978,4 @@ void* GEOM_Function::GetCallBackData()
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 <TopoDS_Shape.hxx>
#include <Basics_OCCTVersion.hxx>
class GEOM_Function;
DEFINE_STANDARD_HANDLE (GEOM_Function, Standard_Transient);
@ -197,7 +195,7 @@ public:
//Returns top label of this function's naming tree
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:

View File

@ -296,5 +296,5 @@ GEOM_Object::GetLastFunctions( const std::list< Handle(GEOM_Object) >& theObject
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 );
public:
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
DEFINE_STANDARD_RTTIEXT(GEOM_Object,GEOM_BaseObject)
};
#endif

View File

@ -48,10 +48,8 @@ namespace GEOM
//operator TCollection_AsciiString () const;
#if OCC_VERSION_MAJOR >= 7
template <class T>
Standard_EXPORT TPythonDump& operator<< (const Handle(T)& theObject) { return *this << theObject.get(); }
#endif
Standard_EXPORT TPythonDump& operator<< (bool theArg);
Standard_EXPORT TPythonDump& operator<< (long int theArg);
Standard_EXPORT TPythonDump& operator<< (int theArg);

View File

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

View File

@ -48,7 +48,7 @@ GEOM_SubShapeDriver::GEOM_SubShapeDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOM_SubShapeDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOM_SubShapeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
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;
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -159,4 +155,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOM_SubShapeDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOM_SubShapeDriver() {};
@ -46,7 +46,7 @@ public:
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOM_SubShapeDriver,GEOM_BaseDriver)
};
#endif

View File

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

View File

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

View File

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

View File

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

View File

@ -69,7 +69,7 @@ class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo
Standard_EXPORT
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:
Standard_EXPORT

View File

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

View File

@ -71,7 +71,7 @@ class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf
Standard_EXPORT
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:
TopoDS_Shape myBox;

View File

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

View File

@ -78,7 +78,7 @@ public:
Standard_EXPORT
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:

View File

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

View File

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

View File

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

View File

@ -69,7 +69,7 @@ class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf
Standard_EXPORT
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:
Handle(Geom_Surface) myS;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,11 +26,7 @@
// <pkv@irinox>
//
#include <GEOMAlgo_ShapeAlgo.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
//=======================================================================
//function : GEOMAlgo_ShapeAlgo
@ -54,11 +50,7 @@ GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo()
//function : SetContext
//purpose :
//=======================================================================
#if OCC_VERSION_LARGE > 0x06070100
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
#else
void GEOMAlgo_ShapeAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
#endif
{
myContext=theContext;
}
@ -66,11 +58,7 @@ void GEOMAlgo_ShapeAlgo::SetContext(const Handle(BOPInt_Context)& theContext)
//function : Context
//purpose :
//=======================================================================
#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const
#else
const Handle(BOPInt_Context)& GEOMAlgo_ShapeAlgo::Context()const
#endif
{
return myContext;
}
@ -121,10 +109,6 @@ const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const
void GEOMAlgo_ShapeAlgo::Perform()
{
if (myContext.IsNull()) {
#if OCC_VERSION_LARGE > 0x06070100
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
//
// File: GEOMAlgo_ShapeAlgo.hxx
// Created: Tue Dec 7 12:06:54 2004
// Author: Peter KURNEV
// <pkv@irinox>
//
#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile
#define _GEOMAlgo_ShapeAlgo_HeaderFile
#include <Basics_OCCTVersion.hxx>
#include <Standard.hxx>
#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Real.hxx>
#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
#else
#include <BOPInt_Context.hxx>
#endif
#include <GEOMAlgo_Algo.hxx>
//=======================================================================
@ -51,19 +40,11 @@ class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo
//! Sets cashed geometrical tools <br>
Standard_EXPORT
#if OCC_VERSION_LARGE > 0x06070100
void SetContext(const Handle(IntTools_Context)& theContext) ;
#else
void SetContext(const Handle(BOPInt_Context)& theContext) ;
#endif
//! Returns cashed geometrical tools <br>
Standard_EXPORT
#if OCC_VERSION_LARGE > 0x06070100
const Handle(IntTools_Context)& Context() const;
#else
const Handle(BOPInt_Context)& Context() const;
#endif
Standard_EXPORT
void SetShape(const TopoDS_Shape& aS) ;
@ -90,14 +71,10 @@ protected:
Standard_EXPORT
virtual ~GEOMAlgo_ShapeAlgo();
TopoDS_Shape myShape;
Standard_Real myTolerance;
TopoDS_Shape myResult;
#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) myContext;
#else
Handle(BOPInt_Context) myContext;
#endif
};
#endif

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -27,8 +27,6 @@
#include <Standard_DefineHandle.hxx>
#include <Basics_OCCTVersion.hxx>
class LightApp_SelectionMgr;
class GEOM_OCCFilter : public SelectMgr_Filter
@ -44,7 +42,7 @@ private:
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 "GEOM_Annotation.hxx"
#include <Basics_OCCTVersion.hxx>
#include <LightApp_DataSubOwner.h>
#include <OCCViewer_ViewModel.h>
@ -179,15 +177,11 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
Handle(SelectMgr_Selection) sel = theObj->Selection( m );
for ( sel->Init(); sel->More(); sel->Next() ) {
#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive();
if( aHSenEntity.IsNull() )
continue;
Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
#else
Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
#endif
if ( entity.IsNull() )
continue;

View File

@ -59,8 +59,6 @@
#include <SUIT_ViewManager.h>
#include <SUIT_ResourceMgr.h>
#include <Basics_OCCTVersion.hxx>
#include <SalomeApp_Study.h>
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
@ -90,9 +88,6 @@
#include <AIS_AngleDimension.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <Aspect_PolygonOffsetMode.hxx>
#if OCC_VERSION_MAJOR < 7
#include <Aspect_ColorScale.hxx>
#endif
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <StdSelect_TypeOfEdge.hxx>
@ -113,6 +108,7 @@
#include <TopoDS.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_Map.hxx>
#include <Graphic3d_Texture2Dmanual.hxx>
#include <Prs3d_ShadingAspect.hxx>
@ -242,8 +238,11 @@ namespace
if ( aAISShape.IsNull() )
continue;
#ifdef USE_TEXTURED_SHAPE
const Handle(Image_PixMap)& aPixmap = aAISShape->TexturePixMap();
const Handle(Graphic3d_TextureMap)& aTexture = aAISShape->Attributes()->ShadingAspect()->Aspect()->TextureMap();
if ( aTexture.IsNull() )
continue;
const Handle(Image_PixMap)& aPixmap = aTexture->GetImage();
if ( aPixmap.IsNull() )
continue;
@ -258,7 +257,6 @@ namespace
aPixmapUsersMap.UnBind( aPixmap );
aPixmapCacheMap.remove( aPixmapCacheMap.key( aPixmap ) );
}
#endif
}
}
@ -512,12 +510,10 @@ GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
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;
myFieldDimension = 0;
@ -866,11 +862,12 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
AISShape->SetLabelColor( qColorFromResources( "label_color", QColor( 255, 255, 255 ) ) );
// set display mode
AISShape->SetDisplayMode( HasDisplayMode() ?
int displayMode = HasDisplayMode() ?
// predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function
GetDisplayMode() :
// 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
anAspect = AISShape->Attributes()->FaceBoundaryAspect();
@ -960,7 +957,6 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
aImagePath = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
}
#ifdef USE_TEXTURED_SHAPE
Handle(Image_PixMap) aPixmap;
if ( !aImagePath.isEmpty() )
aPixmap = cacheTextureFor( aImagePath, AISShape );
@ -969,14 +965,12 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// apply image to shape
if ( !aPixmap.IsNull() ) {
AISShape->SetTexturePixMap( aPixmap );
AISShape->SetTextureMapOn();
AISShape->DisableTextureModulate();
AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap( new Graphic3d_Texture2Dmanual( aPixmap ) );
}
else {
AISShape->SetTextureMapOff();
}
#endif
if ( displayMode == GEOM_AISShape::TexturedShape )
AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn();
else
AISShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOff();
// set line width
AISShape->SetWidth( HasWidth() ?
@ -2965,11 +2959,7 @@ QList<QVariant> GEOM_Displayer::groupFieldData( const QList<QVariant>& theFieldS
{
QColor aQColor;
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 ) )
#endif
aQColor = QColor::fromRgbF( aColor.Red(), aColor.Green(), aColor.Blue() );
aResultList << aQColor;
}
@ -2977,52 +2967,6 @@ QList<QVariant> GEOM_Displayer::groupFieldData( const QList<QVariant>& theFieldS
return aResultList;
}
#if OCC_VERSION_MAJOR < 7
// 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 );
Standard_Integer aHue = maxLimit;
if ( aMin != aMax )
aHue = (Standard_Integer)( maxLimit - ( maxLimit - minLimit ) * ( aValue - aMin ) / ( aMax - aMin ) );
aHue = Min( Max( minLimit, aHue ), maxLimit );
return aHue;
}
// 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;
if( aValue<aMin )
IntervNumber = 0;
else if( aValue>aMax )
IntervNumber = ColorsCount-1;
else if( Abs( aMax-aMin ) > Precision::Approximation() )
IntervNumber = Floor( Standard_Real( ColorsCount ) * ( aValue - aMin ) / ( aMax - aMin ) ); // 'Ceiling' replaced with 'Floor'
Standard_Integer Interv = Standard_Integer( IntervNumber );
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() );
@ -3103,15 +3047,6 @@ void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, cons
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 );
myColorScale->SetYPosition( anYPos );
myColorScale->SetWidth( aWidth );
myColorScale->SetHeight( aHeight );
#else
Standard_Integer aWinWidth = 0, aWinHeight = 0;
aView->Window()->Size (aWinWidth, aWinHeight);
@ -3119,7 +3054,6 @@ void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, cons
//myColorScale->SetBreadth (aWinWidth); // ???
myColorScale->SetBreadth (aWinWidth*aWidth); // ???
myColorScale->SetHeight (aWinHeight*aHeight);
#endif
myColorScale->SetRange( aColorScaleMin, aColorScaleMax );
myColorScale->SetNumberOfIntervals( anIsBoolean ? 2 : aNbIntervals );
@ -3127,22 +3061,13 @@ void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, cons
myColorScale->SetTextHeight( aTextHeight );
myColorScale->SetTitle( aColorScaleTitle );
#if OCC_VERSION_MAJOR < 7
}
if( !aView->ColorScaleIsDisplayed() )
aView->ColorScaleDisplay();
}
else
if( aView->ColorScaleIsDisplayed() )
aView->ColorScaleErase();
#else
if( !aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
aViewModel->getAISContext()->Display( myColorScale, Standard_True);
}
else
else {
if( aViewModel->getAISContext()->IsDisplayed( myColorScale ) )
aViewModel->getAISContext()->Erase( myColorScale, Standard_True );
#endif
}
if( theIsRedisplayFieldSteps )
{

View File

@ -45,12 +45,9 @@ class SALOME_OCCViewType;
#include <LightApp_Displayer.h>
#include <LightApp_Study.h>
#include <Aspect_TypeOfMarker.hxx>
#if OCC_VERSION_MAJOR >= 7
#include <AIS_ColorScale.hxx>
#endif
#include <TCollection_AsciiString.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <Basics_OCCTVersion.hxx>
#include <QList>
#include <list>
@ -277,20 +274,6 @@ protected:
double& theFieldStepRangeMin,
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:
Handle(SALOME_InteractiveObject) myIO;
TopoDS_Shape myShape;
@ -304,9 +287,7 @@ protected:
std::string myTexture;
int myType;
SALOME_View* myViewFrame;
#if OCC_VERSION_MAJOR >= 7
Handle(AIS_ColorScale) myColorScale;
#endif
int myUpdateColorScale; // IPAL54049
// Attributes

View File

@ -88,7 +88,6 @@
#include <SALOMEDS_SObject.hxx>
#include <Basics_OCCTVersion.hxx>
#include <QtxFontEdit.h>
// External includes

View File

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

View File

@ -65,7 +65,7 @@ GEOMImpl_3DSketcherDriver::GEOMImpl_3DSketcherDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_3DSketcherDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_3DSketcherDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
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;
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -369,4 +365,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_3DSketcherDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_3DSketcherDriver() {};
@ -42,7 +42,7 @@ public:
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_3DSketcherDriver,GEOM_BaseDriver)
};
#endif

View File

@ -74,7 +74,7 @@ GEOMImpl_ArcDriver::GEOMImpl_ArcDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_ArcDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_ArcDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -157,11 +157,7 @@ Standard_Integer GEOMImpl_ArcDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -207,4 +203,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_ArcDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArcDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArcDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArcDriver,GEOM_BaseDriver)
};
#endif

View File

@ -26,8 +26,6 @@
#include "Archimede_VolumeSection.hxx"
#include <Basics_OCCTVersion.hxx>
#include <stdio.h>
#include <BRepBuilderAPI_MakeFace.hxx>
@ -69,7 +67,7 @@ GEOMImpl_ArchimedeDriver::GEOMImpl_ArchimedeDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_ArchimedeDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_ArchimedeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -138,11 +136,7 @@ Standard_Integer GEOMImpl_ArchimedeDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(tirant);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -174,4 +168,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_ArchimedeDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ArchimedeDriver() {};
Standard_EXPORT virtual bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArchimedeDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_ArchimedeDriver,GEOM_BaseDriver)
};
#endif

View File

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

View File

@ -123,7 +123,7 @@ GEOMImpl_BlockDriver::GEOMImpl_BlockDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_BlockDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_BlockDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -755,11 +755,7 @@ Standard_Integer GEOMImpl_BlockDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -1160,4 +1156,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_BlockDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BlockDriver() {};
@ -63,7 +63,7 @@ private:
const Standard_Integer theNbIterV,
TopoDS_Shape& theResult) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BlockDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_BlockDriver,GEOM_BaseDriver)
};
#endif

View File

@ -114,7 +114,7 @@ GEOMImpl_BooleanDriver::GEOMImpl_BooleanDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -150,19 +150,11 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList2.Append(aShape2);
aCSI.SetArguments(aList1);
aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
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");
aCSI.SetArguments(aList2);
aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
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");
}
@ -213,11 +205,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
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");
}
}
@ -241,11 +229,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList2.Append(aShape2);
aCSI.SetArguments(aList2);
aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
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");
}
}
@ -286,11 +270,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
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");
}
}
@ -320,11 +300,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aList2.Append(aTool);
aCSI.SetArguments(aList2);
aCSI.Perform();
#if OCC_VERSION_LARGE > 0x07010001
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");
}
}
@ -347,11 +323,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -454,12 +426,10 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
// This allows to avoid adding empty compounds,
// resulting from COMMON on two non-intersecting shapes.
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
#if OCC_VERSION_MAJOR >= 7
if ((aValue1.ShapeType() == TopAbs_FACE || aValue1.ShapeType() == TopAbs_SHELL) &&
(aValue2.ShapeType() == TopAbs_FACE || aValue2.ShapeType() == TopAbs_SHELL)) {
aStepResult = makeCompoundShellFromFaces(aStepResult);
}
#endif
TopoDS_Iterator aCompIter (aStepResult);
for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result
@ -517,12 +487,10 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
// This allows to avoid adding empty compounds,
// resulting from CUT of parts
if (aCut.ShapeType() == TopAbs_COMPOUND) {
#if OCC_VERSION_MAJOR >= 7
if (itSub1.Value().ShapeType() == TopAbs_FACE ||
itSub1.Value().ShapeType() == TopAbs_SHELL) {
aCut = makeCompoundShellFromFaces(aCut);
}
#endif
TopoDS_Iterator aCompIter (aCut);
for (; aCompIter.More(); aCompIter.Next()) {
// add shape in a result
@ -550,7 +518,6 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
// perform FUSE operation
else if (theType == BOOLEAN_FUSE) {
#if OCC_VERSION_MAJOR >= 7
Standard_Boolean isFaces = Standard_False;
TopTools_ListOfShape listShape1, listShape2;
GEOMUtils::AddSimpleShapes(theShape1, listShape1);
@ -568,7 +535,6 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
}
}
}
#endif
// Perform
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");
}
aShape = BO.Shape();
#if OCC_VERSION_MAJOR >= 7
if (isFaces)
aShape = makeCompoundShellFromFaces(aShape);
#endif
}
// perform SECTION operation
@ -739,4 +703,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_BooleanDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BooleanDriver() {};
@ -54,7 +54,7 @@ private:
TopoDS_Shape makeCompoundShellFromFaces(const TopoDS_Shape theShape) const;
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BooleanDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_BooleanDriver,GEOM_BaseDriver)
};
#endif

View File

@ -64,7 +64,7 @@ GEOMImpl_BoxDriver::GEOMImpl_BoxDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_BoxDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_BoxDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -116,11 +116,7 @@ Standard_Integer GEOMImpl_BoxDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -160,4 +156,4 @@ bool GEOMImpl_BoxDriver::GetCreationInformation(std::string& theOper
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:
Standard_EXPORT GEOMImpl_BoxDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_BoxDriver() {};
@ -45,7 +45,7 @@ public:
bool GetCreationInformation(std::string& theOperationNameName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_BoxDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_BoxDriver,GEOM_BaseDriver)
};
#endif

View File

@ -95,7 +95,7 @@ static Standard_Boolean isGoodForChamfer (const TopoDS_Shape& theShape)
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_ChamferDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_ChamferDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -267,11 +267,7 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -361,4 +357,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_ChamferDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ChamferDriver() {};
@ -45,7 +45,7 @@ public:
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ChamferDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_ChamferDriver,GEOM_BaseDriver)
};
#endif

View File

@ -71,7 +71,7 @@ GEOMImpl_CircleDriver::GEOMImpl_CircleDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_CircleDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_CircleDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -187,11 +187,7 @@ Standard_Integer GEOMImpl_CircleDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aShape);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -237,4 +233,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_CircleDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CircleDriver() {};
@ -46,7 +46,7 @@ public:
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_CircleDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_CircleDriver,GEOM_BaseDriver)
};
#endif

View File

@ -67,7 +67,7 @@ GEOMImpl_ConeDriver::GEOMImpl_ConeDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_ConeDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_ConeDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
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 OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
aFunction->SetValue(aShape);
return 1;
@ -185,4 +181,4 @@ GetCreationInformation(std::string& theOperationName,
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:
Standard_EXPORT GEOMImpl_ConeDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_ConeDriver() {};
@ -45,7 +45,7 @@ public:
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_ConeDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_ConeDriver,GEOM_BaseDriver)
};
#endif

View File

@ -66,7 +66,7 @@ GEOMImpl_CopyDriver::GEOMImpl_CopyDriver()
//function : Execute
//purpose :
//=======================================================================
Standard_Integer GEOMImpl_CopyDriver::Execute(LOGBOOK& log) const
Standard_Integer GEOMImpl_CopyDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -98,11 +98,7 @@ Standard_Integer GEOMImpl_CopyDriver::Execute(LOGBOOK& log) const
aFunction->SetValue(aCopy);
#if OCC_VERSION_MAJOR < 7
log.SetTouched(Label());
#else
log->SetTouched(Label());
#endif
return 1;
}
@ -150,7 +146,7 @@ GetCreationInformation(std::string& theOperationName,
* \brief Performs Transfer Data operation.
*/
//================================================================================
Standard_Integer GEOMImpl_CopyDriver::transferData(LOGBOOK& log) const
Standard_Integer GEOMImpl_CopyDriver::transferData(Handle(TFunction_Logbook)& log) const
{
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
GEOMImpl_ITransferData aTD (aFunction);
@ -414,4 +410,4 @@ Standard_Boolean GEOMImpl_CopyDriver::getInPlaceByHistory
return Standard_True;
}
OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CopyDriver,GEOM_BaseDriver);
IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CopyDriver,GEOM_BaseDriver);

View File

@ -41,9 +41,9 @@ class GEOMImpl_CopyDriver : public GEOM_BaseDriver {
public:
Standard_EXPORT GEOMImpl_CopyDriver();
Standard_EXPORT virtual Standard_Integer Execute(LOGBOOK& log) const;
Standard_EXPORT virtual void Validate(LOGBOOK&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
Standard_EXPORT virtual Standard_Integer Execute(Handle(TFunction_Logbook)& log) const;
Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {}
Standard_EXPORT Standard_Boolean MustExecute(const Handle(TFunction_Logbook)&) const { return Standard_True; }
Standard_EXPORT static const Standard_GUID& GetID();
Standard_EXPORT ~GEOMImpl_CopyDriver() {};
@ -51,11 +51,11 @@ public:
bool GetCreationInformation(std::string& theOperationName,
std::vector<GEOM_Param>& params);
OCCT_DEFINE_STANDARD_RTTIEXT(GEOMImpl_CopyDriver,GEOM_BaseDriver)
DEFINE_STANDARD_RTTIEXT(GEOMImpl_CopyDriver,GEOM_BaseDriver)
private:
Standard_Integer transferData(LOGBOOK& log) const;
Standard_Integer transferData(Handle(TFunction_Logbook)& log) const;
Standard_Boolean getInPlace
(const TopoDS_Shape &theSourceShape,

View File

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

View File

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

View File

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

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