Skip to main content

Rectangle

The rectangle command draws an axis-aligned rectangle defined by two opposite corner clicks. The result is stored as a closed LWPOLYLINE with four vertices — one at each corner. There is no dedicated rectangle entity type: after creation the shape behaves exactly like any other Polyline and every polyline edit applies to it.

Drawing a rectangle

  1. Type rectangle in the terminal or click the Rectangle toolbar button.
  2. Click the first corner, or type X,Y and press Enter for an exact coordinate.
  3. Click the opposite corner — the rectangle is placed instantly and the command exits. Coordinate entry works here too.
● (first click)────────────┐
| |
| live preview follows |
| cursor after step 2 |
└──────────────────────────● (second click)

The two clicks can be any pair of diagonally opposite corners — top-left + bottom-right, or bottom-left + top-right, etc. The order does not matter.

Coordinate entry

At either corner step you can type an exact position:

  1. Type the X value.
  2. Press , — the terminal shows [X], [Y{cursor}].
  3. Type the Y value.
  4. Press Enter to place the corner.

Keyboard reference

KeyAction
09, ., -Start X coordinate entry
,Lock X and move to Y entry
EnterConfirm typed coordinate
EscapeCancel

The sides are always horizontal and vertical — there is no angle locking for the rectangle command.

Grip editing — reshaping after creation

A selected rectangle shows grips at every vertex and at the midpoint of each side:

GripPositionWhat it does
CornerEach of the 4 verticesDrag to move that vertex; the two adjacent sides stretch to follow — the opposite corner stays fixed
Side midpointCentre of each of the 4 sidesDrag to translate both endpoints of that side together, keeping the side's length and angle

Dragging a corner grip turns the rectangle into a non-rectangular quadrilateral. If you only need a rectangle that is a different size, drag a corner while keeping the sides roughly orthogonal, or delete it and draw a new one.

Selecting rectangles

Because the rectangle is a polyline, selection works the same way:

MethodBehaviour
ClickSelects if the click lands on any of the four sides
Drag right (strict)All four vertices must lie inside the selection box
Drag left (crossing)Any side that crosses the box boundary selects the whole rectangle

Supported edit commands

All polyline edit commands apply. Trim and Extend are Line-only and do not work on rectangles:

CommandWhat happens to the rectangle
MoveTranslates all four vertices by the same displacement
CopyCreates an identical rectangle at a new position
RotateRotates all four vertices around the chosen base point
MirrorReflects all four vertices across the mirror axis
ScaleScales all four vertices uniformly from the base point
OffsetCreates a parallel (inset or outset) rectangle at a fixed distance
DeleteRemoves the rectangle from the drawing

Properties

When a rectangle is selected the properties panel shows the same fields as any polyline:

General

PropertyDefaultMeaning
Color256 (ByLayer)ACI color index
Layer0Layer assignment
LinetypeByLayerNamed linetype pattern
Linetype Scale1Scale factor on the linetype pattern
Thickness0Extrusion thickness

Geometry

PropertyMeaning
ClosedAlways true for a rectangle
Vertex CountAlways 4 for an unmodified rectangle
VerticesCoordinates of all four corners

Rectangle vs Polyline vs Line

RectanglePolylineLine
How to draw2 clicks (corners)Click each vertexClick each endpoint
Entity typeClosed LWPOLYLINEOpen or closed LWPOLYLINELINE per segment
Sides always orthogonalYes (at creation)NoNo
Trim / ExtendNoNoYes
Best forBoxes, frames, rectangular areasArbitrary outlines and pathsIndividual segments, construction lines

DXF — LWPOLYLINE entity

Rectangles are saved as closed LWPOLYLINE entities with four vertices. All properties — vertex coordinates, color, layer, linetype, linetype scale, and thickness — round-trip without loss.

There is no dedicated RECTANGLE type in DXF. When a file is reopened, the shape appears as a closed four-vertex polyline rather than a rectangle. Any DXF viewer or editor that supports LWPOLYLINE (AutoCAD, LibreCAD, etc.) will display it correctly.