mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-16 05:04:11 +08: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:
@@ -35,7 +35,7 @@ BRepAlgoAPI_Splitter::BRepAlgoAPI_Splitter(const BOPAlgo_PaveFiller& thePF)
|
||||
// function: Build
|
||||
// purpose:
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_Splitter::Build()
|
||||
void BRepAlgoAPI_Splitter::Build(const Message_ProgressRange& theRange)
|
||||
{
|
||||
// Set Not Done status by default
|
||||
NotDone();
|
||||
@@ -50,6 +50,7 @@ void BRepAlgoAPI_Splitter::Build()
|
||||
}
|
||||
|
||||
// If necessary perform intersection of the argument shapes
|
||||
Message_ProgressScope aPS(theRange, "Performing Split operation", myIsIntersectionNeeded ? 100 : 30);
|
||||
if (myIsIntersectionNeeded)
|
||||
{
|
||||
// Combine Arguments and Tools for intersection into a single list
|
||||
@@ -58,7 +59,7 @@ void BRepAlgoAPI_Splitter::Build()
|
||||
aLArgs.Append(it.Value());
|
||||
|
||||
// Perform intersection
|
||||
IntersectShapes(aLArgs);
|
||||
IntersectShapes(aLArgs, aPS.Next(70));
|
||||
if (HasErrors())
|
||||
return;
|
||||
}
|
||||
@@ -69,5 +70,5 @@ void BRepAlgoAPI_Splitter::Build()
|
||||
((BOPAlgo_Splitter*)myBuilder)->SetTools(myTools);
|
||||
|
||||
// Build result shape basing on the intersection results
|
||||
BuildResult();
|
||||
BuildResult(aPS.Next(30));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user