DiscussionsIssue archiveOther usage issues

Archived discussion

Fixing the tolerances inside a shape

Other usage issuesFri, 09/20/2013 - 22:285 replies

Browse this forum
QuestionAuthor

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.
Author

Discussion

5 archived replies

Posts are displayed in their archived order.

01Commenter-1

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.

Commenter-1

02Author

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.

Author

03Commenter-2

Is there some news regarding recalculating the tolerances? Is also would be interested in it.

04Commenter-3

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

05Commenter-4

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, Commenter-4.