Shape Healing Question

Ok,

as I figured out my troubles result from errors in the shape. (Thanks for the tip that not closed edges have another color than yellow!) Now I was trying to heal the shape like that:

ShapeFix_Solid FixSolid; FixSolid.Init(FixSolid.SolidFromShell(TopoDS::Shell(aSewedShell)));
FixSolid.SetMaxTolerance(1e-02);
FixSolid.SetPrecision(Precision::Confusion());
FixSolid.Perform();
TopoDS_Shape result = FixSolid.Solid();

Handle(ShapeFix_Wireframe) sfwf = new ShapeFix_Wireframe;
sfwf->Load(current_topo_shape);
sfwf->SetPrecision(Precision::Confusion());
sfwf->FixWireGaps();
sfwf->ModeDropSmallEdges() = Standard_True;
sfwf->FixSmallEdges();
result = sfwf->Shape();

Obviously I am missing a point here. ASewedShell is a not correctly connected Shell consisting of Face that have been sewed using: BRepOffsetAPI_Sewing.

The shape healing user guide speaks about a controll flag CreateOpenShellMode. How can I set this to true? I could not find the flag in the OC source code. Can anyone give me some general information about the use of tolerance and precission?

Any hint could be helpful.

Regards,

Udo

MerryLoggings's picture

I can only speak for ShapeFix_Wire, but in this class there are methods like "ClosedWireMode()", which return a reference to the flag to change. Therefore, any such method is usable like this:

ShapeFix_Wire fixit;
// ...
fixit.ClosedWireMode() = Standard_True;
// ...
fixit.Perform();

There are other "flag-setting-methods", which take integers as input:
-1 sets the operation managed by the flag to "default"
0 sets the operation managed by the flag to "don't execute"
1 sets the operation managed by the flag to "execute"

Maybe this is of any help.