# REGION in AutoCAD

> How AutoCAD's REGION (REG) turns closed shapes into regions, which loops it finds, why it makes none, and what a region is for. Try it free in your browser.

REGION turns closed shapes into regions: flat areas with no thickness, each bounded by its loops. Select the objects and press Enter; every loop they make becomes a region. A closed object is a loop of its own: a circle, an ellipse, a closed polyline or spline. Open ones — lines, arcs, elliptical arcs, open polylines and splines — are chained end to end, never where they cross, and a chain that does not close is dropped. The command line then counts the loops it found, those it rejected and why, and the regions it created; Enter on nothing says `None found.`.

The objects that went into a region are erased, the others kept, and the regions take the current layer and properties, not the objects'. A loop inside another makes a region of its own, not a hole in it: [`SUBTRACT`](https://mellowcad.com/docs/commands/subtract.md) takes one from the other. A region draws as its edges and snaps at them; the Properties palette shows its area and perimeter, which [`AREA`](https://mellowcad.com/docs/commands/area.md), [`LIST`](https://mellowcad.com/docs/commands/list.md) and [`MASSPROP`](https://mellowcad.com/docs/commands/massprop.md) measure too. [`UNION`](https://mellowcad.com/docs/commands/union.md), [`SUBTRACT`](https://mellowcad.com/docs/commands/subtract.md) and [`INTERSECT`](https://mellowcad.com/docs/commands/intersect.md) combine regions in one plane, [`EXTRUDE`](https://mellowcad.com/docs/commands/extrude.md), [`REVOLVE`](https://mellowcad.com/docs/commands/revolve.md) and [`PRESSPULL`](https://mellowcad.com/docs/commands/presspull.md) turn them into 3D solids, and [`EXPLODE`](https://mellowcad.com/docs/commands/explode.md) gives back their lines, arcs and circles. The whole command is one undo step.

- **Command:** `REGION`
- **Aliases:** `REG`
- **Panel:** [Draw](https://mellowcad.com/docs/commands.md#draw)
- **Try it:** [Open the editor](/draw), type `REG` 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.

Four lines closed end to end and a circle inside them: REGION, with a window round both, makes two regions and erases the objects.

```text
Command: REGION
Select objects:
Specify opposite corner:
Select objects:
2 loops extracted.
2 Regions created.
```

## What it does not do yet

AutoCAD's `DELOBJ`: the objects that went into a region are always erased here. BOUNDARY, which can make a region from the area round a point, and a region from a hatch's boundary. Editing a region by its grips: they show, but dragging one changes nothing. Its edges as a cutting or boundary edge for [`TRIM`](https://mellowcad.com/docs/commands/trim.md) and [`EXTEND`](https://mellowcad.com/docs/commands/extend.md) in Quick mode, and [`HATCH`](https://mellowcad.com/docs/commands/hatch.md) of a region with an elliptical or spline edge. Regions combined with surfaces, which MellowCAD does not have, and the Material row in the Properties palette.

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

## Questions

### How do I use the REGION command in AutoCAD?

Run REGION (or `REG`), select the closed shapes or the lines that close one end to end, and press Enter. The session's window round four lines and a circle makes two regions, and the command line counts two loops extracted and two regions created.

### Why does REGION not create a region?

The shape is not closed end to end. Lines that cross, or that stop short of one another, close nothing: REGION chains open objects only by their ends, and a gap of a hair is enough to drop the chain. A loop that crosses itself, like a bow tie, is rejected and counted under self intersections. Join the ends with [`FILLET`](https://mellowcad.com/docs/commands/fillet.md) at radius 0, or [`TRIM`](https://mellowcad.com/docs/commands/trim.md) what overshoots, and try again.

### How do I make a region with a hole?

Make a region of the outline and one of the hole, then run [`SUBTRACT`](https://mellowcad.com/docs/commands/subtract.md): pick the outline, Enter, the hole, Enter. The result is one region, and [`EXTRUDE`](https://mellowcad.com/docs/commands/extrude.md) turns it into a solid with the hole through it.

### How do I find the area of a region?

Select it and read Area in the Properties palette, or run [`AREA`](https://mellowcad.com/docs/commands/area.md), choose `Object` and pick it. [`MASSPROP`](https://mellowcad.com/docs/commands/massprop.md) adds the perimeter, the centroid and the moments of inertia.

## Practise it

- [AutoCAD 3D exercise: a mounting plate](https://mellowcad.com/docs/exercises/mounting-plate.md)

## Related commands

- [SUBTRACT in AutoCAD](https://mellowcad.com/docs/commands/subtract.md)
- [UNION in AutoCAD](https://mellowcad.com/docs/commands/union.md)
- [EXTRUDE in AutoCAD](https://mellowcad.com/docs/commands/extrude.md)
- [AREA in AutoCAD](https://mellowcad.com/docs/commands/area.md)
- [MASSPROP in AutoCAD](https://mellowcad.com/docs/commands/massprop.md)
