Strip face removed
!
! ------------------------------------------------------------------------------
+! Messages for ShapeFix_FixSmallSolid
+!
+.ShapeFix.FixSmallSolid.MSG0
+Small solid removed
+!
+.ShapeFix.FixSmallSolid.MSG1
+Small solid merged with other
+!
+! ------------------------------------------------------------------------------
! Messages for ShapeFix_Shell
!
.FixAdvShell.FixOrientation.MSG0
Strip face removed
!
! ------------------------------------------------------------------------------
+! Messages for ShapeFix_FixSmallSolid
+!
+.ShapeFix.FixSmallSolid.MSG0
+Small solid removed
+!
+.ShapeFix.FixSmallSolid.MSG1
+Small solid merged with other
+!
+! ------------------------------------------------------------------------------
! Messages for ShapeFix_Shell
!
.FixAdvShell.FixOrientation.MSG0
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-class FixSmallSolid from ShapeFix
+class FixSmallSolid from ShapeFix inherits Root from ShapeFix
---Purpose: Fixing solids with small size
Create returns FixSmallSolid;
---Purpose: Construct
- SetVolumeThreshold (me: in out; theThreshold: Real = -1.0);
+ SetVolumeThreshold (me: mutable; theThreshold: Real = -1.0);
---Purpose: Set or clear volume threshold for small solids
- SetWidthFactorThreshold (me: in out; theThreshold: Real = -1.0);
+ SetWidthFactorThreshold (me: mutable; theThreshold: Real = -1.0);
---Purpose: Set or clear width factor threshold for small solids
Remove(me; theShape: Shape from TopoDS; theContext: ReShape from ShapeBuild)
#include <BRepGProp.hxx>
#include <BRep_Builder.hxx>
#include <ShapeBuild_ReShape.hxx>
+#include <Message_Msg.hxx>
//=======================================================================
//function : ShapeFix_FixSmallSolid
{
const TopoDS_Shape& aSolid = aSolidIter.Current();
if (IsSmall (aSolid))
+ {
theContext->Remove (aSolid);
+ SendWarning ( aSolid, Message_Msg( "ShapeFix.FixSmallSolid.MSG0" ));
+ }
}
// Return updated shape
// remove the small solid
theContext->Remove (aSmallSolid);
aSmallSolids.Remove (aSolidIter);
+ SendWarning ( aSmallSolid, Message_Msg( "ShapeFix.FixSmallSolid.MSG1" ));
}
else
aSolidIter.Next();
Handle(ShapeProcess_ShapeContext)::DownCast (context);
if (ctx.IsNull()) return Standard_False;
+ // activate message mechanism if it is supported by context
+ Handle(ShapeExtend_MsgRegistrator) msg;
+ if ( ! ctx->Messages().IsNull() ) msg = new ShapeExtend_MsgRegistrator;
+
ShapeFix_FixSmallSolid FSS;
+ FSS.SetMsgRegistrator( msg );
Standard_Real aThreshold;
if (ctx->GetReal ("VolumeThreshold", aThreshold))
if (aResult != ctx->Result())
{
- ctx->RecordModification (aReShape);
+ ctx->RecordModification (aReShape, msg);
ctx->SetResult (aResult);
}