Skip to main content

Module verify

Module verify 

Source
Expand description

Geometric verification: assert that a diff matches expectations.

Turns the structured geometric diff into a flat map of named metrics, then evaluates simple assertions (metric op value) against them. This is the “judge” an AI agent or CI gate needs: declare what the edit should do, get a pass/fail.

Metric keys come from the diff:

  • STEP/STP: volume_a, volume_b, volume_delta, added_volume, removed_volume, common_volume, area_a, area_b, faces_a, faces_b, faces_added, faces_removed, faces_common.
  • STL/OBJ: added_tris, removed_tris, unchanged_tris, bbox_dx, bbox_dy, bbox_dz.

Structs§

Check
A single parsed assertion, e.g. added_volume > 100.
CheckResult
The result of one check.
VerifyReport
The full verification outcome.

Enums§

Op
Comparison operator in an assertion.

Functions§

evaluate
Evaluate checks against metrics. With no checks, pass is true (a pure “describe the metrics” call).
metrics_from_geom
Flatten a B-Rep (STEP) geometric diff into named metrics.
metrics_from_mesh
Flatten a mesh (STL/OBJ) geometric diff into named metrics.
parse_check
Parse an assertion of the form <metric><op><value> (whitespace optional), e.g. added_volume>100, faces_added == 3, removed_volume <= 0.5.