Wave 16/509: brep: check_geometry, the geometric agreement of a record (and 3 more)

4 commits, squashed; the originals stay reachable from tag archive/merge-main-develop.

- b85b51e81 Brennen Herbruck: solidcraft-smlib: blend faces come from the edge they replace
- 4a6494b48 jyviko: brep: check_geometry, the geometric agreement of a record
- 570028f31 jyviko: brep: the truck adapter checks a record's geometry before decoding it
- 30f5e617c jyviko: brep: document check_geometry in the validation section

Co-authored-by: Brennen Herbruck <brennen.herbruck@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
This commit is contained in:
jyviko
2026-10-21 00:47:15 -04:00
parent af6528b420
commit d05b24fb5e
8 changed files with 403 additions and 7 deletions
+14
View File
@@ -189,6 +189,20 @@ onto their edges, that a closed shell is watertight or that shells nest as the
regions say. A backend's adapter checks what it needs. The binary reader bounds
bytes, allocation and nesting before creating these structures.
`Brep::check_geometry` spot-checks, on a record `validate` accepted, that its
geometry agrees with its topology, each distance against the record's own
tolerance: every edge's curve meets its start and end vertices at its interval's
ends (within the edge's and the vertex's tolerances together); every oriented
edge's pcurve, lifted through its face's surface, lies on the edge's curve at the
interval's ends and middle (within the edge's) and starts on the same period as
the use before it ends, except along a direction that collapses at a pole; every
vertex loop's vertex lies on its face's surface (within the vertex's). It makes a
fixed number of evaluations per record, so its work is linear in the item
budget, and a point it cannot evaluate is an error naming the record. It is not
a certificate either: between the points it checks, an edge may still leave its
surface. The truck adapter runs it before building topology, which truck does
without checks of its own.
Schema tests build and validate one minimal body of each form (an open sheet, a
closed shell, a seam edge, a vertex loop with a wire and a vertex shell, a void)
and one fixture per defect, without a kernel.