Historical Context & Motivation
The evolution of Trim and Extend commands in AutoCAD mirrors the broader trajectory of computer-aided design from simple command-line utilities to sophisticated, context-aware editing environments. Early CAD systems of the 1970s and 1980s required users to manually calculate intersection points and redraw geometry whenever they needed to shorten or lengthen objects relative to cutting or boundary edges. This tedious workflow motivated Autodesk to develop automated trim and extend operations that would allow designers to specify boundary objects and then select which segments to remove or grow. Over successive releases, these commands accumulated advanced options — Edge mode, Project mode, and flexible selection methods — that dramatically expanded their utility for complex drawings.
The central question these advanced options address is straightforward but consequential: how can a drafter efficiently and precisely edit geometry that does not physically intersect its intended boundary, or that must be edited en masse? Without the Edge, Project, and Fence capabilities, users working on complex floor plans, circuit board layouts, or 3D wireframe models would face a combinatorial explosion of manual edits — a workflow bottleneck that these options systematically eliminate.
Core Principles & Definitions
Before exploring the advanced options, it is essential to establish a precise vocabulary. The TRIM command removes the portion of an object that crosses a designated cutting edge, while the EXTEND command lengthens an object until it meets a designated boundary edge. Both commands share a two-phase interaction model: first, select the edge objects; second, select the objects to be trimmed or extended. The advanced options modify either the edge interpretation (how AutoCAD defines the boundary), the projection plane (the coordinate system used to compute intersections), or the selection method (how you pick objects to edit).
Edge Mode
Project Mode
Fence Selection
Crossing Selection
Quick vs. Standard Mode
Mode at the command prompt switches back to Standard mode, where you explicitly pick cutting/boundary edges before selecting objects to edit.Visual Explanation — Edge Mode in Action
EDGEMODE = 0, the yellow line cannot be extended because it does not physically intersect the violet cutting edge. Right panel: with EDGEMODE = 1, AutoCAD projects the cutting edge along its natural path (dashed line) and computes an implied intersection, allowing the yellow line to be extended to meet it.The diagram above illustrates the fundamental difference between the two Edge mode settings. In the left panel, EDGEMODE = 0 enforces strict physical intersection: if the object to be trimmed or extended does not actually cross or touch the cutting/boundary edge, the operation fails silently. In the right panel, EDGEMODE = 1 tells AutoCAD to extrapolate the cutting edge infinitely along its geometric trajectory — the dashed violet line — and compute the hypothetical intersection point. This is particularly useful when working with construction lines that deliberately do not extend all the way across a drawing, or when boundary edges terminate before reaching all of the objects you need to modify. Note that implied extension respects the geometry type: lines extend linearly, arcs extend along their parent circle, and so on.
How It Works — Intersection Computation & Projection
The Intersection Engine
Under the hood, both TRIM and EXTEND rely on AutoCAD's geometric intersection engine, which solves the system of parametric equations defining two curves to find their point(s) of intersection. For two line segments defined by endpoints, this reduces to finding the parameter values t and s at which the lines coincide. When Edge mode is set to Extend (implied), AutoCAD relaxes the constraint that t and s must lie within [0, 1] for the cutting edge, effectively treating the edge as an infinite line rather than a bounded segment.
PROJMODE and 3D Projection
The PROJMODE system variable controls how AutoCAD resolves intersections when objects exist at different Z-elevations in 3D space. With PROJMODE = 0 (None), the engine requires a true 3D intersection — the objects must physically cross in three-dimensional space. With PROJMODE = 1 (UCS), AutoCAD projects all geometry onto the XY plane of the current User Coordinate System before computing intersections. With PROJMODE = 2 (View), objects are projected onto the current viewport's view plane. The UCS projection is effectively a parallel projection that collapses the Z-coordinate, while the View projection collapses geometry along the viewing direction vector.
Selection Methods — Fence, Crossing, and Individual Pick
Selection methods determine how you designate which objects to trim or extend after the cutting/boundary edges have been established. The default method is individual picking — clicking each object segment one at a time — which is precise but slow. AutoCAD provides two powerful alternatives that dramatically improve throughput when editing dense geometry: the Fence selection and the Crossing window. Both are available at the "Select object to trim/extend" prompt by typing F for Fence or C for Crossing.
| Selection Method | Trigger | Best Used When | Limitations |
|---|---|---|---|
| Individual Pick | Click each object | Precise, selective trimming of a few objects | Extremely slow for large sets; repetitive strain |
| Fence (F) | Type F then draw polyline | Irregular paths; trimming lines at varying angles | Cannot deselect individual objects once the fence crosses them |
| Crossing (C) | Type C then draw rectangle | Dense grids, parallel lines in a rectangular region | Only rectangular; may select unintended objects in complex layouts |
Worked Example — Trimming a Floor Plan Grid
Consider a common architectural drafting scenario: you have drawn a grid of horizontal and vertical lines representing a structural column grid, and you need to trim all vertical lines so they do not extend beyond a boundary polyline representing the building footprint. Some vertical lines do not physically reach the boundary — they stop short — so you also need Edge mode set to Extend (implied edge). Below is a step-by-step walkthrough using Fence selection combined with Edge mode.
TRIM and press Enter. At the "Select cutting edges" prompt, click the boundary polyline that represents the building footprint. Press Enter to confirm the selection and move to the object-selection phase.E to invoke the Edge option. Select Extend to enable implied edge computation. This sets EDGEMODE = 1, allowing AutoCAD to extrapolate the boundary polyline's edges when vertical lines do not physically reach them.F at the "Select object to trim" prompt to switch to Fence selection mode. Draw the fence polyline by clicking a series of points that trace a path across all the vertical grid line segments that protrude beyond the building boundary. The fence should cross each unwanted segment exactly once, on the side you wish to remove (outside the boundary). Press Enter to complete the fence.EDGEMODE back to 0 by typing EDGEMODE at the command line and entering 0. Undo the trim (Ctrl+Z), then re-run the TRIM command. Notice that some segments that previously trimmed successfully now fail, because their physical intersection with the boundary does not exist. This confirms the importance of EDGEMODE = 1 for this use case.Strengths, Limitations & Comparisons
| Feature / Option | Strengths | Limitations |
|---|---|---|
| Edge = Extend | Handles non-intersecting geometry; reduces need for construction lines; works with arcs, circles, and splines by following their natural curvature | Can produce unintended results if the implied extension crosses multiple objects; the user must understand the geometric trajectory of each edge type |
| Edge = No Extend | Predictable, safe behavior; only trims/extends at verified physical intersections; no risk of implied-edge surprises | Requires that cutting edges physically overlap with objects; may necessitate extending edges manually before trimming |
| Project = UCS | Essential for 3D drawings where objects lie at different Z-elevations but appear to intersect in plan view; intuitive for AEC (architecture/engineering/construction) workflows | Projects along a fixed axis; if the UCS is not aligned with the desired view, results may be surprising; not suitable for perspective views |
| Project = View | Matches exactly what the user sees on screen; useful for isometric and oblique views | Results change when the view changes; not deterministic across sessions unless the view is saved |
| Fence Selection | Arbitrary path; excellent for irregular arrangements; fastest method for large, non-rectangular sets of objects | No undo within a single fence pass; requires careful path planning to avoid crossing objects that should not be edited |
| Quick Mode (2021+) | No need to pre-select cutting edges; immediate trimming with minimal prompts; great for quick cleanup tasks | Less control over which edges are used; may trim against unintended geometry in crowded areas; does not support Edge/Project options without switching to Standard mode |
strict: boolean parameter to toggle between lenient and rigorous input validation, EDGEMODE toggles between strict (physical-only) and lenient (implied) intersection resolution. Fence and Crossing are analogous to iterator patterns — different strategies for traversing a collection of geometric objects and applying the same trim/extend operation to each.Connection to Advanced Editing & Automation
The advanced TRIM/EXTEND options introduced here serve as a gateway to AutoCAD's more sophisticated editing and automation capabilities. Understanding how EDGEMODE and PROJMODE govern intersection computation is foundational for working with AutoLISP and .NET API scripting, where you can programmatically invoke TRIM and EXTEND with specific system variable configurations. Furthermore, the Fence selection concept generalizes to other commands — ERASE, COPY, MOVE, and STRETCH all support Fence selection at their object-selection prompts, making it a transferable skill across the AutoCAD command set.
| Introductory Concept | Advanced Extension |
|---|---|
| Manual TRIM with Fence selection | AutoLISP routine that iterates over a selection set and applies TRIM with EDGEMODE = 1 automatically, enabling batch processing without manual fence drawing |
| PROJMODE for 2D/3D projection | 3D solid modeling operations (SUBTRACT, INTERSECT) that use Boolean intersection logic — a direct 3D analog of the 2D trim concept |
| Quick mode (all-edges trim) | Dynamic Blocks with parametric constraints that automatically trim/extend internal geometry when block parameters change |
| EDGEMODE implied extension | Parametric constraints (COINCIDENT, TANGENT) that enforce geometric relationships permanently rather than as a one-time edit |
As you advance, consider that every interactive TRIM/EXTEND operation can be automated. The command-line interface of AutoCAD is, at its core, a text-based API. The same keystrokes you type interactively — TRIM → select edges → E → Extend → F → draw fence → Enter — can be scripted in AutoLISP using (command "TRIM" ...). This means the workflow patterns you learn now translate directly into automation scripts, making this foundational knowledge for any CAD-adjacent programming work.
Practice Problems
EDGEMODE = 0 and EDGEMODE = 1. Under what circumstances would a user need EDGEMODE = 1, and what risks does it introduce?Lesson Summary
AutoCAD's advanced TRIM and EXTEND options transform these fundamental commands from simple click-to-edit tools into powerful batch-processing instruments. The Edge option (controlled by EDGEMODE) toggles between physical-only and implied-extension intersection resolution, enabling operations against edges that do not physically reach the target geometry. The Project option (controlled by PROJMODE) determines whether intersections are computed in true 3D, on the UCS XY plane, or on the current view plane — a critical distinction for any 3D modeling work.
Selection methods provide the throughput multiplier: Fence selection draws an arbitrary polyline path that marks every crossed object for editing, while Crossing selection uses a rectangular window to select all touched or enclosed objects. Combined with the Edge and Project settings, these methods enable a single command invocation to edit dozens or hundreds of objects — a workflow pattern that scales to AutoLISP and .NET automation, where the same command sequences can be scripted programmatically. Mastering these options is essential for efficient CAD editing and forms the foundation for advanced parametric and scripted workflows.