Diff CAD Scripts
diff_scriptsUse this when you need to see exactly what changed between two script versions. Structured geometric delta between two versions of a kernelCAD script — a baseline ({ baseFile } or { baseCode }) and a revision ({ file } or { code }). Returns agent-readable JSON: per-part added/removed/renamed/changed (volume mm³ + exact bbox deltas, numbers matching inspect({ of: 'part-stats' })), total interference-volume delta with per-pair detail, mate-graph changes (added/removed/changed mates incl. type, connectors, pose, limits), and param changes (value/min/max). Single-shape scripts diff as one "(root)" pseudo-part. Use after editing a script to verify exactly what changed physically before re-rendering. Read-only — never touches the active session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Revised script — inline source. | |
| file | No | Revised script — path to a .kcad.ts file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project. | |
| baseCode | No | Baseline script — inline source. | |
| baseFile | No | Baseline script — path to a .kcad.ts file. Hosted server: cannot read files from your machine — pass `code`, or `project:<slug>` for a saved project. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||