For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

How do I use ShapeFixStd?

Anonymous's picture
Forums: 

Hello all,

I have some parts that are made with boolean operations and the boolean operation produces the wrong shape (e.g. faces are missing, etc...). In an attempt to fix this I am trying to adjust tolerances within the part as follows (where all shapes are TopoDS_Shape's):

BRepAlgoAPI_Fuse fuser( tempShape, nextShape );

if ( fuser.IsDone() ) {

shape = fuser.Shape();

ShapeFixStd_Shape sfs( shape );

sfs.SetPrecision( 2.0e-6 );

sfs.SetMaxTolerance( 2.0e-5 );

sfs.Perform();

}

First of all, my fix to the boolean operation doesn't work (am I doing the wrong thing here or perhaps using the wrong values?). Secondly, the problem actually gets worse because now the code enters an infinite loop when it operates on some parts so I suspect that I am not using the ShapeFixStd_Shape object correctly. Can anyone see what I am doing wrong?

Thanks for your help,

-- Shaun Bloom

Betenev Andrey's picture

Hello Shaun,

Unfortunately, ShapeFixStd_Shape is not intended and does not fix all the possible problems with shapes, but only some specific types of errors. For instance, it surely will not fix missing face if it has been lost by some operations.

If you are trying to use ShapeFixStd_Shape to do some specific task (like update of tolerances), and encounter some problems, you can try to modify some parameters of fixing. For instance, you can yse methods like FixSameParameterMode() to force or to forbid specific fixes. Use methods like FixWireTool() to get access to lowest-level tools and manage their parameters.

Best Regards,

Andrey

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.