The method *TDF_Tool::Label()*, which returns a label by an entry, becomes faster for about 10 .. 20 times.
It has sense for applications, which use an entry as a unique key to access the data in OCAF tree.
Also, the method *TDF_Tool::Entry()*, which returns an entry for a label, is accelerated as well.
+
+@subsection upgrade_occt760_bop_progress_indicator Progress indicator in Boolean operations
+
+Method SetProgressIndicator() has been removed due to Progress indicator mechanism refactoring.
+To enable progress indicator and user break in Boolean operations user has to pass progress range as a parameter to Perform or Build method.
+For example:
+~~~~
+Handle(Message_ProgressIndicator) aProgress = new Message_ProgressIndicator();
+BRepAlgoApi_Cut(S1, S2, aProgress->Start()); // method Start() create range for usage in cut algorithm
+~~~~
//! Returns modifiable steps
TColStd_Array1OfReal& ChangeSteps() { return mySteps; }
- //! Assign the value theSteps to theOperation
+ //! Assign the value theStep to theOperation
void SetStep(const Standard_Integer theOperation, const Standard_Real theStep)
{
if (theOperation >= mySteps.Lower() && theOperation <= mySteps.Upper())
//=======================================================================
void BOPAlgo_BOP::fillPIConstants (const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const
{
+ BOPAlgo_Builder::fillPIConstants(theWhole, theSteps);
theSteps.SetStep (PIOperation_BuildShape, (myOperation == BOPAlgo_FUSE ? 10. : 5.) * theWhole / 100.);
}
//! - BOPAlgo_AlertUnknownShape - the shape is unknown for the operation.
//!
//! Parameters:
- //! @param theObjects - The group of Objects for BOP;
- //! @param theObjState - State for objects faces to pass into result;
- //! @param theTools - The group of Tools for BOP;
- //! @param theObjState - State for tools faces to pass into result;
- //! @param theReport - The alternative report to avoid pollution of the main one.
+ //! @param theObjects - The group of Objects for BOP;
+ //! @param theObjState - State for objects faces to pass into result;
+ //! @param theTools - The group of Tools for BOP;
+ //! @param theToolsState - State for tools faces to pass into result;
+ //! @param theReport - The alternative report to avoid pollution of the main one.
Standard_EXPORT virtual void BuildBOP(const TopTools_ListOfShape& theObjects,
const TopAbs_State theObjState,
const TopTools_ListOfShape& theTools,
const TopoDS_Shape& aSp = myDS->Shape(nSp);
myShapesSD.Bind(aSp, aSpR);
}
- if (UserBreak(aPS))
- {
- return;
- }
+ }
+ if (UserBreak(aPS))
+ {
+ return;
}
}
}
//=======================================================================
//class : BOPAlgo_SplitFace
-//purpose : Auxiliary class to extend BOPAlgo_BuilderSolid with progress support
+//purpose : Auxiliary class to extend BOPAlgo_BuilderFace with progress support
//=======================================================================
class BOPAlgo_SplitFace : public BOPAlgo_BuilderFace
{
myHasInterf=myDS->HasInterfShapeSubShapes(myIE, myIZ, bFlag);
}
};
-protected:
- Message_ProgressRange myProgressRange;
};
//=======================================================================
typedef NCollection_Vector<BOPAlgo_SolidSolid> BOPAlgo_VectorOfSolidSolid;
pPF->Perform(aPS.Next(anInterPart));
if (pPF->HasErrors())
{
- AddError(new BOPAlgo_AlertUserBreak);
return;
}
//
pPF->Perform(aPS.Next(9));
if (pPF->HasErrors())
{
- AddError(new BOPAlgo_AlertUserBreak);
return;
}
//
--- /dev/null
+puts "============================================"
+puts "0021264: Modeling Algorithms - Progress indicator for Boolean operations"
+puts "============================================"
+puts ""
+
+proc isTracked { theOutput } {
+ if {![regexp "Progress" $theOutput]} {
+ puts "Error: progress is not tracked"
+ }
+}
+
+XProgress +t
+
+box b1 10 10 10
+box b2 5 5 5 10 10 10
+
+# check that progress is tracked for boolean operations
+
+# bop + operations
+
+set log [bop b1 b2]
+isTracked $log
+
+set log [bopfuse r]
+isTracked $log
+
+set log [bopcommon r]
+isTracked $log
+
+set log [bopcut r]
+isTracked $log
+
+set log [boptuc r]
+isTracked $log
+
+set log [bopsection r]
+isTracked $log
+
+
+# b[operation]
+
+set log [bfuse r b1 b2]
+isTracked $log
+
+set log [bcommon r b1 b2]
+isTracked $log
+
+set log [bcut r b1 b2]
+isTracked $log
+
+set log [btuc r b1 b2]
+isTracked $log
+
+set log [bsection r b1 b2]
+isTracked $log
+
+
+# bfillds + bbop
+
+bclearobjects
+bcleartools
+baddobjects b1
+baddtools b2
+
+set log [bfillds]
+isTracked $log
+
+set log [bbop r 0]
+isTracked $log
+
+set log [bbop r 1]
+isTracked $log
+
+set log [bbop r 2]
+isTracked $log
+
+set log [bbop r 3]
+isTracked $log
+
+set log [bbop r 4]
+isTracked $log
+
+set log [bbuild r]
+isTracked $log
+
+set log [bsplit r]
+isTracked $log
+
+
+# API
+
+set log [bapibop r 0]
+isTracked $log
+
+set log [bapibop r 1]
+isTracked $log
+
+set log [bapibop r 2]
+isTracked $log
+
+set log [bapibop r 3]
+isTracked $log
+
+set log [bapibop r 4]
+isTracked $log
+
+set log [bapibuild r]
+isTracked $log
+
+set log [bapisplit r]
+isTracked $log
+
+
+# bopcheck
+
+set log [bopcheck r]
+isTracked $log