From 735eecc42be4604b92c53140672bb25c642fe447 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 9 Aug 2022 18:42:38 +0200 Subject: [PATCH] Part: fix build failures with OCC >= 7.6 --- src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp | 4 ++++ src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.h | 5 +++++ src/Mod/Part/App/FaceMaker.cpp | 4 ++++ src/Mod/Part/App/FaceMaker.h | 5 +++++ src/Mod/Part/App/FeatureExtrusion.cpp | 4 ++++ src/Mod/Part/App/FeatureExtrusion.h | 5 +++++ src/Mod/Part/App/modelRefine.cpp | 4 ++++ src/Mod/Part/App/modelRefine.h | 5 +++++ 8 files changed, 36 insertions(+) diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp index a3266ceb2b..7ffd399233 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp +++ b/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.cpp @@ -103,7 +103,11 @@ void BRepOffsetAPI_MakeOffsetFix::Perform (const Standard_Real Offset, const Sta mkOffset.Perform(Offset, Alt); } +#if OCC_VERSION_HEX >= 0x070600 +void BRepOffsetAPI_MakeOffsetFix::Build(const Message_ProgressRange&) +#else void BRepOffsetAPI_MakeOffsetFix::Build() +#endif { mkOffset.Build(); } diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.h b/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.h index 12595e0090..a675a3c1a3 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.h +++ b/src/Mod/Part/App/BRepOffsetAPI_MakeOffsetFix.h @@ -30,6 +30,7 @@ #include #include +#include namespace Part { @@ -56,7 +57,11 @@ public: void Perform (const Standard_Real Offset, const Standard_Real Alt = 0.0); //! Builds the resulting shape (redefined from MakeShape). +#if OCC_VERSION_HEX >= 0x070600 + void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) override; +#else void Build() override; +#endif //! Initializes the algorithm to construct parallels to the spine Spine. //! Join defines the type of parallel generated by the diff --git a/src/Mod/Part/App/FaceMaker.cpp b/src/Mod/Part/App/FaceMaker.cpp index d01b65a270..d4e39c6388 100644 --- a/src/Mod/Part/App/FaceMaker.cpp +++ b/src/Mod/Part/App/FaceMaker.cpp @@ -83,7 +83,11 @@ const TopoDS_Face& Part::FaceMaker::Face() return TopoDS::Face(sh); } +#if OCC_VERSION_HEX >= 0x070600 +void Part::FaceMaker::Build(const Message_ProgressRange&) +#else void Part::FaceMaker::Build() +#endif { this->NotDone(); this->myShapesToReturn.clear(); diff --git a/src/Mod/Part/App/FaceMaker.h b/src/Mod/Part/App/FaceMaker.h index 28f9278179..89c9a0ba67 100644 --- a/src/Mod/Part/App/FaceMaker.h +++ b/src/Mod/Part/App/FaceMaker.h @@ -24,6 +24,7 @@ #define PART_FACEMAKER_H #include +#include #include #include #include @@ -75,7 +76,11 @@ public: */ virtual const TopoDS_Face& Face(); +#if OCC_VERSION_HEX >= 0x070600 + void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) override; +#else void Build() override; +#endif //fails to compile, huh! //virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape &S) override {throwNotImplemented();} diff --git a/src/Mod/Part/App/FeatureExtrusion.cpp b/src/Mod/Part/App/FeatureExtrusion.cpp index 8f04a2cb92..c5264c04e2 100644 --- a/src/Mod/Part/App/FeatureExtrusion.cpp +++ b/src/Mod/Part/App/FeatureExtrusion.cpp @@ -342,7 +342,11 @@ std::string FaceMakerExtrusion::getBriefExplanation() const return std::string(QT_TRANSLATE_NOOP("Part_FaceMaker", "Supports making faces with holes, does not support nesting.")); } +#if OCC_VERSION_HEX >= 0x070600 +void FaceMakerExtrusion::Build(const Message_ProgressRange&) +#else void FaceMakerExtrusion::Build() +#endif { this->NotDone(); this->myGenerated.Clear(); diff --git a/src/Mod/Part/App/FeatureExtrusion.h b/src/Mod/Part/App/FeatureExtrusion.h index 4a6667b70b..69158aae6a 100644 --- a/src/Mod/Part/App/FeatureExtrusion.h +++ b/src/Mod/Part/App/FeatureExtrusion.h @@ -136,7 +136,12 @@ public: std::string getUserFriendlyName() const override; std::string getBriefExplanation() const override; +#if OCC_VERSION_HEX >= 0x070600 + void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) override; +#else void Build() override; +#endif + protected: void Build_Essence() override {} }; diff --git a/src/Mod/Part/App/modelRefine.cpp b/src/Mod/Part/App/modelRefine.cpp index f941e61273..4e7e21d12c 100644 --- a/src/Mod/Part/App/modelRefine.cpp +++ b/src/Mod/Part/App/modelRefine.cpp @@ -1217,7 +1217,11 @@ Part::BRepBuilderAPI_RefineModel::BRepBuilderAPI_RefineModel(const TopoDS_Shape& Build(); } +#if OCC_VERSION_HEX >= 0x070600 +void Part::BRepBuilderAPI_RefineModel::Build(const Message_ProgressRange&) +#else void Part::BRepBuilderAPI_RefineModel::Build() +#endif { if (myShape.IsNull()) Standard_Failure::Raise("Cannot remove splitter from empty shape"); diff --git a/src/Mod/Part/App/modelRefine.h b/src/Mod/Part/App/modelRefine.h index c622cd79d8..3bc7b0fee5 100644 --- a/src/Mod/Part/App/modelRefine.h +++ b/src/Mod/Part/App/modelRefine.h @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -198,7 +199,11 @@ class PartExport BRepBuilderAPI_RefineModel : public BRepBuilderAPI_MakeShape { public: BRepBuilderAPI_RefineModel(const TopoDS_Shape&); +#if OCC_VERSION_HEX >= 0x070600 + void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) override; +#else void Build() override; +#endif const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) override; Standard_Boolean IsDeleted(const TopoDS_Shape& S) override;