# Add Rectangle (`geometry.addRectangle`)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/commands/geometry-addRectangle/)

**Menu:** none (Quick Open, the CLI, Python and MCP) · **Runs as:** at once

> Preview: turn on Preview features in Edit › Preferences › Simulation, or run `preview.set {"enabled":true}`. Its replies carry `preview: true` and a note.

## What it does

Adds the axis-aligned rectangle as four segments, reusing points and segments it shares with the drawing. One undo step.

## Parameters

- `min`: \[number\] (one corner, x, y in m)
- `max`: \[number\] (the opposite corner)
- `snap`: number? (grid, m)

## Reply

- added:\[int\] (the edges: bottom, right, top, left)
- ...summary
