Zum Inhalt
LiberoDraft LiberoDraft Help
Deutsch
Start C Topics Hatching

Hatching

A Hatch Hatch fills a closed area with a pattern. You do not draw the pattern lines yourself: you click inside the area, and LiberoDraft traces the surrounding edges, closes the boundary from them, leaves islands clear and fills in the pattern. A hatch is an object of its own next to geometry and dimensions — it has a pattern, a color, a layer and a Z level, and it remembers the point from which its area was searched.

One click (1) inside the closed area creates the hatch. The boundary of lines and the tangential arc is found automatically.
One click (1) inside the closed area creates the hatch. The boundary of lines and the tangential arc is found automatically.

This page explains the connections. Step-by-step instructions are under How-to, the commands under Hatch and Hatch settings, the fields under Hatch Settings dialog, the messages under Hatch messages.

Area search and seed point

The point you click is the Seed point. Starting there, the program collects the edges in the vicinity, merges end points that coincide within the Tolerance into nodes and looks for the closed loop that encloses the seed point most tightly. Crossing edges are split at their intersections; dead ends that connect to nothing are dropped. If the drawing contains Blocks, the search starts in a box around the click point and widens it until the boundary found no longer touches the box — the result is the same as a search over the whole drawing, only faster.

Eligible as boundary:

  • Lines , arcs , circles , rectangles , polylines , splines and ellipses .
  • Elements inside blocks: blocks are resolved for the search, nested ones too. You do not need to explode a block to hatch an area inside or next to it.
  • Only visible elements on visible layers. Whatever is hidden does not bound an area.

Not counted as boundary:

  • Small circles up to the radius in the field Point markers r ≤ — they are treated as Point markers (construction or position marks) and are not traced. With 0 every circle counts.
  • Dashed, dotted and dash-dot lines as soon as Only solid lines as boundary is switched on — even when the line type is inherited from the layer. Center lines and construction lines then do not disturb the search.
  • Texts, dimensions, images, leaders and other annotations.
Note

The tolerance defines how far apart two end points may lie and still count as connected. The factory value is 0.05 mm. Larger values help with tangential contact points, for instance where an arc only touches a line; too large values merge points that should stay apart.

Visible area only

Visible area only (faster) is switched on by default. The search then considers only elements within the current view (plus a small margin). On large drawings this makes boundary detection faster by orders of magnitude.

Caution

With this option the whole area to fill must be in view. If it extends beyond the edge of the view, boundary edges are missing and the program reports No closed area found in the visible view. Zoom out or switch the option off in the dialog.

The option also affects updating: hatches outside the view are not recalculated, and a hatch whose boundary can no longer be found keeps its old outline — after all, the boundary might merely lie outside the view.

Islands

Closed shapes inside the boundary are Islands and stay clear as long as Exclude islands is switched on (factory setting). The program recognizes as island:

  • self-closed elements — circles, rectangles, closed polylines, closed splines and ellipses;
  • closed loops made of several elements, such as a slot of two lines and two arcs or a kidney shape.
«Exclude islands» on: the five holes stay clear.
Exclude islands on: the five holes stay clear.
«Exclude islands» off: the hatch runs across the holes.
Exclude islands off: the hatch runs across the holes.

After creation the status bar reports the number of islands found, for example Hatch created: ANSI31 (5 islands). An island must lie inside the boundary with its centroid and most of its points; a shape that forms the boundary itself does not become an island.

Tip

If the automatic search misses an island — for example because it consists of edges that only meet within the tolerance — choose the manual area definition and click the island outline there element by element.

Patterns

You choose the Pattern in the Pattern: field of the dialog. Each pattern is a definition of type, angle, spacing, color, line width and line type; changing these fields changes the definition — it then applies to all new hatches with this pattern and is saved with the program settings. Existing hatches keep their values; you change them in the Properties panel.

