---
title: "object.trim: Trim — CAD kit command — Kition"
description: "Trims an object at its cutting edges where it is picked, fenced or crossed, in quick or standard mode."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/object.trim"
---

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

# object.trim

**Trim.** Trims an object at its cutting edges where it is picked, fenced or crossed, in quick or standard mode.

- Kit: CAD 0.1.0 (.dxf); reference: [CAD kit commands](https://developer.kition.ai/docs/kits/cad.md)
- Changes the document: yes
- Acts on: `handle` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `crossing` | `number[][]` | no | one of several alternative parameters |
| `edgeMode` | `"extend" \| "none"` | no |  |
| `edges` | `string[]` | no | handles |
| `fence` | `number[][]` | no | one of several alternative parameters |
| `handle` | `string` | no |  |
| `mode` | `"quick" \| "standard"` | no |  |
| `pick` | `number[]` | no |  |

## Call through cad_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `crossing`, `edgeMode`, `edges`, `fence`, `handle`, `mode`, `pick`. cad_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": {
    "crossing": {
      "description": "one of several alternative parameters",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "edgeMode": {
      "enum": [
        "extend",
        "none"
      ],
      "type": "string"
    },
    "edges": {
      "description": "handles",
      "items": {
        "type": "string"
      },
      "type": "array",
      "x-khp-types": [
        "Entity"
      ]
    },
    "fence": {
      "description": "one of several alternative parameters",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "handle": {
      "type": "string",
      "x-khp-types": [
        "Entity"
      ]
    },
    "mode": {
      "enum": [
        "quick",
        "standard"
      ],
      "type": "string"
    },
    "pick": {
      "items": {
        "type": "number"
      },
      "type": "array"
    }
  },
  "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).
