Study guide
5.3 Boundary Hatches & Gradients
Autodesk Certified Professional ACP
Track your progress as you read
Finished sections get a check mark.
1 Introduction: ACP AutoCAD Exam Overview
About the ACP AutoCAD Exam
2 Chapter 1: Drawing Management, Inquiry Tools & Drawing Health
1.1 Drawing Maintenance & Health 1.2 Object Inquiries & Counting 1.3 Application Environment & Workspace Customization
3 Chapter 2: Layer Architecture, Overrides & Coordinate Systems
2.1 Layer Properties & Standards 2.2 Layer Filters & Viewport Overrides 2.3 User Coordinate Systems (UCS) & Dynamic UCS
4 Chapter 3: Annotation Styles, Multileaders & Text Detailing
3.1 Text Styles & Advanced Multileaders 3.2 Tables & Table Styles
5 Chapter 4: Dimensioning Standards & Annotative Scaling
4.1 Dimension Styles & Dimensioning Operations 4.2 Advanced Dimension Editing & Overrides 4.3 Annotative Scaling Architecture
6 Chapter 5: Advanced 2D Geometry & Complex Curves
5.1 Polylines & Polyline Editing 5.2 Arcs, Circles, Ellipses & Splines 5.3 Boundary Hatches & Gradients
7 Chapter 6: Precision Drafting, Geometric Modification & Grip Editing
6.1 Precision Drafting Aids & Coordinate Entry 6.2 Advanced Geometric Transformations & Arrays 6.3 Grip Modes & Multifunctional Grips
8 Chapter 7: Blocks, Dynamic Content & Attribute Management
7.1 Block Definitions, Base Points & Content Reuse 7.2 Block Attributes & Attribute Synchronization
9 Chapter 8: Paper Space Layouts & Viewport Management
8.1 Layout Configuration & Named Page Setups 8.2 Layout Viewports: Creation, Scaling & Overrides
10 Chapter 9: Plotting, Batch Publishing & Sheet Set Management
9.1 Plotting, Batch Publishing & eTransmit 9.2 Sheet Set Manager (SSM) Fundamentals
11 Chapter 10: External References & Underlays
10.1 External References (Xrefs) Management 10.2 Underlays & Raster Images
12 Chapter 11: Data Linking, Dynamic Fields & Design Review
11.1 Dynamic Fields & Excel Data Links 11.2 Design Review: DWG Compare, Traces & Shared Drawings
5.3 Boundary Hatches & Gradients
Key Takeaways Explain This Topic AI
Boundaries are defined by Pick Internal Points (ray-casting flood fill) or Select Boundary Objects (explicit entity selection), with HPGAPTOL bridging minor drafting gaps.
Island detection styles dictate internal fill patterns: Normal alternates concentric nested boundaries, Outer fills only from the perimeter to the first island, and Ignore fills across all internal islands.
The HPLAYER system variable automatically routes newly created hatches to a dedicated layer, bypassing the active current layer to preserve CAD standards.
Setting the Hatch Pattern Origin (HPORIGIN / Set Origin) aligns pattern geometry to specific datum points, essential for architectural tile, paving, and masonry layouts.
Associative hatches (HPASSOC = 1) dynamically adapt their geometry and area when surrounding boundaries are edited, while non-associative hatches remain static and can have boundaries recreated via HATCHEDIT.
Last updated: October 2026
5.3 Boundary Hatches & Gradients
Note
Hatches and gradients communicate material cross-sections, structural compositions, finish surface layouts, and zoning boundaries in design drawings. In AutoCAD, hatching is driven by an associative database engine that analyzes boundary geometry, detects interior islands, evaluates scale, and dynamically updates when geometry shifts. Mastering hatch architecture, island detection, and pattern origins is vital for production efficiency and the Autodesk Certified Professional (ACP) exam.
1. HATCH Command Architecture & Boundary Detection
Executing HATCH (or H ) activates the contextual Hatch Creation ribbon tab in the modern AutoCAD interface. If the ribbon is closed, or HPDLGMODE = 1 , AutoCAD displays the classic Hatch and Gradient dialog box. Running -HATCH opens the command-line interface for script automation. Boundary Identification Methods:
Pick Internal Points: Select Boundary Objects:
- ┌──────────────────────┐ ┌──────────────────────┐
- │ x [Pick Pt] │ │[Select Outer Circle] │
- │ │ │ │
- │ ┌─────────┐ │ │ [Select Box] │
- │ │ Island │ │ │ │
- │ └─────────┘ │ │ │
- └──────────────────────┘ └──────────────────────┘
- (Casts rays across visible screen; (Analyzes only selected objects;
- computes boundary dynamically) fast, precise, immune to off-screen geometry)
- Pick Internal Points vs. Select Boundary Objects
AutoCAD provides two fundamental boundary determination techniques:
Pick Internal Points: Casts imaginary rays across all visible vector geometry within the current display viewport to identify closed loops surrounding the picked point. This is ideal for irregular spaces formed by the intersections of multiple overlapping lines, arcs, and polylines. However, in dense drawings containing tens of thousands of entities, ray-casting incurs substantial calculation overhead.
Select Boundary Objects: The user directly selects closed objects (such as closed polylines, circles, ellipses, or regions). AutoCAD restricts boundary evaluation strictly to the selected entities, ignoring the surrounding drawing canvas. This method is exponentially faster in complex drawings and avoids accidental island inclusion.
Boundary Sets: Current Viewport vs. a Selected Boundary Set
When you pick an internal point, AutoCAD does not search the whole drawing. It analyzes a boundary set , the group of objects it may use as edges (objective 3.2.d: Current Viewport vs. Boundary Set ):
Use Current Viewport (default): The boundary set is everything within the extents of the current viewport. Dense geometry slows detection, and objects you never meant to use (furniture, dimensions, text) can become unexpected edges or islands.
Select New Boundary Set: On the expanded Boundaries panel of the Hatch Creation tab (or in the boundary set area of the Hatch and Gradient dialog box), choose Select New Boundary Set and select only the walls, slab edges, or property lines that should define the area. Picked points are then evaluated against that set alone, which is faster and ignores clutter.
Use Boundary Set: Once a set exists, later picks keep using it until you switch back to Use Current Viewport .
Tip
With Use Current Viewport , objects outside the current viewport's extents are not in the boundary set, so a room that runs off screen may fail to close. Zoom so the whole area is visible, or define a boundary set.
Boundary Gap Tolerance ( HPGAPTOL )
A frequent obstacle during hatching is the "Valid closed boundary not found" error, caused by microscopic gaps between line endpoints. The HPGAPTOL system variable establishes a Gap Tolerance (in drawing units):
When HPGAPTOL = 0 (default), boundaries must be mathematically closed.
When HPGAPTOL > 0 , AutoCAD ignores gaps equal to or smaller than the tolerance value, treating the boundary as closed and allowing the hatch to generate without error.
Boundary Retention and the BOUNDARY Command
By default, AutoCAD creates the hatch object and discards the temporary boundary loop it computed. However, you can retain the boundary geometry:
In the Hatch ribbon tab under Boundaries , check Retain Boundaries .
The system variable HPBOUND controls the object type created: 0 creates Region objects; 1 creates closed Polyline ( LWPOLYLINE ) objects.
Alternatively, the standalone BOUNDARY (or BO ) command generates a closed polyline or region from an enclosed area without creating a hatch.
2. Island Detection Styles
An Island is any closed interior boundary located completely inside the outermost boundary perimeter. AutoCAD evaluates islands using three distinct styles configured via the Hatch ribbon Options panel or the HPISLANDDETECTION system variable (whether islands are detected at all is set by HPISLANDDETECTIONMODE ): Island Detection Styles Visual Comparison:
- Normal Style Outer Style Ignore Style
- ┌──────────────────────┐ ┌──────────────────────┐ ┌──────────────────────┐
- │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
- │▒▒▒┌──────────────┐▒▒▒│ │▒▒▒┌──────────────┐▒▒▒│ │▒▒▒│▒▒▒▒▒▒▒▒▒▒▒▒▒▒│▒▒▒│
- │▒▒▒│ │▒▒▒│ │▒▒▒│ (Unhatched) │▒▒▒│ │▒▒▒│▒▒▒▒▒▒▒▒▒▒▒▒▒▒│▒▒▒│
- │▒▒▒│ ┌──────┐ │▒▒▒│ │▒▒▒│ │▒▒▒│ │▒▒▒│▒▒▒│▒▒▒▒▒▒│▒▒▒│▒▒▒│
- │▒▒▒│ │▒▒▒▒▒▒│ │▒▒▒│ │▒▒▒│ ┌──────┐ │▒▒▒│ │▒▒▒│▒▒▒│▒▒▒▒▒▒│▒▒▒│▒▒▒│
- │▒▒▒│ └──────┘ │▒▒▒│ │▒▒▒│ │ │ │▒▒▒│ │▒▒▒│▒▒▒│▒▒▒▒▒▒│▒▒▒│▒▒▒│
- │▒▒▒└──────────────┘▒▒▒│ │▒▒▒└──────────────┘▒▒▒│ │▒▒▒└──────────────┘▒▒▒│
- └──────────────────────┘ └──────────────────────┘ └──────────────────────┘
- (Alternates concentric islands) (Fills to first island only) (Hatches through all islands)
Island Style HPISLANDDETECTION Operational Behavior & Industry Application
Normal 0 Alternates hatching inward from the outer boundary. The outermost area is hatched, the first interior island is skipped, the next nested island is hatched, and so on. Used for concentric architectural walls and mechanical cross-sections.
Outer 1 (initial value) Hatches exclusively from the outermost perimeter inward to the boundary of the first island encountered. All interior islands and nested geometry remain completely blank and unhatched. Standard for building footprints with interior courtyards.
Ignore 2 Bypasses all internal island boundaries entirely, hatching through every interior entity to fill the outermost boundary solid. Used when applying zoning shading or site-wide hatching where interior lines must be overlaid.
3. Pattern Types & Property Architecture
AutoCAD organizes hatch patterns into four distinct structural categories: Pattern Categories:
- ├─ Predefined: Read from acad.pat (Imperial) or acadiso.pat (Metric); ANSI, ISO, AR- patterns
- ├─ User-Defined: Parallel lines generated on the fly; customizable spacing; optional Double grid
- ├─ Custom: External proprietary .pat pattern files loaded from designated search paths
- └─ Gradient: Smooth photometric color transitions (Linear, Cylindrical, Spherical, Hemispherical)
Predefined: Sourced directly from the AutoCAD pattern definition libraries ( acad.pat for Imperial drawings, acadiso.pat for Metric drawings). Common examples include ANSI31 (standard 45 ∘ 45^\circ 4 5 ∘ diagonal cross-section), ANSI32 (steel), ANSI33 (bronze, brass, copper), SOLID (100% solid fill), AR-B816 (8 x 16 concrete block elevation), and AR-CONC (aggregate concrete).
User-Defined: Generates simple linear patterns on the fly based on the current linetype. You specify an exact Spacing distance between lines. Checking the Double option ( HPDOUBLE = 1 ) draws a second set of identical parallel lines oriented at 90 ∘ 90^\circ 9 0 ∘ to the first, creating a square or rectangular grid.
Custom: Sourced from independent, user-authored .pat text files located within AutoCAD's Support File Search Path.
Gradient: Generates smooth, photo-rendered transitions between two colors (or one color transitioning to white/black). Useful for schematic presentations, solar panel glazing, liquid levels in civil tanks, and architectural glass shading.
Critical Hatch Properties & System Variables
Property System Variable Default Function & Operational Limits
Hatch Pattern HPNAME "ANSI31" Specifies the active default hatch pattern name.
Pattern Scale HPSCALE 1.0 Multiplies the base pattern dimensions. If set too dense, HPMAXLINES halts processing to prevent memory crash.
Pattern Angle HPANG 0 Sets rotation angle relative to current UCS. Note that ANSI31 already contains a built-in 45 ∘ 45^\circ 4 5 ∘ angle.
Transparency HPTRANSPARENCY "use current" ( . ) Sets explicit transparency from 0 to 90% , allowing background geometry to show through solid fills.
Hatch Layer HPLAYER "." (Current) Specifies an automatic target layer for all new hatches (e.g. A-PATT ), avoiding manual layer switching.
Associativity HPASSOC 1 Controls whether new hatches are associative ( 1 ) or non-associative ( 0 ).
Warning
The HPMAXLINES Safety Limit: When HPSCALE is set excessively small relative to a vast boundary, AutoCAD may attempt to calculate millions of hatch lines, locking up system memory. AutoCAD protects itself via the HPMAXLINES system variable (default 1,000,000 ). If a hatch exceeds this limit, AutoCAD halts rendering and issues the alert: "Hatch spacing too dense, or dash size too small." To resolve this, increase the pattern scale factor.
- 4. Associativity, Pattern Origin & Annotative Behavior
- Associative Hatches vs. Non-Associative Hatches
Associative ( HPASSOC = 1 ): The hatch is dynamically bound to its defining boundary objects. When a wall is moved, stretched ( STRETCH ), or trimmed, the hatch automatically recalculates its area and reshapes itself to fit the new boundary in real time.
Non-Associative ( HPASSOC = 0 ): The hatch exists as an independent, static geometric object. If the boundary is moved, the hatch remains behind in its original location.
If boundary geometry is modified such that a closed boundary is broken, associativity is permanently severed. To restore associativity without redrawing:
Select the hatch and type HATCHEDIT (or HE ).
Click the Recreate Boundary button.
Choose whether to recreate the boundary as a Polyline or Region .
When prompted Reassociate hatch with new boundary? [Yes/No]: , answer Yes .
Setting the Hatch Pattern Origin ( HPORIGIN )
By default, AutoCAD calculates hatch pattern alignments relative to the origin coordinates ( 0 , 0 ) (0,0) ( 0 , 0 ) of the World Coordinate System (WCS). In large architectural plans, this causes patterns (such as floor tiles or masonry bricks) to intersect walls at awkward, arbitrary fractions: Default Origin (0,0 WCS): Specified Origin (Set to Corner):
- ┌───┬───┬───┬───┬───┐ ┌───────┬───────┬───────┬───────┐
- │ ░ │ │ │ │ ░ │ (Awkward slivers) │ Full │ Full │ Full │ Full │
- ├───┼───┼───┼───┼───┤ ├───Tile┼───Tile┼───Tile┼───Tile┤
- │ │ │ │ │ │ │ │ │ │ │
- └───┴───┴───┴───┴───┘ └───────┴───────┴───────┴───────┘
- ▲ Pattern starts cleanly here
To align tiles cleanly with a physical datum:
Select the hatch entity.
On the Hatch Creation or Hatch Editor ribbon tab, click Set Origin .
Snap to the desired reference point (such as the lower-left corner of a room or a door threshold).
AutoCAD repositions the pattern so that a full, uncut tile originates precisely at the selected coordinate.
Tip
Under the Origin panel dropdown, you can also select predefined alignment origins: Bottom Left , Bottom Right , Top Left , Top Right , or Center , which automatically computes the boundary bounding box.
Annotative Hatches
When a hatch is designated as Annotative , its pattern spacing automatically scales according to the active viewport annotation scale ( CANNOSCALE ). This ensures that an ANSI31 hatch pattern plots with the exact same visual line spacing on a 1/4"=1'-0" architectural detail as it does on a 1"=10'-0" site plan.
5. Hatch Maintenance: HATCHEDIT, Separate Hatches, and MATCHPROP
HATCHEDIT ( HE ): Opens the Hatch Editor interface to modify existing hatches without exploding or deleting them. Allows toggling associativity, swapping patterns, modifying scale, and setting origins.
Separate Hatches ( HPSEPARATE ): When you hatch multiple disjoint areas during a single command session, AutoCAD groups them into one unified hatch entity by default. If you later need to delete or re-color one room, all rooms are affected. Checking Create Separate Hatches (or setting HPSEPARATE = 1 ) forces AutoCAD to generate distinct, independent hatch entities for every closed loop.
MATCHPROP (Match Properties): Typing MATCHPROP (or MA ) allows you to select a source hatch and apply its pattern, scale, rotation angle, layer, color, and transparency to any number of destination hatches with a single click.