#include <MoniTool_DataMapOfShapeTransient.hxx>
+#include <Message_ProgressScope.hxx>
#include <StdFail_NotDone.hxx>
#include <StepShape_ClosedShell.hxx>
#include <StepShape_ConnectedFaceSet.hxx>
//=============================================================================
TopoDSToStep_MakeShellBasedSurfaceModel::
TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Face& aFace,
- const Handle(Transfer_FinderProcess)& FP)
+ const Handle(Transfer_FinderProcess)& FP,
+ const Message_ProgressRange& theProgress)
{
done = Standard_False;
MoniTool_DataMapOfShapeTransient aMap;
TopoDSToStep_Tool aTool(aMap, Standard_False);
- TopoDSToStep_Builder StepB(aFace, aTool, FP);
+ TopoDSToStep_Builder StepB(aFace, aTool, FP, theProgress);
+ if (theProgress.UserBreak())
+ return;
TopoDSToStep::AddResult ( FP, aTool );
TopoDSToStep_MakeShellBasedSurfaceModel::
TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Shell& aShell,
- const Handle(Transfer_FinderProcess)& FP)
+ const Handle(Transfer_FinderProcess)& FP,
+ const Message_ProgressRange& theProgress)
{
done = Standard_False;
StepShape_Shell aShellSelect;
MoniTool_DataMapOfShapeTransient aMap;
TopoDSToStep_Tool aTool(aMap, Standard_False);
- TopoDSToStep_Builder StepB(aShell, aTool, FP);
+ TopoDSToStep_Builder StepB(aShell, aTool, FP, theProgress);
+ if (theProgress.UserBreak())
+ return;
//TopoDSToStep::AddResult ( FP, aTool );
if (StepB.IsDone()) {
TopoDSToStep_MakeShellBasedSurfaceModel::
TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Solid& aSolid,
- const Handle(Transfer_FinderProcess)& FP)
+ const Handle(Transfer_FinderProcess)& FP,
+ const Message_ProgressRange& theProgress)
{
done = Standard_False;
StepShape_Shell aShellSelect;
MoniTool_DataMapOfShapeTransient aMap;
TColStd_SequenceOfTransient S;
- It.Initialize(aSolid);
- for (; It.More(); It.Next() ) {
+ Standard_Integer nbshapes = 0;
+ for (It.Initialize(aSolid); It.More(); It.Next())
+ if (It.Value().ShapeType() == TopAbs_SHELL)
+ nbshapes++;
+ Message_ProgressScope aPS(theProgress, NULL, nbshapes);
+ for (It.Initialize(aSolid); It.More() && aPS.More(); It.Next())
+ {
if (It.Value().ShapeType() == TopAbs_SHELL) {
aShell = TopoDS::Shell(It.Value());
TopoDSToStep_Tool aTool(aMap, Standard_False);
- TopoDSToStep_Builder StepB(aShell, aTool, FP);
+ TopoDSToStep_Builder StepB(aShell, aTool, FP, aPS.Next());
TopoDSToStep::AddResult ( FP, aTool );
if (StepB.IsDone()) {
}
}
}
+ if (!aPS.More())
+ return;
Standard_Integer N = S.Length();
if ( N >= 1) {
aSbsmBoundary = new StepShape_HArray1OfShell(1,N);