#include <BRepTools_Modification.hxx>
#include <BRepTools_Modifier.hxx>
#include <Message_MsgFile.hxx>
-#include <Message_ProgressIndicator.hxx>
+#include <Message_ProgressScope.hxx>
#include <Precision.hxx>
#include <ShapeBuild_ReShape.hxx>
#include <ShapeCustom_BSplineRestriction.hxx>
//purpose :
//=======================================================================
-static Standard_Boolean directfaces (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean directfaces (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean sameparam (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean sameparam (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
ShapeFix::SameParameter ( ctx->Result(),
ctx->BooleanVal ( "Force", Standard_False ),
ctx->RealVal ( "Tolerance3d", Precision::Confusion() /* -1 */),
- NULL, msg );
+ Message_ProgressRange(), msg );
if ( !msg.IsNull() )
{
//purpose :
//=======================================================================
-static Standard_Boolean settol (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean settol (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean splitangle (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean splitangle (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean bsplinerestriction (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean bsplinerestriction (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean torevol (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean torevol (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean swepttoelem (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean swepttoelem (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean shapetobezier (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean shapetobezier (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean converttobspline (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean converttobspline (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose : Split by Continuity
//=======================================================================
-static Standard_Boolean splitcontinuity (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean splitcontinuity (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean splitclosedfaces (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean splitclosedfaces (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean fixfacesize (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean fixfacesize (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean fixwgaps (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean fixwgaps (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean dropsmallsolids (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean dropsmallsolids (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx =
Handle(ShapeProcess_ShapeContext)::DownCast (context);
//purpose :
//=======================================================================
-static Standard_Boolean mergesmalledges (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean mergesmalledges (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
//purpose :
//=======================================================================
-static Standard_Boolean fixshape (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean fixshape (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange& theProgress)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;
sfw->FixSelfIntersectingEdgeMode() = ctx->IntegerVal ( "FixSelfIntersectingEdgeMode", -1 );
sfw->FixIntersectingEdgesMode() = ctx->IntegerVal ( "FixIntersectingEdgesMode", -1 );
sfw->FixNonAdjacentIntersectingEdgesMode() = ctx->IntegerVal ( "FixNonAdjacentIntersectingEdgesMode", -1 );
+ Message_ProgressScope aPS(theProgress, NULL, 2);
if (sfw->FixTailMode() == 1)
{
sfw->FixTailMode() = 0;
sfs->Init(ctx->Result());
- sfs->Perform(ctx->Progress());
+ sfs->Perform (aPS.Next());
sfw->FixTailMode() = 1;
- if (!ctx->Progress().IsNull() && ctx->Progress()->UserBreak())
+ if (aPS.UserBreak())
{
return Standard_False;
}
}
sfs->Init(ctx->Result());
- sfs->Perform(ctx->Progress());
- if (!ctx->Progress().IsNull() && ctx->Progress()->UserBreak())
+ sfs->Perform (aPS.Next());
+ if (aPS.UserBreak())
{
return Standard_False;
}
//purpose :
//=======================================================================
-static Standard_Boolean spltclosededges (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean spltclosededges (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx =
Handle(ShapeProcess_ShapeContext)::DownCast ( context );
// and isn't valid in STEP => before writing into STEP it is necessary
// to split this vertex (each wire must has one vertex)
//=======================================================================
-static Standard_Boolean splitcommonvertex (const Handle(ShapeProcess_Context)& context)
+static Standard_Boolean splitcommonvertex (const Handle(ShapeProcess_Context)& context,
+ const Message_ProgressRange&)
{
Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast ( context );
if ( ctx.IsNull() ) return Standard_False;