1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0021264: Modeling Algorithms - Progress indicator for Boolean operations

Update BOP commands to use progress indicator
Deleted wrong usage of progress indicator from bop operations
Added UserBreak() method to break execution boolean operation if progress indicator is used
Added method AnalyzeProgress() to calculate steps of progress indicator
Introduce BOPAlgo_ParallelAlgo which has myRange as a field to be used in parallel vector.
Provide suitable way of keeping the progress steps of operations.
Give meaningful names to progress scopes.
Propagate progress indicator into deeper methods of BOA.
Add progress indicator to BOPAlgo_BuilderFace and BOPAlgo_WireSplitter, BOPAlgo_BuilderSolid and BOPAlgo_ShellSplitter
This commit is contained in:
akaftasev
2021-09-01 12:48:54 +03:00
committed by bugmaster
parent 632deee0b0
commit d03c08988c
130 changed files with 2407 additions and 869 deletions

View File

@@ -21,6 +21,7 @@
#include <Precision.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_ProgramError.hxx>
#include <BOPAlgo_Alerts.hxx>
namespace
{
@@ -52,7 +53,6 @@ BOPAlgo_Options::BOPAlgo_Options()
myReport(new Message_Report),
myRunParallel(myGlobalRunParallel),
myFuzzyValue(Precision::Confusion()),
myProgressScope(0L),
myUseOBB(Standard_False)
{
BOPAlgo_LoadMessages();
@@ -69,7 +69,6 @@ BOPAlgo_Options::BOPAlgo_Options
myReport(new Message_Report),
myRunParallel(myGlobalRunParallel),
myFuzzyValue(Precision::Confusion()),
myProgressScope(0L),
myUseOBB(Standard_False)
{
BOPAlgo_LoadMessages();
@@ -129,27 +128,13 @@ void BOPAlgo_Options::SetFuzzyValue(const Standard_Real theFuzz)
myFuzzyValue = Max(theFuzz, Precision::Confusion());
}
//=======================================================================
//function : SetProgressIndicator
//purpose :
//=======================================================================
void BOPAlgo_Options::SetProgressIndicator
(const Message_ProgressScope& theScope)
Standard_Boolean BOPAlgo_Options::UserBreak(const Message_ProgressScope& thePS)
{
myProgressScope = &theScope;
if (thePS.UserBreak())
{
AddError(new BOPAlgo_AlertUserBreak);
return Standard_True;
}
return Standard_False;
}
//=======================================================================
//function : UserBreak
//purpose :
//=======================================================================
void BOPAlgo_Options::UserBreak() const
{
if (!myProgressScope) {
return;
}
if (myProgressScope->UserBreak()) {
throw Standard_NotImplemented("BOPAlgo_Options::UserBreak(), method is not implemented");
}
}