Expand description
Checking a shape against the model’s invariants.
Everything in docs/DATA_MODEL.md that can be checked with geometry in
hand, checked in one place. The builders enforce what they can at the moment
of construction; this catches what only becomes wrong later: an edge whose
tolerance was widened past its face’s, a shell left open by an operation
that dropped a face, a pcurve that has stopped agreeing with its curve.
§It reports, it does not judge
The result is a list of what is wrong and where, not a boolean. A boolean
answers “should I panic”, which is never the question: an imported shape is
usually invalid in some specific, fixable way, and healing it needs to know
which way. A caller that only wants the boolean asks
Diagnosis::is_valid.
§Severity is not a comment
Severity::Broken means an algorithm reading this shape will get a wrong
answer rather than an error: an open shell has no inside, so every
containment test against it is a coin toss. Severity::Suspect means
something is out of order but every operation will still behave: a tolerance
larger than the feature it describes is alarming and not yet wrong.
The distinction is what lets a pipeline decide. Booleans refuse Broken
input because they would produce nonsense from it; they proceed on
Suspect because refusing would reject most real imported geometry.
Structs§
Enums§
- Severity
- How badly a problem breaks the shape.
Functions§
- chart_
breaks - Where a face’s boundary does not close in its surface’s chart, each in
a sentence; none where it closes. The test
checkmakes of every face, for a builder asking it of the faces it made. A wirekeptnames is one the builder took over as it stood, and is not walked. - check
- Check a shape and everything below it.
- check_
kept check, probing faces’ orientation throughkept: a caller that checks a model, mends it and checks it again pays once for what the mend left alone.- check_
self_ intersection - Faces of one shape that reach each other without sharing topology: self-intersection, detected as the interference it is.
- check_
self_ intersection_ near check_self_intersectionover the pairs holding at least one ofnear: after an edit that moved some faces, the pairs of faces it left alone cannot have begun to cross.- check_
tessellation - Check that a shape’s tessellation agrees with its topology.
- inside_
out_ faces - The faces of a solid that face into its material.
- inside_
out_ faces_ kept inside_out_faces, throughkept: seecheck_kept.- restore_
containment - Restore tolerance containment below
shape: every edge widened to at least the faces it bounds, every vertex to at least the edges it bounds.