CAD kit command

measure.angle

Angle

Measures the angle at a vertex between two points, or between two lines, in degrees.

Kit
CAD 0.1.0 (.dxf)
Changes the document
no

Parameters

Parameters of measure.angle
NameTypeRequiredDescription
h1stringno
h2stringno
p1number[]no
p2number[]no
vertexnumber[]no

Call through cad_run

text
cad_run {
  "path": "<file>.dxf",
  "steps": [{ "command": "measure.angle" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: h1, h2, p1, p2, vertex. cad_run answers the step’s result in completed[i].result.

Result

Result of measure.angle
NameTypeRequiredDescription
anglenumberno
messagestringno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "angle": {
      "type": "number"
    },
    "message": {
      "type": "string"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "h1": {
      "type": "string",
      "x-khp-types": [
        "Entity"
      ]
    },
    "h2": {
      "type": "string",
      "x-khp-types": [
        "Entity"
      ]
    },
    "p1": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "p2": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "vertex": {
      "items": {
        "type": "number"
      },
      "type": "array"
    }
  },
  "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.