upxo.meshing.gbconformant.d3v2p0.surface_quality module
Improve surface slivers by guarded, ownership-preserving diagonal flips.
- upxo.meshing.gbconformant.d3v2p0.surface_quality.improve_surface_quality(surface, enabled=True, minimum_quality=0.05, max_passes=10, minimum_facet_angle=0.1, progress=None)[source]
Flip interior diagonals without moving nodes or changing patch ownership.
Every accepted pair improves its minimum triangle quality. Shared grain junction edges and RVE patch boundaries cannot flip. Independent proposals are checked against the whole complex; proposals involved in an intersection are rolled back. This guards changed triangles, not pre-existing defects in untouched triangles: run the full tetrahedral surface validation afterwards. Nonplanar flips can change local interface shape and individual grain volumes.