pub fn remesh(
tx: &mut Transaction<'_>,
options: &RemeshOptions,
) -> Result<RemeshReport>Expand description
Remeshes the edges inside options.region toward the target length.
Each round splits the edges whose midpoint lies in the region and whose
length exceeds the target by SPLIT_FACTOR, collapses interior edges
shorter than the target by COLLAPSE_FACTOR, and flips interior edges
whose quad gains a larger minimum angle. Splitting an edge inserts one
vertex at its midpoint, shared by the triangles on either side, so
neighbors stay stitched; collapsing an edge merges its endpoints into one
midpoint vertex. Boundary edges never collapse, and any pass that would
fold the surface is skipped. The whole plan is computed on working copies
first and committed through tx at the end, which keeps the call atomic
under sweep: either every round lands or nothing does.