---
title: "object.measure: Measure Entities — CAD kit command — Kition"
description: "Measures without changing anything: each entity's bounding box (`bounds`: handles), the minimum distance between two entities or points with the nearest points (`distance`: [a, b], each a handle or [x, y]), the points where two entities cross (`intersections`: [a, b] handles), or the pairs of duplicate objects in a space (`overlaps`: {layout?}, Model unless named; OVERKILL's report, nothing deleted). Give exactly one."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/object.measure"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/cad/commands/object.measure](https://developer.kition.ai/docs/kits/cad/commands/object.measure)

# object.measure

**Measure Entities.** Measures without changing anything: each entity's bounding box (`bounds`: handles), the minimum distance between two entities or points with the nearest points (`distance`: [a, b], each a handle or [x, y]), the points where two entities cross (`intersections`: [a, b] handles), or the pairs of duplicate objects in a space (`overlaps`: {layout?}, Model unless named; OVERKILL's report, nothing deleted). Give exactly one.

- Kit: CAD 0.1.0 (.dxf); reference: [CAD kit commands](https://developer.kition.ai/docs/kits/cad.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `bounds` | `string[]` | no | entities' handles |
| `distance` | `(string \| number[])[]` | no | two entities (handles) or points ([x, y]) |
| `intersections` | `string[]` | no | two entities' handles |
| `overlaps` | `object` | no | the space to report duplicates in |

## Call through cad_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `bounds`, `distance`, `intersections`, `overlaps`. cad_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `bounds` | `object[]` | no |  |
| `distance` | `number` | no |  |
| `from` | `number[]` | no |  |
| `pairs` | `object[]` | no |  |
| `points` | `number[][]` | no |  |
| `to` | `number[]` | no |  |

```json
{
  "additionalProperties": false,
  "properties": {
    "bounds": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "handle": {
            "type": "string"
          },
          "max": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "min": {
            "items": {
              "type": "number"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "distance": {
      "type": "number"
    },
    "from": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "pairs": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "a": {
            "type": "string"
          },
          "b": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "points": {
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "to": {
      "items": {
        "type": "number"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "bounds": {
      "description": "entities' handles",
      "items": {
        "type": "string"
      },
      "type": "array",
      "x-khp-types": [
        "Entity"
      ]
    },
    "distance": {
      "description": "two entities (handles) or points ([x, y])",
      "items": {
        "oneOf": [
          {
            "description": "an entity's handle",
            "type": "string"
          },
          {
            "description": "a point [x, y]",
            "items": {
              "type": "number"
            },
            "type": "array"
          }
        ],
        "x-khp-role": "object",
        "x-khp-types": [
          "Entity"
        ]
      },
      "type": "array"
    },
    "intersections": {
      "description": "two entities' handles",
      "items": {
        "type": "string"
      },
      "type": "array",
      "x-khp-types": [
        "Entity"
      ]
    },
    "overlaps": {
      "additionalProperties": false,
      "description": "the space to report duplicates in",
      "properties": {
        "layout": {
          "description": "a layout's name, or \"Model\" (the default)",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "returns": "bounds | {distance, from, to} | {points} | {pairs}",
  "type": "object"
}
```

Generated from the command list of @kition/cad-darwin-arm64@0.1.0 and the kit itself (cad_commands through @kition/cli@0.1.1, built from KitionAI/kition-cad@1ec542d).
