Skip to main content

Module check

Module check 

Source
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§

Diagnosis
Everything wrong with a shape.
Problem
One thing wrong with a shape.

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 check makes of every face, for a builder asking it of the faces it made. A wire kept names 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 through kept: 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_intersection over the pairs holding at least one of near: 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, through kept: see check_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.