Skip to content
Tutorials Center
My learning

Topics

Lesson 24 of 38 ยท Layers, Blocks and Annotation

AutoCAD Hatch and Gradient: Patterns, Scale and Boundaries

Fill areas in AutoCAD with HATCH: pick pattern, angle and scale, choose boundaries, handle islands and gaps, edit with HATCHEDIT, and use gradients, solid fills and draw order.

Hatching fills a closed area with a pattern of lines, dots or a solid color. Engineers use hatch patterns to show materials in section views (steel, concrete, brick), architects to distinguish floors, walls and landscaping. AutoCAD's HATCH command handles patterns, solid fills and gradients, and an associative hatch updates itself when its boundary changes.

AutoCAD cannot run on this site. The program's options are described exactly, and the runnable examples are labelled JavaScript stand-ins that model the geometry behind them.

Creating a hatch

Type HATCH (alias H) or click Home > Draw > Hatch. The Hatch Creation ribbon tab opens:

  1. Boundaries. Click Pick Points and then click inside a closed region, or Select to choose boundary objects. AutoCAD finds the boundary automatically (a tiny preview appears as you move the cursor).
  2. Pattern. Choose from the gallery: ANSI31 (45 degree lines, general or iron), ANSI32 (steel), ANSI37, AR-CONC (concrete), AR-BRSTD (brick), SOLID, ISO patterns and many more. You can also pick a User defined pattern (parallel lines you control) or a Custom .pat file.
  3. Properties. Hatch color, background color, Transparency, Angle, and Scale.
  4. Options. Associative keeps the hatch linked to its boundary. Create separate hatches produces one object per region. Draw order sets whether it sits behind or in front of the boundary.
  5. Press Close Hatch Creation (or Enter) to finish.

Use Gradient (the alternative in the ribbon's Properties drop-down, or the GRADIENT command) for one- or two-color fills, such as shading a swimming pool or a title block.

Pattern scale: the thing everybody gets wrong

Patterns are drawn with a fixed built-in spacing in drawing units. If your model is in millimeters, the default scale of 1 produces a pattern so tight that it looks like a solid color, or so wide it appears blank. The correct scale depends on the drawing scale:

TEXT
hatch scale = (desired plotted pattern spacing / pattern's native spacing) x scale denominator

A practical approach: start with scale 1, then try the scale denominator (50 for 1:50), then adjust by eye. AutoCAD warns "Hatch spacing too dense" when the pattern would create more than a very large number of lines. Annotative hatches (an Annotative button) adjust their scale to the viewport automatically.

JS Stand-in: how many hatch lines fit?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Islands, gaps and boundaries

If you click inside a region that holds other closed shapes (a room with a column), the inner shapes are islands. The Islands option in the expanded Options panel offers three detection styles:

  • Normal. Fills, skips the first island, fills inside the next nested one, and so on (alternating).
  • Outer. Fills only between the outer boundary and the first island.
  • Ignore. Ignores islands and hatches everything.

If the boundary has a gap, AutoCAD says "Valid hatch boundary not found." Close the gap, or raise Gap tolerance (HPGAPTOL, in drawing units). Hatching a gap-tolerant boundary is convenient, but the hatch may leak, so fix real gaps when you can. Use OVERKILL to remove duplicate lines that confuse boundaries, and keep the boundary on a layer that is on and thawed.

The geometric check behind "pick inside a region" is a point-in-polygon test, and the area of a polygon is measured with the shoelace formula.

JS Stand-in: is the picked point inside the boundary? (islands)

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Editing hatches

  • Double-click a hatch to reopen the ribbon, or run HATCHEDIT (alias HE).
  • Use PROPERTIES (Ctrl+1) to change pattern name, angle and scale.
  • Recreate boundary (HATCHGENERATEBOUNDARY, ribbon option) makes a polyline or region from a hatch.
  • HATCHTOBACK sends all hatches behind other objects, so text and lines stay readable. DRAWORDER or TEXTTOFRONT offers finer control.
  • Stretch a boundary with grips: an associative hatch follows. Explode a hatch only if you truly need loose lines, since it loses its pattern identity and can bloat the file.
  • Give hatches their own layer (for example A-HATCH) with a light color so they can be frozen for clarity.

Solid fills and transparency

The SOLID pattern fills with a flat color. Set Transparency (0 to 90) so lines below show through, and use Background color for two-color fills. On plotting, remember that large solid fills can use a lot of ink and may need a plot style to print as gray.

flowchart TD
  A["HATCH"] --> B{"Boundary closed?"}
  B -- "yes" --> C["Pick points or select objects"]
  B -- "no" --> D["Close the gap or raise HPGAPTOL"]
  C --> E["Set pattern, scale, angle"]
  E --> F{"Looks too dense or blank?"}
  F -- "yes" --> G["Change scale"]
  F -- "no" --> H["Done: associative hatch"]

Decision path when a hatch refuses to appear or looks wrong.

Common mistakes

  • Using the default scale for every drawing and getting a solid blob or an invisible pattern.
  • Leaving tiny gaps in the boundary.
  • Hatching over text without sending the hatch to the back.
  • Exploding hatches "to be safe".
  • Using different patterns for the same material across sheets; follow a legend.
  • Putting the hatch on the wall layer and losing the ability to hide it.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A hatch looks like a solid fill although you chose a line pattern. What is the most likely cause?

    A very small scale packs the lines together until they merge visually. Increase the scale.
  2. 2. Which island detection style fills only between the outer boundary and the first inner shapes?

    Outer hatches only the area between the outer boundary and the first island; Normal alternates and Ignore fills everything.
  3. 3. What does an associative hatch do?

    Associative hatches are linked to their boundary objects and update when those objects change.
  4. 4. Which setting lets HATCH tolerate a small gap in the boundary?

    HPGAPTOL is the hatch gap tolerance in drawing units, also found as Gap Tolerance in the Hatch Creation options.

Summary

  • HATCH fills closed areas with patterns, solid colors or gradients, picked by point or by object.
  • Pattern scale depends on the drawing scale; adjust it or use an annotative hatch.
  • Islands are controlled by Normal, Outer and Ignore detection; gaps need closing or HPGAPTOL.
  • Edit with HATCHEDIT and keep hatches associative, on their own layer, behind text.

Next: Dimension commands