1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +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

@@ -146,7 +146,7 @@ const TopTools_ListOfShape* BOPAlgo_Builder::LocModified(const TopoDS_Shape& the
//function : PrepareHistory
//purpose :
//=======================================================================
void BOPAlgo_Builder::PrepareHistory()
void BOPAlgo_Builder::PrepareHistory(const Message_ProgressRange& theRange)
{
if (!HasHistory())
return;
@@ -166,7 +166,8 @@ void BOPAlgo_Builder::PrepareHistory()
// - Shapes that have no trace in the result shape. Add them as Deleted
// during the operation.
Standard_Integer aNbS = myDS->NbSourceShapes();
for (Standard_Integer i = 0; i < aNbS; ++i)
Message_ProgressScope aPS(theRange, "Preparing history information", aNbS);
for (Standard_Integer i = 0; i < aNbS; ++i, aPS.Next())
{
const TopoDS_Shape& aS = myDS->Shape(i);
@@ -174,6 +175,11 @@ void BOPAlgo_Builder::PrepareHistory()
if (!BRepTools_History::IsSupportedType(aS))
continue;
if (UserBreak(aPS))
{
return;
}
Standard_Boolean isModified = Standard_False;
// Check if the shape has any splits