upxo.meshing.gbconformant.d3v2p0.tet_validation module

Read-only surface checks before attempting tetrahedral meshing.

upxo.meshing.gbconformant.d3v2p0.tet_validation.validate_tet_surfaces(surface, expected_grains=None, min_triangle_quality=0.05, check_intersections=False, minimum_facet_angle=0.1)[source]

Check a ClosedRVE; return JSON-compatible diagnostics and bad face IDs.

Manifoldness is assessed per grain: a shared triple line is valid in the global complex. Vertex links catch point pinches missed by edge incidence. Optional intersection checks use floating-point geometric predicates. This is a preliminary check, not an exact intersection/clearance certification or a guarantee that Gmsh will produce valid tetrahedra. No geometry is modified.