Vector kit command

shapeBuilder.regions

Shape Builder Regions

Answers the faces, line pieces and edges the Shape Builder sees among the selected or given paths, with their bounds and sources.

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

Parameters

Parameters of shapeBuilder.regions
NameTypeRequiredDescription
idintegernoobject ID
idsinteger[]noobject IDs

Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: id, ids. vector_run answers the step’s result in completed[i].result.

Result

Result of shapeBuilder.regions
NameTypeRequiredDescription
edgesobject[]no
linesany[]no
regionsobject[]no
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "edges": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "bounds": {
            "type": "array"
          },
          "source": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "lines": {
      "type": "array"
    },
    "regions": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "area": {
            "type": "number"
          },
          "bounds": {
            "type": "array"
          },
          "sources": {
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    }
  },
  "returns": "{regions: [{bounds: [x0,y0,x1,y1], area, sources: [id…]}], lines: [{bounds, source: id}], edges: [{bounds, source: id}]} faces of the planar arrangement (unfilled open paths cut them; sources is empty for an area only they enclose), the pieces of those open paths and the edges (the other paths' outlines cut where paths meet; source: the front-most path along it), which erasing deletes",
  "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.