BRepClass3d_SolidClassifier, BRepClass3d_SolidExplorer and tolerance

BRepClass3d_SolidClassifier::Perform takes in a tolerance. However, in its implementation it creates IntCurvesFace_Intersector with default tolerance of Precision::confusion. While classifying a point with respect to a face (while classifying a point with respect to a solid), it classifies a point to be outside of face, even if it lies within the given tolerance. As a result, though the point lies ON the face, it classifies the solid as INSIDE since it found only one intersection.

The way to handle it is to be able to specify tolerance for each IntCurvesFace_Intersector::Perform call. Also, it should also take into consideration the tolerance of the edges and vertices of the face.

Or is there a better way of checking a point with respect to a solid within the given tolerance?

Yogesh Sajanikar's picture

I found that BRepClass_Intersector class does not take edge tolerance into consideration. So even if the point is within the edge tolerance from the edge, it classifies it as out of the edge.

Mauro Mariotti's picture

This is an important issue for my company.
I hope someone will answer.


Yogesh Sajanikar's picture

I found a fix for edges. For vertices however, I think it need to be tested comprehensively.

Yogesh Sajanikar's picture


I can send the change to you. I am also filing an issue, along with this fix. Note that this fix takes care of edge tolerance. For vertex tolerance the fix is involved, and I think someone in the core team should take care of it.