CAD kit command
grip.edit
Edit Grip
Starts editing a grip of a selected object in the editor, as a click on the grip does: the grip goes hot and the next point given places it. `mode` picks the grip mode (stretch, the default; move, rotate, scale or mirror, which act on the whole selection about the grip), and `option` answers the hot-grip prompt at once with one of its options that changes nothing yet (Base point, Copy, Reference, or the grip's own Lengthen at a line's or an arc's end, Radius at an arc's midpoint, Add vertex at a polyline's vertex or segment midpoint; Remove vertex and Convert to Line, which change the drawing at once, are answered at the prompt). It changes no drawing, only what the editor holds. The editor's grip menu calls it; an agent edits grips with the grip.* commands. Answers the prompt the edit asks now (no prompt when the option finished it).
- Kit
- CAD 0.1.0 (.dxf)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | no | |
index | number | no | |
mode | "stretch" | "move" | "rotate" | "scale" | "mirror" | no | |
option | string | no |
Call through cad_run
cad_run {
"path": "<file>.dxf",
"steps": [{ "command": "grip.edit" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: handle, index, mode, option. cad_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
prompt | string | no | the prompt the grip edit asks now ("STRETCH Specify stretch point or [...]:"); absent when the option finished the edit |
Result JSON Schema
{
"additionalProperties": true,
"properties": {
"prompt": {
"description": "the prompt the grip edit asks now (\"STRETCH Specify stretch point or [...]:\"); absent when the option finished the edit",
"type": "string"
}
},
"type": "object"
}Parameter schema
{
"additionalProperties": false,
"properties": {
"handle": {
"type": "string",
"x-khp-types": [
"Entity"
]
},
"index": {
"type": "number"
},
"mode": {
"enum": [
"stretch",
"move",
"rotate",
"scale",
"mirror"
],
"type": "string"
},
"option": {
"type": "string"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (cad_commands through @kition/[email protected], built from KitionAI/kition-cad@1ec542d). As data: commands.jsonl.