Skip to content
Tutorials Center
My learning

Topics

Lesson 13 of 38 ยท Drawing Commands

Hatch, Gradient and Boundaries in AutoCAD

Fill areas with HATCH: choose patterns and scales, pick internal points or select objects, fix gaps and islands, use associative hatches, gradients and solid fills, and understand point-in-polygon logic.

Hatching fills an enclosed area with a pattern: diagonal lines for cut material, dots for concrete, a solid colour for a zone. Hatches communicate material and meaning on drawings. They also reveal geometry mistakes: if a hatch leaks, your boundary is not closed. This lesson covers the HATCH command, its settings, and the logic behind boundary detection.

Starting HATCH

Type H (or Home > Draw > Hatch). The ribbon switches to a contextual Hatch Creation tab with these panels:

  • Boundaries: Pick Points (click inside a closed area), Select (choose boundary objects), Remove (take islands out).
  • Pattern: pick from ANSI, ISO, other predefined, custom patterns, plus Solid and gradients.
  • Properties: hatch type (Pattern, Solid, Gradient, User defined), colours, transparency, angle and scale.
  • Options: associative, annotative, "Gap tolerance", island detection, draw order.

Click inside the area (with the command waiting at "Pick internal point"), adjust, then press Enter or Close Hatch Creation.

Patterns, angle and scale

Patterns are made of repeating lines drawn at unit scale. If the hatch looks solid, the scale is too small; if you see only a few lines or nothing, the scale is too large. Rules of thumb:

  • Scale multiplies the spacing. Decide on the right scale by trial and error, or use an annotative hatch so it scales with the viewport.
  • Angle rotates the pattern; for an ANSI31 diagonal, an angle of 0 gives lines at 45 degrees; angle 90 gives lines at the other diagonal.
  • User defined type lets you specify an exact spacing and double hatching (a crosshatch) without a pattern name.
  • Solid fills use a true colour; transparency lets objects below show through.

Boundaries, islands and gaps

AutoCAD finds the boundary by examining the objects around your picked point. A hatch leaks if the boundary has a gap; the command refuses and says "Valid hatch boundary not found" or draws a red circle at the gap. Fixes:

  1. Close the gap (FILLET radius 0, EXTEND, or JOIN).
  2. Use Gap tolerance (HPGAPTOL, up to a given number of units) to treat small gaps as closed.
  3. Use Select and pick a polyline that is already closed.

Islands are closed shapes inside the boundary: the Island detection options say whether the hatch skips them: Normal (alternates fill, skip, fill), Outer (only fill the outermost ring) or Ignore (fill everything).

Associative hatches

When Associative is on, the hatch updates when its boundary changes: stretch the room, and the floor hatch follows. Turning it off lets you edit the hatch independently. Separate hatches make one object per boundary if you pick several areas at once.

Gradient and solid fills

Gradient fills blend two colours (linear, spherical, cylindrical). Use them sparingly in technical drawings; solid and light transparent fills for colour coding (rooms, zones) are more common and plot better. The SOLID pattern with a layer colour is best controlled through layers (Lesson in Chapter 5).

HATCHEDIT, trim and draw order

Double-click a hatch to reopen the Hatch Edit contextual tab, where you can change pattern, scale, angle and boundaries. If the hatch hides lines, use DRAWORDER > Send to Back (HATCHTOBACK sends all hatches back). To cut a hatch around text, use a WIPEOUT or enable text boundary islands: select text as an island so the hatch skips it.

The logic: is the pick point inside?

Behind "Pick internal point" is a classic geometry test: shoot a ray from the point and count how many boundary segments it crosses. An odd count means inside; even means outside (the even-odd rule, which is also how Normal island detection alternates). Implementing it shows why open boundaries are fatal: the notion of "inside" only exists for closed shapes.

Python Stand-in: point-in-polygon (even-odd) boundary test

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

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Estimating a hatch

How many pattern lines does a hatch contain? For parallel-line patterns, count lines crossing the area. This stand-in estimates the number of hatch lines and their total length for a rectangle at a given spacing, which also explains why very small scales make drawings slow and heavy.

Python Stand-in: why a tiny hatch scale makes a heavy drawing

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

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

AutoCAD protects you: if the spacing would produce an absurd number of lines it says the hatch scale is too small or the pattern is too dense and refuses to create it.

Practical tips

  • Keep hatches on their own layer so they can be frozen, switched or printed in grey.
  • Hatch last, after dimensions and text, so you can include text as islands.
  • Use one hatch per material and match scale across the sheet.
  • For a hatch that must follow a layout's scale, use annotative hatches (Chapter 5).
  • Pick several internal points to hatch many rooms in one go, but hit Create separate hatches if you want them independent.

Common mistakes

  • Hatching a boundary with a gap, then forcing it with a large gap tolerance and filling beyond the shape.
  • Wrong scale: a pattern invisible or solid.
  • Editing the boundary with associativity off and leaving the hatch behind.
  • Hatching on the same layer as walls, so it plots with a heavy wall lineweight.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A hatch refuses with 'Valid hatch boundary not found'. The most likely cause?

    HATCH needs a closed boundary; fix the gap or set a gap tolerance.
  2. 2. What does associative mean for a hatch?

    An associative hatch updates when the boundary objects are stretched or moved.
  3. 3. A hatch pattern looks like solid colour. What should you try?

    A pattern that is too dense needs a larger scale (wider spacing).
  4. 4. In the even-odd test, a ray from the point crosses 3 boundary segments. The point is:

    An odd number of crossings means inside.

Summary

  • HATCH fills closed areas; pick internal points or select boundary objects.
  • Scale controls spacing, angle rotates the pattern; both need tuning per drawing.
  • Gaps make hatches leak; fix them or use a small gap tolerance.
  • Islands, associativity and draw order determine how hatches behave in a busy drawing.
  • Boundary detection relies on an inside test such as even-odd ray crossing.

Next: Selecting Objects in AutoCAD