Skip to main content

Module tjunction

Module tjunction 

Source
Expand description

Splitting triangle edges at vertices that lie on them (T-junctions).

A cut opening leaves a long edge on one face matched by two short edges on the other: the mesh looks closed, but no edge is shared, so the oriented-cycle audit counts three unbalanced edges and no volume is measured. Splitting the long side at the vertex restores the pairing.

Only edges the audit finds unbalanced are split, and only at vertices that are endpoints of such an edge, so a closed mesh is never touched. A vertex lies on an edge when it is strictly inside it (0 < t < 1), at most tolerance.linear() from its line and further than tolerance.linear() from both endpoints. No vertex is created or moved, so per-vertex data is untouched; corner data follows the split corners.

The split is declined, and the triangle kept as it was, when it would give a wrong answer: the triangle’s own third corner lies on its edge, a piece would be degenerate or face against the parent, or the two ends of a split side hold different values in a corner-indexed buffer, so no single value could be given to the new corner, or a per-vertex value at the inserted vertex is not what interpolating its side’s endpoints gives. Declines are counted.

Recommended pipeline before axiolid_measure::cycle_volume_properties: weld vertices, drop degenerate elements, split T-junctions, with the same tolerance.

Structs§

TJunctionSplit
What split_t_junctions did.

Functions§

split_t_junctions
Split triangle edges at vertices lying on them within tolerance.