Historical Context & Motivation
Before the advent of computer-aided design, engineers and architects relied on parallel rulers, rolling straightedges, and manual measurement to produce parallel lines on drafting boards. The task of drawing a wall thickness, a road shoulder, or a pipe clearance demanded repeated measurement and careful hand-eye coordination — a process that was both tedious and error-prone. The Offset command in AutoCAD was conceived to automate precisely this operation, allowing a drafter to select any existing geometry and generate a parallel duplicate at an exact distance with a single action. Its development mirrors the broader evolution of CAD from simple digital drafting boards to intelligent parametric modeling environments.
The central question that the Offset command addresses is deceptively simple yet computationally rich: given an arbitrary planar curve — a line, an arc, a spline, or a composite polyline — how can software construct a geometrically faithful parallel curve at an exact specified distance? This question underpins workflows ranging from architectural wall layouts to PCB trace clearance design, and its answer touches on concepts from computational geometry that are directly relevant to a computer science curriculum.
Core Principles & Definitions
The Offset command creates a new object that is a parallel duplicate of a selected source object, positioned at a uniform perpendicular distance from every point on the original. Unlike the Copy command, which produces a congruent replica at a translation vector, Offset preserves the parallelism constraint: a line offsets to a line, a circle offsets to a concentric circle, and a polyline offsets to a similarly shaped polyline with adjusted vertex positions. Understanding the command requires grasping several foundational ideas.
Offset Distance
Side Selection
Equidistant Curve (Parallel Curve)
Supported Object Types
OFFSETGAPTYPE
Visual Explanation
The following diagram illustrates how the Offset command behaves on three fundamental geometry types: a straight line, a circle, and a polyline with mixed segments. Notice how the offset distance is measured perpendicularly from the source object to the resulting copy in every case. For the circle, offsetting inward decreases the radius and offsetting outward increases it by exactly the offset distance. For the polyline, each segment offsets independently and AutoCAD resolves the corner intersections.
In the diagram above, observe that a line's offset produces a perfectly parallel segment of the same length. A circle's offset is trivially a concentric circle whose radius is increased or decreased by the offset distance — a fact that follows directly from the definition of a circle as a constant-radius locus. The polyline case is the most computationally interesting: each straight or arc segment offsets independently, and the resulting segments may no longer meet at their original vertices. AutoCAD extends or trims them at corners, using the strategy governed by OFFSETGAPTYPE (0 = extend, 1 = fillet, 2 = chamfer). Understanding this behavior is essential when offsetting complex boundaries such as floor plans or roadway alignments.
Mathematical Framework
The Offset command is an implementation of the mathematical concept of an equidistant curve (also called a parallel curve or offset curve). Given a planar curve C(t) parameterized by t, the offset curve Cd(t) at distance d is obtained by translating each point along its unit normal vector. The mathematical treatment differs by geometry type, but a unified formula governs all cases.
From a computational geometry perspective, the offset of a composite polyline is the most challenging case. Each segment — whether a line or an arc — is offset independently using the appropriate formula above, producing a set of new segments that may not intersect at the original vertex positions. AutoCAD must then compute the intersection or extension of adjacent offset segments to form a valid closed or open polyline. At convex corners the offset segments diverge and must be extended (or filleted) to meet; at concave corners they may self-intersect and require trimming. This segment-by-segment offset-then-connect algorithm runs in O(n) time for a polyline of n segments, making it efficient even for complex building outlines with hundreds of vertices.
Offset Modes, Options & System Variables
AutoCAD's Offset command exposes several modes and system variables that give the user fine-grained control over behavior. Understanding these options is important for efficient drafting and for scripting Offset operations in AutoLISP or .NET plug-ins. The diagram below classifies the primary modes and the system variable that governs corner handling for polyline offsets.
| System Variable | Values | Effect |
|---|---|---|
OFFSETDIST | Any positive real number, or −1 for 'Through' | Stores the last-used offset distance. Setting it to −1 activates Through mode by default. |
OFFSETGAPTYPE | 0, 1, or 2 | Controls gap closure at polyline corners: 0 = extend, 1 = fillet, 2 = chamfer. |
OFFSETERASE | 0 (No) or 1 (Yes) | When set to 1, the source object is erased after the offset copy is created. |
| Layer option | Current or Source | Determines whether the offset result is placed on the current active layer or inherits the source object's layer. |
Worked Example — Offsetting a Floor Plan Wall
Suppose you have drawn the outer boundary of a rectangular room as a closed polyline measuring 12 m × 8 m. You need to create the inner wall face by offsetting this polyline inward by 0.3 m (a standard 300 mm masonry wall thickness). The resulting inner polyline will represent the interior surface of the walls. We will walk through the complete command sequence and verify the resulting dimensions.
OFFSET at the command prompt and press Enter. AutoCAD responds: "Specify offset distance or [Through/Erase/Layer]:" This is where you specify the perpendicular wall thickness.0.3 and press Enter. AutoCAD stores this as the active offset distance and prompts: "Select object to offset or [Exit/Undo]:"LIST command to confirm its vertex coordinates. The four corners should be at (0.3, 0.3), (11.7, 0.3), (11.7, 7.7), and (0.3, 7.7) — assuming the outer rectangle starts at the origin. The perimeter of the inner polyline is 2 × (11.4 + 7.4) = 37.6 m, compared to the outer perimeter of 2 × (12 + 8) = 40 m.(command "OFFSET" 0.3 (entlast) '(6 4) "") where '(6 4) is any interior point. This is valuable for batch processing hundreds of parcels or floor plans in a project directory.Strengths, Limitations & Comparisons
Offset is one of AutoCAD's most frequently used editing commands, but it is not universally applicable. Understanding when to use Offset versus alternatives like Copy, Array, or parametric constraints helps a drafter choose the most efficient tool for each situation. The table below compares Offset against its closest functional relatives in AutoCAD.
| Criterion | OFFSET | COPY | ARRAY (Path/Rectangular) |
|---|---|---|---|
| Geometry relationship | Parallel / equidistant | Congruent (identical shape, translated) | Congruent, repeated at intervals |
| Resulting shape | May differ (e.g., circle → larger circle) | Always identical to source | Always identical to source |
| Use case | Wall thicknesses, contour lines, buffer zones | Duplicating objects to new positions | Repeating patterns (bolts, columns, tiles) |
| Supports curved geometry | Yes — adjusts radius/curvature | Yes — copies unchanged | Yes — copies unchanged |
| Limitation | Cannot offset 3D solids, text, blocks, or hatches | No parallelism constraint; manual positioning | No parallelism; count-based, not distance-based |
Connection to Advanced CAD & Computational Geometry
AutoCAD's Offset command implements a relatively straightforward case of the general Minkowski sum operation from computational geometry. When you offset a 2D polygon outward by distance d, you are effectively computing the Minkowski sum of the polygon with a disk of radius d. This connection is deeply relevant to robotics (configuration-space obstacles), CNC toolpath generation (tool-radius compensation), and geographic information systems (buffer operations around spatial features). As you advance to parametric modeling in tools like Autodesk Inventor, Fusion 360, or SolidWorks, the offset concept evolves into the Shell command that offsets 3D surfaces to create hollow bodies with uniform wall thickness.
| Concept | 2D Offset (AutoCAD) | 3D / Advanced Equivalent |
|---|---|---|
| Operation | Offset a 2D curve by distance d along the normal | Shell a 3D solid inward/outward by thickness t |
| Input | Lines, arcs, circles, polylines, splines | 3D solid bodies (B-rep surfaces) |
| Corner handling | OFFSETGAPTYPE: extend / fillet / chamfer | Kernel-level blend or intersection logic |
| Algorithmic complexity | O(n) for polyline of n segments | O(n log n) or higher due to surface self-intersection detection |
| CS application | GIS buffer zones, 2D path planning | CNC toolpath compensation, 3D printing wall generation, robot configuration space |
If you pursue computational geometry or CAD kernel development, you will encounter the offset (or parallel curve) problem repeatedly. CGAL, the Computational Geometry Algorithms Library, provides robust offset implementations that handle degenerate cases — self-intersecting offsets, cusps, and topological changes — that AutoCAD's simpler approach does not fully expose to the user. Understanding how AutoCAD's Offset command works is an excellent gateway to these deeper algorithmic challenges.
Practice Problems
Offset — Key Concepts Review
The Offset command creates a parallel equidistant copy of lines, arcs, circles, and polylines at a specified perpendicular distance. Invoked via Distance mode (explicit numeric distance) or Through mode (click a point the offset must pass through), the command applies the formula Cd(t) = C(t) + d · n̂(t) to each point on the source curve. For polylines, the OFFSETGAPTYPE system variable (values 0, 1, 2) controls whether corners are handled by extension, filleting, or chamfering.
Offset is distinct from Copy (which creates congruent duplicates without parallelism) and Array (which creates repeated copies at intervals). Mathematically, a polygon offset is equivalent to a Minkowski sum with a disk, connecting this AutoCAD drafting tool to broader computational geometry concepts in robotics, CNC toolpath planning, and GIS buffer analysis. The 3D generalization is the Shell command in parametric solid modelers.