How to Create Hatches and Gradient Fills in BricsCAD
Quick answer: HATCH fills an enclosed area with a repeating pattern; GRADIENT fills it with a smooth colour transition in one of nine patterns, using one or two colours. Both work on a single closed entity or an area enclosed by several selected entities. Two more dedicated pages exist for editing hatches afterward and for the full system variable reference, this page covers creating them.
Performance Considerations
Hatching can be memory intensive and slow to draw or display, depending on the pattern. It’s worth adding hatching as one of the last steps when building a drawing, or putting hatches on a separate layer you can freeze while you keep working. Alternatively, use FILLMODE to switch off the display of hatches, gradients, and filled entities generally.
Two limits matter here:
MAXHATCH: the maximum number of dashes a hatch can contain, 100,000 by default. Exceed it, and the hatch can’t be created; a warning offers you options instead.HPMAXCONTOURPOINTS: the maximum number of points a hatch’s contour (outline) can have and still render, accepting 0 to 10,000,000, 100,000 by default. Exceed it, and the hatch simply won’t render. Setting it to 0 disables the check entirely.
Finding the Hatch and Gradient Tools
The Draw menu, the Draw toolbar, and the Draw ribbon panel for both. The Draw tab of the No Selection Quad has an entry for Hatch only, not Gradient.
General Procedure
- Launch
HATCHorGRADIENT. The Hatch and Gradient dialog opens. - Click the Hatch tab to create a hatch, or the Gradient tab to create a gradient fill, and define its properties.
- Choose the boundary.
- Set your options.
- Click OK. The result is created on the layer set by
HPLAYER, defaulting to the current layer.
Defining Hatch Properties
- Select the Hatch tab.
- Optionally click Inherit properties, the dialog closes temporarily while you select an existing hatch entity to copy its properties from, then reopens with those properties applied.
- Choose a Pattern Type:
- User Defined: uses the pattern set directly in this dialog via Angle, Spacing, and Cross Hatch.
- Predefined: uses patterns from
iso.pat(metric,MEASUREMENTon) ordefault.pat(imperial,MEASUREMENToff), the same file-splitting logic used for linetype files. - Custom: uses
.patfiles, one pattern per file, found by searching the folders set inSRCHPATH.
- For Predefined or Custom patterns: double-click the Swatch field, choose a pattern from the palette and confirm, then set a scale and angle.
- For User Defined patterns: specify the pattern spacing in drawing units, and optionally enable Cross Hatch.
- Set the Hatch Origin: either Use current origin (whatever
HPORIGINcurrently holds), or Specified origin, where you click Pick new origin and choose a point, which then updatesHPORIGIN. - Set the hatch pattern’s colour.
- Set its background colour.
Defining Gradient Fill Properties
- Select the Gradient tab.
- For a single-colour gradient, choose One color. Click the colour tile to pick a colour, then use the slider to control the transition, far right for a colour-to-white gradient, far left for colour-to-black.
- For a two-colour gradient, choose Two color. Click each tile to pick its colour, then choose one of nine patterns: linear, cylindrical, inverted cylindrical, spherical, hemispherical, curved, inverted spherical, inverted hemispherical, or inverted curved.
- Optionally tick Centered for a symmetrical fill; leave it unticked to build the gradient from the left of the boundary instead.
- Set the Angle, relative to the current UCS.
Defining the Boundary
- Choose a Boundaries option.
- Choose an Island detection option, for enclosed areas inside the hatch boundary.
- Set the Boundary tolerance, the largest gap size still treated as a closed boundary. At 0, BricsCAD scales the tolerance to your current view size, zoom out to increase it. Saved via
HPGAPTOL. - Optionally click Select to choose a Boundary set; the dialog closes temporarily. If a selection was already active when you launched
HATCHorGRADIENT, that selection becomes the Boundary Set automatically. - Build the boundary itself using one of three buttons: Pick Points (click inside each area you want hatched, right-click or Enter to stop), Select Boundary Entities (select the entities directly, right-click or Enter to stop), or Remove Boundary Entities (select entities to remove from the current boundary selection, right-click or Enter to stop). Each closes the dialog temporarily and reopens it once you finish.
Setting Additional Options
- Annotative: creates an annotative hatch.
- Associative: associates the hatch with its boundary, so it updates if the boundary changes.
- Create Separate Hatches: when multiple boundaries or entities are selected, creates a separate hatch for each rather than one combined hatch.
- Draw order: sets the display order, though this resets to Send behind boundary every time the drawing is closed and reopened.
- Layer: an existing layer, or Use Current (the default).
- Transparency: 0 to 90, the same range used for entity transparency generally.
Frequently Asked Questions
Why is my hatch taking a long time to draw or display? Some patterns are memory intensive. Add hatching near the end of your workflow, keep it on its own layer you can freeze while working, or use FILLMODE to hide filled entities temporarily.
Is the Gradient tool available from the Quad, like Hatch is? No, only Hatch has a Quad entry. Gradient is available from the Draw menu, Draw toolbar, and Draw ribbon panel instead.
Does the Draw order setting for a hatch stay the same after I close and reopen the drawing? No, it resets to Send behind boundary every time the drawing is closed and reopened.
What’s the difference between Predefined and Custom pattern types? Predefined uses BricsCAD’s own iso.pat or default.pat file depending on MEASUREMENT. Custom uses any .pat file found in the folders set by SRCHPATH, one pattern per file.