Part: fix build failures with OCC >= 7.6

This commit is contained in:
wmayer
2022-08-09 18:42:38 +02:00
parent 2062f9ce87
commit 735eecc42b
8 changed files with 36 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -30,6 +30,7 @@
#include <BRepOffsetAPI_MakeOffset.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Standard_Version.hxx>
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

View File

@@ -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();

View File

@@ -24,6 +24,7 @@
#define PART_FACEMAKER_H
#include <BRepBuilderAPI_MakeShape.hxx>
#include <Standard_Version.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
@@ -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();}

View File

@@ -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();

View File

@@ -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 {}
};

View File

@@ -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");

View File

@@ -29,6 +29,7 @@
#include <BRepBuilderAPI_MakeShape.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <Standard_Version.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shell.hxx>
@@ -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;