cad_validate
Detect geometric errors and interferences, inspect topology, and retrieve CAD document metrics for validation.
Instructions
Validate geometry, detect interference, inspect topology or fetch metrics.
聚合校验操作。按 ``action`` 派发:geometry / interference / topology / metrics。
- ``geometry``: check objects for self-intersections, degenerate faces and
non-manifold edges (optional ``object_ids`` filter); returns issues with
``type`` / ``location`` / ``fix_suggestion``.
- ``interference``: detect box-box overlaps between objects, with overlap
volume per pair.
- ``topology``: per-object vertex/edge/face counts and manifold status.
- ``metrics``: aggregate document stats (files, objects, layers, bbox,
kinds) for the current session.
When not to use: ``cad_validate`` analyzes correctness and aggregates.
For simple geometric measurements (distance / area) use ``cad_measure``;
for live server/file/object status use ``cad_status``; for JSON scene
validation against the schema use ``cad_json`` (action=validate).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Validation action to perform, discriminated by `action`: geometry, interference, topology or metrics. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | Document bounding box | |
| files | No | Open files | |
| kinds | No | Object count by kind | |
| pairs | No | Interfering pairs | |
| valid | No | Whether all checked objects are valid | |
| action | Yes | Validation action executed | |
| issues | No | Detected issues | |
| layers | No | Total layers | |
| status | Yes | Operation status | |
| checked | No | Number of objects checked | |
| message | No | Status description | |
| objects | No | Total objects | |
| warnings | No | Topology warnings | |
| summaries | No | Per-object topology | |
| object_count | No | Number of objects | |
| total_volume | No | Sum of all overlap volumes | |
| interference_count | No | Number of interfering pairs |