verify_against_spec
Verify built-part size against drawing spec by comparing bounding box dimensions with tolerance. Catches common invisible error: correct shape but wrong size.
Instructions
Verifica el TAMAÑO de la pieza construida contra el spec del dibujo.
ADVISORY — el ÚNICO chequeo independiente de verdad-de-tierra en el loop: mide el sólido construido (get_bounding_box) y lo compara numéricamente, con tolerancia, contra las dimensiones que transcribiste del dibujo. Convierte el "se ve bien" visual sin dimensiones en una aserción dura de envolvente — atrapa la clase de error más común e invisible: forma correcta, tamaño equivocado.
Args: expected_size_mm: tres extensiones esperadas [a, b, c] en mm, en CUALQUIER orden (con match_by="sorted"). tolerance_mm: banda mínima por eje (default 0.5mm). tolerance_pct: banda relativa por eje; se usa max(mm, pct). Default 1%. expected_volume_mm3: opcional — chequeo de volumen SOLO de orden de magnitud (nunca cambia el veredicto; evita falsos positivos por chaflanes/redondeos legítimos). Útil para detectar errores de unidades. match_by: "sorted" (default, robusto a orientación) o "positional".
Returns dict: {ok, verdict PASS/FAIL, per_axis (deltas), measured_size_mm, volume?, caveats[], message, bbox}. LEE los caveats: la caja NO ve features en ubicación incorrecta del mismo tamaño, topología incorrecta, ni errores que conservan el envolvente. Es un oráculo entre varios, no la corrección total.
[en: Verify built-part SIZE against the drawing spec. Advisory — the first independent ground-truth check in the loop: measures the solid via get_bounding_box and asserts it against transcribed dims within tolerance, turning a dimensionless visual "match" into a hard envelope assertion. Catches the most common, most invisible failure: right shape, wrong size. Optional volume check is order-of-magnitude only (never flips the verdict). Read the caveats — bbox cannot see wrong-location, wrong-topology, or envelope-preserving errors.]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match_by | No | sorted | |
| tolerance_mm | No | ||
| tolerance_pct | No | ||
| expected_size_mm | Yes | ||
| expected_volume_mm3 | No |