Review CAD Model
review_cadUse this when you need to review a mechanism for fitness and repair mode. Run the deterministic CAD review loop: evaluate the script, validate the assembly/mate graph, check mate connectors touch modeled material, sample declared mate limits, optionally check interferences at sampled poses, report connector workspace bounds, and return a mechanism fitness verdict for agent self-review. Fitness includes repairMode: none, local-fix, parameter-tune, or topology-redesign.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Inline kernelCAD script source. | |
| file | No | Path to a .kcad.ts script file. | |
| assembly | No | Assembly name; defaults to the first captured assembly. | |
| designGoal | No | Original user design prompt or goal. Included in suggestedRepairPrompt so topology-redesign repairs restart from the intended physical design instead of local coordinate nudges. | |
| epsilonMm3 | No | Interference volume threshold in mm^3. Default 0.01. | |
| combinatorial | No | Sample all 2^N limit-corner combinations across mates with declared limits. Capped at 8 mates with limits; combine with samplesPerMate for both interior coverage and worst-pose detection. Default false. | |
| samplesPerMate | No | Pose-envelope samples per declared-limit mate. 1 (default) = corners only; >=3 adds uniform interior points between min and max. Total samples per non-locked mate = samplesPerMate. | |
| gripperAperture | No | Optional fingertip connector refs for gripper aperture travel reporting. | |
| trackConnectors | No | Optional connector refs such as ["gripper-plate.tool-tip"] to limit connector workspace reporting. | |
| preserveInterfaces | No | External mates, connector refs, part names, or behavioral interfaces the repair agent must preserve during redesign. | |
| includeInterference | No | Whether sampled poses run BREP interference checks. Default true. | |
| includePoseEnvelope | No | Whether to sample declared mate limits. Default true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| fitness | No | Mechanism fitness verdict incl. repairMode. | |
| assembly | No | ||
| mechanism | No | ||
| validator | No | Assembly/mate-graph validator result. | |
| diagnostics | Yes | ||
| featureCount | Yes | ||
| poseEnvelope | No | Sampled mate-limit pose envelope. | |
| repairContext | No | ||
| gripperAperture | No | ||
| mechanismFailures | No | ||
| connectorWorkspace | No | Connector workspace bounds. | |
| rawInterferencePairs | No | ||
| suggestedRepairPrompt | No | Structured repair prompt (failure / repair path). |