Fri, 09/20/2013 - 22:28
Hello,
is there a way to recompute the tolerances of a shape and its subshapes, without doing a compleate repairing?
I need an algorithm which sets the tolerances of vertexes and edges to as small a value as is enough to cover the gaps.
My problem is the following.
I often have faces or solids which have high tolerances (0.001 or even 0.01), which make OpenCASCADE algoriths fail (boolean operations, etc.), but the real gaps are much smaller.
I was suggested to fix these shapes by setting all tolerances to 1.e-7 and then calling ShapeFix.
Maybe I will put this in an interactive command of my application, but it is too strong and risky to be applied automatically to every model, so I would like just to fix the tolerances without modifying curves, etc.
Thanks a lot.
Mauro
Sat, 09/21/2013 - 19:32
Hello,
ShapeFix_ShapeTolerance::SetTolerance (const TopoDS_Shape &shape, const Standard_Real preci, const TopAbs_ShapeEnum styp=TopAbs_SHAPE)
Should help you to change the tolerance of your shape without repairing.
Sébastien
Mon, 09/23/2013 - 13:51
Thank you for answering,
but ShapeFix_ShapeTolerance::SetTolerance sets a fixed (input) value in all subshapes.
I need a function which re-computes the tolerances, giving to each subshape the "right" tolerance value.
If it does not exist, I am afraid I will have to look inside the code of the ShapeFix package, to extract the tolerance computation.
Mauro
Fri, 07/03/2015 - 12:27
Is there some news regarding recalculating the tolerances? Is also would be interested in it.
Wed, 06/05/2024 - 05:21
ShapeFix_ShapeTolerance::SetTolerance does not really work
You can see the tolerance has been changed but old tolerance still be using in OCC APIs.
I think this is a bug
Wed, 06/05/2024 - 11:02
It possible only in magic way :)
Or internal bug :(
But SetTolerace set directly into shared object. Which parameters do you use for update tolerance? And which shape type have old tolerance values?
Best regards, Dmitrii.