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. Runs within timeBudgetMs (default 90 s): stages that did not fit are listed in skippedStages (their checks did not run; mechanism is then unverified) and stageTimingsMs shows per-stage cost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Inline kernelCAD script source. | |
| file | No | Path to a .kcad.ts script file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project. | |
| 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. | |
| timeBudgetMs | No | Wall-clock budget for the review in ms (default 90000). Once spent, the remaining heavy stages (pose envelope, physical use case, mechanism sweep) are skipped and listed in skippedStages — a partial result instead of a timeout. stageTimingsMs reports where the time went. | |
| 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. | |
| requirePhysicalUseCase | No | When true, articulated assemblies must declare arm.physicalUseCase(...) evidence: loads, contacts, stable parts, and actuator limits. | |
| includePhysicalUseCaseStatics | No | Run opt-in pose-bound quasi-static certification at the exact common-contact samples: conservative friction/capacity, world force and moment balance, and finite-difference revolute actuator torque. Returns physicalUseCaseStaticCertificates on success; sampled linearized failures remain blocking diagnostics. | |
| includePhysicalUseCaseReachability | No | Run targeted physical-use-case reachability sampling over scalar-limited mates named in actuatorLimits. Reject contacts that cannot get within criteria.maxSlipMm and multi-contact use cases that cannot satisfy every contact in the same sampled actuator pose. Samples revolute/cylindrical/pin-slot limitsDeg and prismatic limitsMm. Defaults to requirePhysicalUseCase. | |
| includePhysicalUseCaseJointReactions | No | Derive exact-pose reaction wrenches through uniquely rooted articulated trees and compare every loaded mate against a complete declared resultant force/moment envelope. Implies physical-use-case reachability and statics. | |
| includePhysicalUseCaseJointStructure | No | Run geometry/material clevis double-shear, pin-bending, bearing, tear-out, and net-section checks with minimum factor of safety 2. Unsupported axial or perpendicular-moment load cases remain blockers. Implies joint reactions, statics, and reachability. | |
| physicalUseCaseReachabilitySamplesPerMate | No | Samples per scalar-limited actuator mate for physical-use-case contact reachability. Samples revolute/cylindrical/pin-slot limitsDeg and prismatic limitsMm. Default 3; total targeted combinations are capped. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||