Meshing tolerance parameter

Dear all,

it is not clear to me how it is used the ON_MeshParameters::Tolerance parameter.
Documentation reported: “float: Gets or sets the maximum allowed edge deviation. This tolerance is measured between the center of the mesh edge and the surface.”

If I’m not wrong, usually Rhino generates “quads” whenever possible.
If it is correct, I expect all edges of the mesh quad to be at most the tolerance value away from the original surface.

What happen if I split the quads into triangles using ON_Mesh::ConvertQuadsToTriangles()? Are the new edges at most the tolerance value away from the original surface?

If they are not, which is the best way to obtain a triangulate mesh with all the triangles edges in tolerance?

Best regards,
Alberto

No, not necessarily. An extreme example, but here the quad edges are close to the surface:

while after triangulation they are not:

As far as I know, there is no way to make a tri-only mesh in Rhino and force the edges to be within tolerance.

what you could do is set the edge tolerance to a certain value, make the mesh, triangulate it, then check all the mid-edge distances to the surfaces being meshed. If out of tolerance, make the edge tolerance more strict and repeat. If your geometries are similar in their shapes, you only need to do this once to get a rule-of-thumb on how strict to set the edge tolerance to get all triangle edges to lie within tolerance to the surface.

In addition to what Menno said, in Rhino the Maximum angle property, with refinement enabled, is a good way to avoid the situations like the previous image. And it is scale-independant if you care about that.

It sounds like this is what the Refine Angle would do in Rhino3dm but I’m not sure. Let us know if you are still stuck.