Verify Design
verifyUse this when you need to check a design against a rule set. One verifier, selected by check:
'assembly' — mate-aware assembly validator on the active session (run evaluate_script first).
'urdf' — structural validity of a .urdf file ({ urdf_path }).
'dfm' — print-readiness gates declared by dfmSpec() ({ file | code }).
'dfm-preflight' — sheet-metal flat pattern vs a job-shop's ordering rules ({ vendor, material, thicknessIn|thicknessMm, ... }).
'swept-collision' — sweep declared joint range(s) and report colliding poses.
'reachable' — inverse-kinematics reachability for an end-effector ({ tip_link, target_position, ... }).
'mounting-holes' — fastened mates expose matching hole diameters on both sides.
'load-capacity' — closed-form Euler-Bernoulli beam stress / safety-factor check ({ loads, materials, ... }). All params except
checkare check-specific and forwarded verbatim; each check fails closed on its own missing required params.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dxf | No | check:'dfm-preflight' — path to a DXF file. | |
| code | No | Inline kernelCAD script source (same checks as `file`). | |
| file | No | Path to a .kcad.ts script (assembly/dfm/dfm-preflight/swept-collision/reachable/mounting-holes/load-capacity). | |
| mode | No | check:'load-capacity' — 'beam' (default) or 'stub'. | |
| seed | No | check:'reachable' — numeric IK seed pose (joint name -> deg/mm). | |
| check | Yes | Which verification to run. | |
| joint | No | check:'swept-collision' — joint to sweep; omit to sweep every declared joint. | |
| loads | No | check:'load-capacity' — partName -> { force?: [Fx,Fy,Fz] N, torque?: [Tx,Ty,Tz] N*m }. | |
| range | No | check:'swept-collision' — [lower, upper, step] in joint-native units. | |
| vendor | No | check:'dfm-preflight' — vendor SKU (required for that check). | |
| service | No | check:'dfm-preflight' — service. | |
| assembly | No | Assembly name; defaults to the first captured assembly. | |
| material | No | check:'dfm-preflight' — material SKU (required for that check). | |
| tip_link | No | check:'reachable' — end-effector part name (required for that check). | |
| featureId | No | check:'dfm-preflight' — FeatureId to scope to. | |
| materials | No | check:'load-capacity' — partName -> material declaration. | |
| urdf_path | No | check:'urdf' — path to the .urdf file. | |
| thicknessIn | No | check:'dfm-preflight' — material thickness in inches. | |
| thicknessMm | No | check:'dfm-preflight' — material thickness in millimeters. | |
| prefer_solver | No | check:'reachable' — force the IK path ('auto' default). | |
| max_iterations | No | check:'reachable' — numeric-path iteration cap. | |
| refreshCatalog | No | check:'dfm-preflight' — force vendor catalog refresh. | |
| target_position | No | check:'reachable' — target [x, y, z] mm (world frame). | |
| target_orientation | No | check:'reachable' — target XYZ Euler angles in radians. | |
| position_tolerance_mm | No | check:'reachable' — position tolerance in mm. | |
| collision_tolerance_mm3 | No | check:'swept-collision' — BREP intersection volume tolerance (mm^3). | |
| safety_factor_threshold | No | check:'load-capacity' — pass/fail safety-factor floor (default 1.5). | |
| orientation_tolerance_rad | No | check:'reachable' — orientation tolerance in radians. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the verification ran and passed its gate. | |
| error | No | Failure message (present on failure). | |
| errorCode | No | ||
| diagnostics | No | Verifier diagnostics (most checks). |