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