Part: Add OCCT progress support to Part boolean and shape builders

Introduce a `Build(const Message_ProgressRange&)` overload in
`FCBRepAlgoAPI_BooleanOperation` (guarded by `OCC_VERSION_HEX <
0x070600`) and route user-abort checks around the operation. Add a new
`OCCTProgressIndicator` adapter (`OCCTProgressIndicator.h`) that bridges
`Message_ProgressIndicator` to `Base::ProgressIndicator`. Include
`OCCTProgressIndicator.h` where needed and update all `Build()` calls in
`TopoShape` and `TopoShapeExpansion` to pass
`OCCTProgressIndicator().Start()`, enabling singleton-based progress
reporting and user-break handling.
This commit is contained in:
Joao Matos
2025-05-18 18:05:57 +01:00
parent db02e43ad3
commit 39efc8ec0f
6 changed files with 200 additions and 5 deletions

View File

@@ -36,6 +36,7 @@
#include <Base/Observer.h>
#include <Base/Parameter.h>
#include <Base/ProgressIndicator.h>
// forward declarations
using PyObject = struct _object;
@@ -475,6 +476,9 @@ public:
bool hasLinksTo(const DocumentObject *obj) const;
//@}
/// Gets the base progress indicator instance.
Base::ProgressIndicator& getProgressIndicator() { return _progressIndicator; }
friend class App::Document;
protected:
@@ -662,6 +666,8 @@ private:
int _activeTransactionGuard{0};
bool _activeTransactionTmpName{false};
Base::ProgressIndicator _progressIndicator;
static Base::ConsoleObserverStd *_pConsoleObserverStd;
static Base::ConsoleObserverFile *_pConsoleObserverFile;
};