Skip to main content

Module validation

Module validation 

Source
Expand description

Whole-model consistency checks — as opposed to super::argument_validation, which checks a single euler operator call’s own arguments. Each check lives in its own file, one check per file. Every check function takes (params, errors, model) and pushes its own violations onto errors rather than returning on the first one, so validate always runs every check and reports everything wrong in one pass.

Modules§

numerical_accuracy

Structs§

ValidationParameters
Shared tuning knobs for the whole-model validation checks — how many points to sample along a curve, and the budgets passed down to the underlying BFS/DFS geometric searches.

Functions§

validate
validate_fast
A cheap subset of validate: only the checks that are purely structural/combinatorial (pointer validity, two-way next/prev/backref consistency, pcurve loop continuity) or a single pass over already-stored geometry (vertices vs. their edges’/faces’ curves/surfaces) — none of the O(n^2) pairwise numerical-intersection searches (disjointness_check, face_face_numerical_intersection) or the sampling-based curve_and_surface_sampling_check. Meant for call sites that want a quick “is this model still well-formed” check after every mutating step (e.g. a test sweeping many scenes) without paying for the searches that dominate validate’s cost.
validate_manifold
validate plus two extra whole-model sanity checks that go beyond per-entity consistency: every edge is shared by exactly two coedges (a precondition the whole contains module’s ray-parity strategy relies on), and — the check that actually exercises that strategy — every shell classifies a batch of random points identically no matter which (non-degenerate) random ray direction was used to test them.