Skip to main content

Module profile

Module profile 

Source
Expand description

Profile -> 2D polygon rings, then triangles.

Curved boundaries are flattened to chords under an explicit TessellationOptions-style budget; nothing here invents a default tolerance.

Triangulation of rings-with-holes is the crate’s own certified ear clipper (ring_triangulation, ADR 0083, replacing the earcut adoption of ADR 0015 after it left T-junctions between holes in one band, #253). axiolid_reference::triangulate_simple stays the differential oracle for the hole-free case.

Structs§

RingTouch
A vertex lying inside an edge of a ring, away from both its ends, as triangulate_with finds it under PinchPolicy::Accept (#265).
Rings
Outer ring plus holes, all CCW/CW normalised by the caller’s contract: outer counter-clockwise, holes clockwise.
ShellFaceTriangulation
A triangulation of a planar face of a closed shell, from triangulate_shell_face (#283).
SteinerPoint
A point triangulate_shell_face adds inside a face, as a chain of midpoints of the face’s own points (#283): the midpoint m of the seam from seam[0] to seam[1], then halvings times the midpoint of m and the point so far, starting from toward.

Enums§

PinchPolicy
How a triangulation treats rings that touch at a single point (#262): a hole touching the outer ring or another hole at a vertex, an outer ring pinched at a vertex, or a vertex lying on another ring’s edge.
ProfileDeviation
How far a profile’s exact boundary may lie from the rings profile_rings flattens it to (#232).

Functions§

profile_deviation
The deviation of profile_rings(profile, chord_error, tolerance) from the exact profile (#232).
profile_rings
Flatten a profile into rings under an explicit chord budget.
ring_touches
Every vertex lying inside another edge of rings, decided by the same exact orient2d tests with which triangulate_with under PinchPolicy::Accept inserts it into that edge (#265).
triangulate
Triangulate rings into a flat index buffer over a single vertex list.
triangulate_shell_face
Triangulate a planar face of a closed shell (#283): as triangulate_with under PinchPolicy::Accept, and no triangle edge lies on a seam.
triangulate_with
triangulate under an explicit PinchPolicy.