The eight factory patterns with their factory settings
The eight factory patterns with their factory settings
PatternTypeFactory setting
ANSI31Simple diagonal lines45°, spacing 5
ANSI32Simple diagonal lines, narrow45°, spacing 2.5
ANSI37Simple diagonal lines, opposite direction135°, spacing 5
DOPPELPackages of two lines45°, spacing 5, Package spacing 1.5
DREIFACHPackages of three lines45°, spacing 5, package spacing 1.5
DAEMMUNGInsulation wave lineSpacing 10
CROSSCross hatch (two directions at right angles)45°, spacing 5
SOLIDSolid fillOpaque in the pattern color, opacity adjustable

With DOPPEL and DREIFACH the dialog additionally shows the field Package spacing: — the spacing of the two or three lines within one package. For the other patterns the field is hidden. The pattern names are generic, industry-standard designations without license obligations.

Angle, spacing and origin

The angle rotates the whole pattern; 45° is the usual factory setting, 135° gives the opposite slant for a second part in a section, horizontal and 90° vertical lines. The spacing is the distance between adjacent pattern lines. Smaller values give a denser picture.

(1) 45°, spacing 5 · (2) 135°, spacing 5 · (3) 45°, spacing 2.5 · (4) 90°, spacing 5
(1) 45°, spacing 5 · (2) 135°, spacing 5 · (3) 45°, spacing 2.5 · (4) 90°, spacing 5

The spacing applies in the units of the space the hatch lives in: in model space in drawing units (model millimetres), in a viewport in millimetres on paper — there it is not scaled with the viewport scale, because hatch density is a property of the sheet, not of the part.

The Origin (Origin X: and Origin Y:) is the reference point of the line grid. All hatches with the same angle, the same spacing and the same origin lie on the same grid — two adjacent areas then merge seamlessly as if they were one. The factory origin is the world origin 0/0. In the dialog it applies drawing-wide; in the Properties panel you can give a single hatch its own origin (empty = drawing-wide default) to offset it deliberately against its neighbours.

(1) Same origin: the lines line up across the dividing edge. (2) The right-hand area has its own origin X = 3.5 and is offset by half a spacing.
(1) Same origin: the lines line up across the dividing edge. (2) The right-hand area has its own origin X = 3.5 and is offset by half a spacing.

Color, line width, opacity, layer and Z level

SettingEffect
ColorColor of the pattern lines or of the solid fill. Part of the pattern definition; changeable per hatch in the panel.
Line widthWidth of the pattern lines on screen in pixels. When printing, the line width in mm from the print dialog applies instead.
Line typeSolid, dashed or dotted — not for SOLID.
Opacity100 % is fully opaque, smaller values let grid and geometry show through. In the dialog the value applies to all hatches of the drawing; a value set in the panel takes precedence for that hatch.
LayerNew hatches go onto the layer chosen in the dialog, by default the active layer. The hatch follows the visibility of its layer.
Z levelNew hatches receive the current drawing Z level from the header bar. Change the level of an existing hatch in the Properties panel or — with the hatch selected — with PgUp and PgDn. Negative levels place the hatch behind the geometry.

You show or hide all hatches together in the Layer palette via the system row Hatches; in a viewport, hatches can additionally be hidden per viewport.

System row «Hatches» in the «Layer» palette: the eye (1) shows or hides all hatches.
System row Hatches in the Layer palette: the eye (1) shows or hides all hatches.

Selecting, moving, deleting

In the Select tool, click inside the hatched area (not inside an island) to select the hatch. Geometry and dimensions under the pointer take precedence, images rank behind the hatch. The selected hatch is tinted bluish, its boundary and island outlines are highlighted, and the Properties panel shows its values. When the pointer hovers over a hatch only its boundary lights up. The rubber band and the element list select hatches as well.

A selected hatch shows its seed point as a black square:

The black square (1) is the seed point of the selected hatch.
The black square (1) is the seed point of the selected hatch.
  • Drag the square into another chamber and the area is searched there anew: the hatch moves.
  • Hold Ctrl while releasing and the hatch stays where it is while a new hatch with the same settings is created at the drop point. This is the fastest way to fill several similar areas.
  • If there is no closed area at the drop point, the point jumps back.

Del deletes selected hatches. Ctrl + C and Ctrl + V copy hatches together with the elements they lie in. When a block is made from elements with a hatch, the hatch moves into the block; a hidden block takes its hatches with it.

