---
title: "object.chamfer: Chamfer — CAD kit command — Kition"
description: "Bevels the corner between two lines by two distances or a length and angle, optionally trimming, or chamfers every polyline corner."
canonical: "https://developer.kition.ai/docs/kits/cad/commands/object.chamfer"
---

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

# object.chamfer

**Chamfer.** Bevels the corner between two lines by two distances or a length and angle, optionally trimming, or chamfers every polyline corner.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `angle` | `number` | no | degrees; in one of several forms of the parameters |
| `d1` | `number` | no |  |
| `d2` | `number` | no |  |
| `h1` | `string` | no |  |
| `h2` | `string` | no |  |
| `handle` | `string` | no |  |
| `length` | `number` | no |  |
| `p1` | `number[]` | no |  |
| `p2` | `number[]` | no |  |
| `polyline` | `boolean` | no | in one of several forms of the parameters |
| `trim` | `boolean` | no | in one of several forms of the parameters |

## Call through cad_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `angle`, `d1`, `d2`, `h1`, `h2`, `handle`, `length`, `p1`, `p2`, `polyline`, `trim`. 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": {
    "angle": {
      "description": "degrees; in one of several forms of the parameters",
      "type": "number"
    },
    "d1": {
      "type": "number"
    },
    "d2": {
      "type": "number"
    },
    "h1": {
      "type": "string",
      "x-khp-types": [
        "Entity"
      ]
    },
    "h2": {
      "type": "string",
      "x-khp-types": [
        "Entity"
      ]
    },
    "handle": {
      "type": "string",
      "x-khp-types": [
        "Entity"
      ]
    },
    "length": {
      "type": "number"
    },
    "p1": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "p2": {
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "polyline": {
      "default": true,
      "description": "in one of several forms of the parameters",
      "type": "boolean"
    },
    "trim": {
      "description": "in one of several forms of the parameters",
      "type": "boolean"
    }
  },
  "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).
