Vector kit command

object.setLiveShape

Live Shape Properties

Edits live shape properties of the selected or given shapes: corner radius and kind per corner, polygon sides and angle, pie start and end angles.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of object.setLiveShape
NameTypeRequiredDescription
cornersany[]no
idintegernoobject ID
idsinteger[]noobject IDs
invertPiebooleannoswaps them: the other part of the ellipse
itemsobject[]noseveral objects, each with its own corners, in place of ids and corners: the canvas's corner widgets across a selection
kind"round" | "invertedRound" | "chamfer"no
makeSidesEqualbooleannoa polygon scaled unevenly: drops the uneven scale and shear, keeping its centre, angle and mean radius
pieEndnumbernodegrees; an ellipse's pie, counterclockwise from 3 o'clock; 0 to 360 is the whole ellipse
pieStartnumberno
polygonAnglenumbernodegrees; counterclockwise from its first vertex straight up
polygonRadiusnumbernopoints; centre to vertex
radiusnumbernopoints
sideLengthnumbernopoints; sets the radius
sidesintegerno

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "object.setLiveShape" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: corners, id, ids, invertPie, items, kind, makeSidesEqual, pieEnd, pieStart, polygonAngle, polygonRadius, radius, sideLength, sides. 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": {
    "corners": {
      "type": "array"
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "invertPie": {
      "default": true,
      "description": "swaps them: the other part of the ellipse",
      "type": "boolean"
    },
    "items": {
      "description": "several objects, each with its own corners, in place of ids and corners: the canvas's corner widgets across a selection",
      "items": {
        "additionalProperties": true,
        "properties": {
          "corners": {
            "type": "array"
          },
          "id": {
            "description": "object ID",
            "type": "integer",
            "x-khp-role": "object",
            "x-khp-types": [
              "Node"
            ]
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "kind": {
      "enum": [
        "round",
        "invertedRound",
        "chamfer"
      ],
      "type": "string"
    },
    "makeSidesEqual": {
      "default": true,
      "description": "a polygon scaled unevenly: drops the uneven scale and shear, keeping its centre, angle and mean radius",
      "type": "boolean"
    },
    "pieEnd": {
      "description": "degrees; an ellipse's pie, counterclockwise from 3 o'clock; 0 to 360 is the whole ellipse",
      "type": "number"
    },
    "pieStart": {
      "type": "number"
    },
    "polygonAngle": {
      "description": "degrees; counterclockwise from its first vertex straight up",
      "type": "number"
    },
    "polygonRadius": {
      "description": "points; centre to vertex",
      "type": "number"
    },
    "radius": {
      "description": "points",
      "type": "number"
    },
    "sideLength": {
      "description": "points; sets the radius",
      "type": "number"
    },
    "sides": {
      "type": "integer"
    }
  },
  "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.