Planar diagnostics API
Planar diagnostics share the spatial severity contract. Invalid cell areas and
closure failures are errors; expected-ID handling distinguishes standard,
power, and undeclared (None) modes; and explicitly requested periodic edge
reciprocity is required. Marked analyses reset analyzer-owned edge flags before
recording current failures. Strict tessellation validation consumes final
TessellationDiagnostics.ok; optional reciprocity findings remain nonfatal.
pyvoro2.planar.diagnostics
Severity-complete planar tessellation diagnostics and sanity checks.
TessellationError
Bases: ValueError
Raised when planar tessellation sanity checks fail.
analyze_tessellation(cells, domain, *, expected_ids=None, mode=None, area_tol_rel=1e-08, area_tol_abs=1e-12, check_reciprocity=True, check_line_mismatch=True, line_offset_tol=None, line_angle_tol=None, mark_edges=True)
Analyze planar tessellation sanity and optionally annotate edges.
Missing expected IDs are errors in standard mode, informational hidden
cells in power mode, and warnings when mode=None. Requested periodic
reciprocity is required. Invalid cell areas and closure failures are
explicit errors. When marking is enabled, analyzer-owned edge flags are
reset before current findings are marked.
validate_tessellation(cells, domain, *, expected_ids=None, mode=None, level='basic', require_reciprocity=None, area_tol_rel=1e-08, area_tol_abs=1e-12, line_offset_tol=None, line_angle_tol=None, mark_edges=None)
Validate planar tessellation sanity using the final diagnostic policy.
Optional reciprocity inspection emits warning/info findings, while required
reciprocity emits errors. Strict validation raises exactly when the returned
diagnostics have ok=False.
:::