Expand description
Turning a curve into a polyline within a stated deflection.
The first half of tessellation, and the half that decides whether the second half can succeed: a face’s triangulation is built from the polylines of its boundary edges, so two faces meeting along an edge produce a watertight join only if they discretize that edge to the same points. That is why discretization is a property of the edge rather than of the face, and why it is a separate step from triangulating the face itself.
§What deflection means
The chord deflection is the greatest distance between the polyline and the curve it approximates. It is a length, so it scales with the model, and it is the number a caller actually has an opinion about: “no visible error at this zoom”, “within machining tolerance”.
The angular deflection bounds how far the tangent may turn across one segment. Without it a nearly straight curve gets two points and a near-circular one gets far too few near its flattest part; chord error alone does not notice a long, gently curving span.
Structs§
- Deflection
- How finely to approximate a curve.
- Polyline
- A curve approximated by points, with the parameters they came from.
Functions§
- discretize
- Approximate
curveoverrangewithindeflection. - discretize_
on_ surface - Discretize a pcurve with its chord tolerance measured in space, through the surface that gives its chart a metric.
- discretize_
planar - Approximate a planar curve in a surface’s parameter space.
- is_
straight - Whether a curve is a straight line, seeing through any trimming.
- is_
straight_ planar - Whether a planar curve is a straight line in parameter space.