---
title: "shapeBuilder.merge: Shape Builder — Vector kit command — Kition"
description: "Merges (or erases) the regions a drag along points passes through, as the Shape Builder does; see shapeBuilder.regions for the regions."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/shapeBuilder.merge"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/shapeBuilder.merge](https://developer.kition.ai/docs/kits/vector/commands/shapeBuilder.merge)

# shapeBuilder.merge

**Shape Builder.** Merges (or erases) the regions a drag along points passes through, as the Shape Builder does; see shapeBuilder.regions for the regions.

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: yes
- Acts on: `ids` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `erase` | `boolean` | no | erase mode, Alt: deletes the regions touched, and the pieces of unfilled open paths and the edges (outline pieces between the points where paths meet; see shapeBuilder.regions) within tolerance; a deleted edge opens its path there, and edges bounding a deleted region go with it |
| `fill` | `string \| object` | no |  |
| `id` | `integer` | no | object ID |
| `ids` | `integer[]` | no | object IDs |
| `points` | `any[]` | no | drag path; one point = click |
| `tolerance` | `number` | no | points; 2, erase only |

## Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `erase`, `fill`, `id`, `ids`, `points`, `tolerance`. vector_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": {
    "erase": {
      "description": "erase mode, Alt: deletes the regions touched, and the pieces of unfilled open paths and the edges (outline pieces between the points where paths meet; see shapeBuilder.regions) within tolerance; a deleted edge opens its path there, and edges bounding a deleted region go with it",
      "type": "boolean"
    },
    "fill": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "points": {
      "description": "drag path; one point = click",
      "type": "array"
    },
    "tolerance": {
      "description": "points; 2, erase only",
      "type": "number"
    }
  },
  "returns": "{ids, merged, regions, lines, edges} (counts deleted or merged)",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
