| CrossManager V2025.4 |

Tessellation settings

Tessellation is used by all tesselated formats written (JT, FBX, GLTF, 3MF, CGR, IFC, OBJ, PDF, COLLADA, STL, X3D,..)

## Precision settings

A mesh is by definition less precise than its corresponding brep: a surface composed of a triangle set cannot be as "smooth" as its NURBS mathematical definition. Our tesselation settings allow you to control this precision with a linear or angular tolerance.
Linear Tolerance
The linear tolerance represents the chordal error, i.e the maximum distance between the reference curve (the brep curve stored in the body) and the approximated mesh. A smaller value produces a denser mesh on curved geometry that is more accurate, but also heavier. Note that this value is dependant to the model size, a smaller model needs a smaller linear tolerance to keep the same precision as a bigger model.

Discretization result for linear tolerance = 0.5mm (green : the exact surface (reference curve), red : resulting mesh). We can see that the maximum distance between the reference curve and the approximated mesh never exceeds 0.5.
To change the linear tolerance use

LINEAR_TOL=0.1

To disable linear tolerance use

LINEAR_DIS=1

Angular Tolerance
Angular tolerance is another way to control the resulting mesh precision.
It is the maximum angle between the reference curve (the brep curve stored in the body) and the approximated mesh. This tolerance has the advantage to be independant to the model size.

Angular tolerance represents deviation angle between points (green : exact surface definition, resulting triangle basis)

Discretization result for angular tolerance = 0.104rad (6deg) (green : the exact surface (reference curve), red : resulting mesh). We can see that the maximum angle between the reference curve and the approximated mesh never exceeds 6deg = 0.104rad.
To enable angular tolerance use

ANGULAR_TOL=0.174532 // The angle value is in radian !

To disable angular tolerance use

ANGULAR_DIS=1

Both linear and angular modes can be combined. In such a case, final meshing results will depend on both criterias.

## Other settings

You can set the size ratio between two neighbor triangles with

RATIO=10000.0000000

A value at 1.0 generates only isosceles triangles

You can set the maximun lenght of a triangle with

MAXSIZE=1000000000

# Miscallenous functions

- By default, the tessellation computes the exact normal value from the original surface, not a normal from the triangle.
  However, you can disable this calculation if the approximation is sufficient for you, by setting COMPUTE_NORMALES_FROM_SURFACE to 0

- In Dtk_mesh, we save the boundaries computed from the vertices for each face, then you can retrieve them with:
  You can desactivate this storage by calling beforehand the following function :
  COMPUTE_BOUNDARIES_FROM_MESH=1