fix: reject non-finite isoValue and origin in Extract

samples and cellSize were validated but isoValue and origin were not:
iso = NaN or +inf silently returned an empty mesh, and origin = NaN gave
NaN positions. Extend Extract's existing top-of-method validation authority
to reject non-finite isoValue and non-finite origin components with
ArgumentException, matching the existing style, with tests for each
component.

Overflow at extreme magnitudes (cellSize ~3e38, or finite samples whose
interpolation overflows to inf) is a separate, float-domain limit rather
than a validated-input error; documented in the XML doc and provenance
notes, deliberately not range-checked.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-25 20:31:44 +02:00
commit d64de1b69d
3 changed files with 56 additions and 0 deletions

View file

@ -37,6 +37,10 @@ Deliberate behavior:
rule never looks at its geometry;
- non-finite `isoValue` or `origin` components are rejected, matching the
existing rejection of non-finite samples and cell size;
- an extreme but finite input (a `cellSize` near float's magnitude limit, or
finite samples whose interpolated position overflows to infinity) is a
float-domain overflow, not a validated input error, and is deliberately not
range-checked;
- vertices are welded: one vertex per active cell, shared by every quad
touching that cell;
- face-weighted normals sum each quad's diagonal cross product (unnormalized,