With Pick up [J] in the header bar you adopt pattern, layer and opacity of an existing hatch as defaults for the next hatches: switch pick-up on, click into the hatch.

The «Pick up [J]» button in the header bar
The Pick up [J] button in the header bar

Updating after geometry changes

An automatic hatch remembers its seed point, not the finished boundary. If you change the surrounding geometry — move, stretch, trim, add a hole — the program searches the area again from the seed point, and the hatch grows or shrinks with it. A newly drawn line right across a hatch splits it: the hatch stays on the side of the seed point.

Special cases:

  • If you move an island over the seed point, the island would be the nearest closed area around the point. The program recognizes this because the new boundary lies entirely inside the old one and is much smaller, and continues the search from a substitute point in the old area — the hatch stays on the area instead of jumping into the hole.
  • If the boundary is no longer closed, the hatch is removed — unless Visible area only (faster) is on: then it keeps its old outline, because the missing boundary might lie outside the view.
  • Manual hatches are not updated; their outline is a snapshot.
  • Through-hatches are updated as soon as the sheet is needed (display, print, DXF); editing in model space costs nothing.

Manual area definition

If the automatic search misses an area or an island, you define the boundary yourself: Area definition: Manual in the dialog. The snap mode switches to FREE; you click the boundary elements one by one — crossing elements too, the program uses the matching sub-segments. As soon as an area closes it is tinted semi-transparently in the pattern color; further loops inside become islands and are outlined with a dashed line. A second click on an element removes it from the selection again.

[[Manual area]] in progress: four outer edges and the central hole are chosen; the area is closed, the hole is an island.
Manual area in progress: four outer edges and the central hole are chosen; the area is closed, the hole is an island.

Enter or the Hatch (Enter) button creates the hatch; Esc or Cancel (ESC) discards the selection. The mode then stays on Manual so you can choose the next area right away; Automatic ends it. A manual hatch shows no seed-point square and is not updated after geometry changes.

In paper space the boundary elements may also come from the model: click model geometry through a viewport and a manual through-hatch is created. An outline always comes from one space — the first hit decides.

Hatching in a viewport

In paper space you hatch through a viewport: with the Hatch tool, click into an area that is visible in the viewport. The program first checks whether a closed area of sheet geometry lies around the click — a rectangle you drew on the sheet above the viewport — and hatches that. If the sheet area encloses the whole viewport (a drawing frame), the search reaches through into the model. Such a Through-hatch keeps its boundary in model coordinates and shows the projected version on the sheet.

Through-hatch: the area was found in the model through the viewport, the pattern lies in paper millimetres on the sheet.
Through-hatch: the area was found in the model through the viewport, the pattern lies in paper millimetres on the sheet.
  • The spacing applies in paper mm and is not scaled with the viewport scale.
  • When the model changes, the boundary is updated as soon as the sheet is displayed, printed or exported.
  • When you click a through-hatch, the status bar points out that the hatch and not the viewport was selected; select the viewport via its frame.
  • The seed point can only be moved within the viewport; Ctrl creates a copy as in the model.
  • If the viewport is deleted, the hatch can no longer be updated.

Printing and DXF

When printing, hatch lines have their own line width in millimetres — field Hatches: in the Line widths (mm) section of the print dialog, factory 0.1 mm. Hatches are usually printed thinner than the geometry (0.1 to 0.25 mm).

On DXF export you choose in the options dialog how hatches are written: as a block (one object, exact copy) or as a hatch object (smaller, editable in the target CAD) — the native HATCH object whose pattern can be changed in the target CAD.

Known limits

  • A pocket open towards the outer edge cannot be distinguished geometrically from a real gap in the boundary. The hatch keeps following its seed point; define the boundary manually if needed.
  • The boundary must be closed within the tolerance. If an area stays empty, the boundary is usually open at a corner — zoom in on the corners and check the end points with the Endpoint snap mode.
  • With Visible area only (faster) the whole area must be in view.
  • Elements in blocks can serve as boundary, but the hatch itself lies outside the block. If the hatch is to belong to the block, create it in the block editor or build the block from elements and hatch together.

Related topics