From 9d31b8dab439b6ce8fe660a3079874b9bdcc4987 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 9 Oct 2020 08:39:42 +0200 Subject: [PATCH] Part: [skip ci] port class TaskCheckGeometryResults to OCCT 7.5 --- src/Mod/Part/Gui/TaskCheckGeometry.cpp | 14 +++++++++++--- src/Mod/Part/Gui/TaskCheckGeometry.h | 5 +++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp index 4f5b16830f..f3e44714d3 100644 --- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp +++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp @@ -492,8 +492,7 @@ void TaskCheckGeometryResults::goCheck() #else Message_ProgressScope theInnerScope(theScope.Next(), TCollection_AsciiString(label.c_str()), 1); theInnerScope.Show(); - //invalidShapes += goBOPSingleCheck(shape, theRoot, baseName, theInnerScope); - invalidShapes += goBOPSingleCheck(shape, theRoot, baseName, nullptr); + invalidShapes += goBOPSingleCheck(shape, theRoot, baseName, theInnerScope); theInnerScope.Close(); if (theScope.UserBreak()) break; @@ -673,8 +672,13 @@ QString TaskCheckGeometryResults::getShapeContentString() return QString::fromStdString(shapeContentString); } +#if OCC_VERSION_HEX < 0x070500 int TaskCheckGeometryResults::goBOPSingleCheck(const TopoDS_Shape& shapeIn, ResultEntry *theRoot, const QString &baseName, const Handle(Message_ProgressIndicator)& theProgress) +#else +int TaskCheckGeometryResults::goBOPSingleCheck(const TopoDS_Shape& shapeIn, ResultEntry *theRoot, const QString &baseName, + const Message_ProgressScope& theScope) +#endif { ParameterGrp::handle group = App::GetApplication().GetUserParameter(). GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod")->GetGroup("Part")->GetGroup("CheckGeometry"); @@ -704,8 +708,12 @@ int TaskCheckGeometryResults::goBOPSingleCheck(const TopoDS_Shape& shapeIn, Resu //this is left for another time. TopoDS_Shape BOPCopy = BRepBuilderAPI_Copy(shapeIn).Shape(); BOPAlgo_ArgumentAnalyzer BOPCheck; -#if OCC_VERSION_HEX >= 0x060900 && OCC_VERSION_HEX < 0x070500 +#if OCC_VERSION_HEX >= 0x060900 +#if OCC_VERSION_HEX < 0x070500 BOPCheck.SetProgressIndicator(theProgress); +#else + BOPCheck.SetProgressIndicator(theScope); +#endif // 0x070500 #else Q_UNUSED(theProgress); #endif diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.h b/src/Mod/Part/Gui/TaskCheckGeometry.h index 38cdce96d1..93a1bc5318 100644 --- a/src/Mod/Part/Gui/TaskCheckGeometry.h +++ b/src/Mod/Part/Gui/TaskCheckGeometry.h @@ -118,8 +118,13 @@ private: void dispatchError(ResultEntry *entry, const BRepCheck_Status &stat); bool split(QString &input, QString &doc, QString &object, QString &sub); void setupFunctionMap(); +#if OCC_VERSION_HEX < 0x070500 int goBOPSingleCheck(const TopoDS_Shape &shapeIn, ResultEntry *theRoot, const QString &baseName, const Handle(Message_ProgressIndicator)& theProgress); +#else + int goBOPSingleCheck(const TopoDS_Shape &shapeIn, ResultEntry *theRoot, const QString &baseName, + const Message_ProgressScope& theScope); +#endif void buildShapeContent(const QString &baseName, const TopoDS_Shape &shape); ResultModel *model; QTreeView *treeView;