Skip to main content

Module attach

Module attach 

Source
Expand description

Storing a tessellation back onto the model.

triangulate computes a mesh and hands it to the caller. This puts one on the shape itself, as a representation alongside the exact geometry (docs/DATA_MODEL.md §6): a polyline on each edge, a triangulation on each face.

§Why cache at all

A viewer redraws at sixty frames a second and cannot re-solve a NURBS patch each time. Data exchange writes the mesh, not the surface. Both want the same answer every time they ask, which a cache guarantees and recomputation does not: two calls with the same deflection can differ in their last bits, and a display that flickers along a shared edge is the visible result.

§Why the polyline keeps its parameters

An edge’s cached polyline and the boundary of a face’s cached triangulation have to be the same points, or the stored form has gaps where the exact geometry has none. They agree because both come from the edge’s 3D curve at one set of parameters, so the parameters are stored, not just the points.

Structs§

Tessellated
What a tessellation pass produced.

Functions§

polyline_of
The polyline stored on an edge, if one has been built.
tessellate
Tessellate every face and edge below shape, storing the result on the model.
triangulation_of
The triangulation stored on a face, if one has been built.