Vector kit command
path.curvatureEdit
Curvature
Edits a path as the Curvature tool does: moves, inserts or extends anchors, or closes it, keeping the curve smooth elsewhere.
- Kit
- Vector 0.1.0 (.kvector)
- Changes the document
- yes
- Acts on
id(one id), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
anchor | integer | no | |
end | "start" | "end" | no | |
from | "keep" | "smooth" | "corner" | no | |
id | integer | no | object ID |
op | "move" | "insert" | "extend" | "close" | no | |
segment | integer | no | |
subpath | integer | no | |
t | number | no | |
x | number | no | |
y | number | no |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "path.curvatureEdit" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: anchor, end, from, id, op, segment, subpath, t, x, y. vector_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"anchor": {
"type": "integer"
},
"end": {
"enum": [
"start",
"end"
],
"type": "string"
},
"from": {
"enum": [
"keep",
"smooth",
"corner"
],
"type": "string"
},
"id": {
"description": "object ID",
"type": "integer",
"x-khp-types": [
"Node"
]
},
"op": {
"enum": [
"move",
"insert",
"extend",
"close"
],
"type": "string"
},
"segment": {
"type": "integer"
},
"subpath": {
"type": "integer"
},
"t": {
"type": "number"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"returns": "{anchor}. move: anchor to x, y, re-curving only its two segments; insert: a smooth anchor at t on segment, the shape unchanged (with x, y: then moved there); extend: an open subpath goes on from its end (default) or start to a new end at x, y; close: an open subpath closes from that end. The old end bends into the new segment as from says: keep its curve (default), smooth through its neighbours, or a corner",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.