# RECTANG in AutoCAD

> How AutoCAD's RECTANG (REC) draws a rectangle: two corners, Dimensions, Area and Rotation, rounded with Fillet or cut with Chamfer. Try it free in your browser.

RECTANG draws a rectangle from two opposite corners, picked or typed: `0,0` then `100,50`, relative to the first under dynamic input, makes one 100 by 50. It is one closed polyline of four vertices, made on the current layer. The first prompt's options set how the next rectangles are drawn, and each keeps its value for the rest of the session: the next RECTANG says the ones in force in its first line. Its width option gives every side a polyline width. While you place the other corner, the rectangle follows the cursor; with dynamic input on, you can type its length, Tab, and its width.

- **Command:** `RECTANG`
- **Aliases:** `REC`, `RECTANGLE`
- **Panel:** [Draw](https://mellowcad.com/docs/commands.md#draw)
- **Try it:** [Open the editor](/draw), type `REC` and press Enter.

## At the command line

The engine draws it and writes its history as you would type it: the prompts in AutoCAD 2027's order, with the same option letters.

Two rectangles from two corners, the second typed relative to the first: one with Fillet 8, the next with Chamfer 8.

```text
Command: RECTANG
Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: F
Specify fillet radius for rectangles <0.00>: 8
Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: 0,0
Specify other corner point or [Area/Dimensions/Rotation]: @80,50
Command: RECTANG
Current rectangle modes:  Fillet=8.00
Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: C
Specify first chamfer distance for rectangles <8.00>: 8
Specify second chamfer distance for rectangles <8.00>:
Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: 100,0
Specify other corner point or [Area/Dimensions/Rotation]: @80,50
```

## Options

### `Chamfer` (`C`)

Asks a first and a second chamfer distance, and cuts each corner by them: eight vertices. A distance of 0 turns it off. It replaces Fillet.

### `Elevation` (`E`)

Asks the height the rectangle is drawn at, its Z.

### `Fillet` (`F`)

Asks a radius and rounds each corner by it. A radius of 0 turns it off. It replaces Chamfer.

### `Thickness` (`T`)

Asks a thickness: the rectangle stands that high, as a wall would, in a 3D view.

### `Area` (`A`)

At the other corner: asks the area, then whether to give the `Length` or the `Width`, then that side. The other side is worked out, the corners counted in, and the rectangle is made at once.

### `Dimensions` (`D`)

At the other corner: asks the length and the width, then a point that sets in which direction from the first corner the rectangle lies.

### `Rotation` (`R`)

At the other corner: asks the angle the rectangle is turned to, typed or as a point from the first corner, or two points with `Pick`. The angle is kept for the session.

## What it does not do yet

A length or width of 0 under `Area`, which here draws nothing and in AutoCAD draws a broken polyline. After a refused answer at Rotation's prompt, MellowCAD asks the prompt again in full, where AutoCAD writes nothing more.

[What it does and still lacks, in detail (in English)](https://github.com/ovelilla/mellowcad/blob/main/docs/coverage/draw.md#rectang--rec--rectangle--es-rectang--rec--rectangle--pt-br-retangulo--ret)

## Questions

### What is the shortcut for RECTANG in AutoCAD?

`REC`, then Enter or Space; `RECTANGLE` works too. The full name works as well, and `_RECTANG` in any language of AutoCAD.

### How do I draw a rectangle with exact dimensions?

Give the first corner, then type the other one relative to it: `100,50` with dynamic input on, as it starts, or `@100,50` without, makes it 100 long and 50 wide. Or choose `Dimensions` and type the two sides.

### How do I draw a rectangle with rounded corners?

Choose `Fillet` at the first prompt and type the radius, then give the two corners.

### Why does my rectangle come out with rounded or cut corners?

RECTANG keeps Fillet and Chamfer for the session, so a rectangle drawn after one carries it too: its first line says so. Choose `Fillet` and type `0` to draw plain corners again.

### Is a rectangle a polyline in AutoCAD?

Yes: one closed polyline. [`EXPLODE`](https://mellowcad.com/docs/commands/explode.md) breaks it into four lines, and [`OFFSET`](https://mellowcad.com/docs/commands/offset.md) offsets it whole.

## Related commands

- [POLYGON in AutoCAD](https://mellowcad.com/docs/commands/polygon.md)
- [PLINE in AutoCAD](https://mellowcad.com/docs/commands/pline.md)
- [EXPLODE in AutoCAD](https://mellowcad.com/docs/commands/explode.md)
- [FILLET in AutoCAD](https://mellowcad.com/docs/commands/fillet.md)
