Vector kit command
stroke.widthPoint.set
Width Point
Adds or moves a width point on a path's stroke at fraction t with left and right widths, as the Width tool does.
- 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 |
|---|---|---|---|
adjustAdjoining | boolean | no | with index: the nearest points either side change their widths in proportion |
id | integer | no | object ID |
index | integer | no | |
left | number | no | |
right | number | no | |
t | number | no | 0 to 1; fraction of the path length |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "stroke.widthPoint.set" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: adjustAdjoining, id, index, left, right, t. 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": {
"adjustAdjoining": {
"description": "with index: the nearest points either side change their widths in proportion",
"type": "boolean"
},
"id": {
"description": "object ID",
"type": "integer",
"x-khp-types": [
"Node"
]
},
"index": {
"type": "integer"
},
"left": {
"type": "number"
},
"right": {
"type": "number"
},
"t": {
"description": "0 to 1; fraction of the path length",
"type": "number"
}
},
"returns": "{index, id}. Without index a point already at t is replaced; a point moved onto another one's t joins it as a discontinuous point (on the side it came from), so the width steps there. Creates a uniform profile first if needed. A compound path member's id edits the stroke of its compound path, which draws it; `id` in the result is the object edited",
"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.