From 70c8974df090258b6a2b9a06810e270e81fbeea7 Mon Sep 17 00:00:00 2001 From: smh Date: Thu, 15 Sep 2005 13:27:20 +0000 Subject: [PATCH] Support of CASCADE 5.2.4 --- src/GEOMBase/Makefile.in | 2 +- src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 11 +++++++++++ src/ShHealOper/ShHealOper_Sewing.cxx | 16 ++++++++++++++-- src/ShHealOper/ShHealOper_Sewing.hxx | 18 +++++++++++++++++- 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/GEOMBase/Makefile.in b/src/GEOMBase/Makefile.in index 9dff7f68d..76c7ffb81 100644 --- a/src/GEOMBase/Makefile.in +++ b/src/GEOMBase/Makefile.in @@ -66,6 +66,6 @@ LIB_SERVER_IDL = CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lDlgRef -lGEOMGUI +LDFLAGS += -lDlgRef -lGEOMGUI $(CAS_LDPATH) -lTKPrim @CONCLUDE@ diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index dc5d0b9db..a5b8dcbcf 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -9,7 +9,18 @@ using namespace std; #include #include #include + +#include +#ifdef OCC_VERSION_MAINTENANCE +#if (OCC_VERSION_MAJOR >= 5 && OCC_VERSION_MINOR >= 2 && OCC_VERSION_MAINTENANCE >= 4) +#include +#define BRepAlgo_Sewing BRepBuilderAPI_Sewing +#else #include +#endif +#else #include +#endif + #include #include #include diff --git a/src/ShHealOper/ShHealOper_Sewing.cxx b/src/ShHealOper/ShHealOper_Sewing.cxx index b0f8e4206..78b72c3c9 100644 --- a/src/ShHealOper/ShHealOper_Sewing.cxx +++ b/src/ShHealOper/ShHealOper_Sewing.cxx @@ -94,7 +94,12 @@ Standard_Boolean ShHealOper_Sewing::sewing(const TopTools_SequenceOfShape& theSe return myDone; } //sewing shape - Handle(BRepAlgo_Sewing) aSewing = new BRepAlgo_Sewing; +#ifdef __OCC_5_2_4__ + Handle(BRepBuilderAPI_Sewing) aSewing = new BRepBuilderAPI_Sewing; +#else + Handle(BRepAlgo_Sewing) aSewing = new BRepAlgo_Sewing; +#endif + aSewing->Load(myInitShape); aSewing->SetTolerance(myTolerance); aSewing->SetFaceMode(myFacesMode); @@ -221,7 +226,14 @@ Standard_Boolean ShHealOper_Sewing::getWires(const TopoDS_Shape& theSewShape) co //======================================================================= Standard_Boolean ShHealOper_Sewing::getModifications(const TopoDS_Shape& theShape, - const Handle(BRepAlgo_Sewing)& theSewing) const + +#ifdef __OCC_5_2_4__ + const Handle(BRepBuilderAPI_Sewing)& +#else + const Handle(BRepAlgo_Sewing)& +#endif + +theSewing) const { if((Standard_Integer)theShape.ShapeType() > (Standard_Integer)myHistoryLevel) return Standard_False; diff --git a/src/ShHealOper/ShHealOper_Sewing.hxx b/src/ShHealOper/ShHealOper_Sewing.hxx index e7244b227..736f0d847 100644 --- a/src/ShHealOper/ShHealOper_Sewing.hxx +++ b/src/ShHealOper/ShHealOper_Sewing.hxx @@ -28,7 +28,18 @@ #include #include #include +#include +#ifdef OCC_VERSION_MAINTENANCE +#if (OCC_VERSION_MAJOR >= 5 && OCC_VERSION_MINOR >= 2 && OCC_VERSION_MAINTENANCE >= 4) +#include +#define __OCC_5_2_4__ +#else #include +#endif +#else +#include +#endif + #include #include #include @@ -125,7 +136,12 @@ class ShHealOper_Sewing : public ShHealOper_Tool Standard_Boolean getShells(const TopoDS_Shape& theSewShape) const; Standard_Boolean getWires(const TopoDS_Shape& theSewShape) const; Standard_Boolean getModifications(const TopoDS_Shape& theShape, - const Handle(BRepAlgo_Sewing)& theSewing) const; +#ifdef __OCC_5_2_4__ + const Handle(BRepBuilderAPI_Sewing)& +#else + const Handle(BRepAlgo_Sewing)& +#endif +theSewing) const; Standard_Boolean isSewed(const TopoDS_Shape& theShape) const; -- 2.39.2