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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user