Draft Hatch

Other languages:

Draft Hatch

Menu location
Drafting → Hatch
Annotation → Hatch
Workbenches
Draft, BIM
Default shortcut
H A
Introduced in version
0.20
See also
Draft Pattern

Description

The Draft Hatch command creates hatches on the planar faces of a selected object.

Usage

  1. Select an object with faces. Only the planar faces of the object will be hatched.
  2. There are several ways to invoke the command:
    • Press the Hatch button.
    • Draft: Select the Drafting → Hatch option from the menu.
    • BIM: Select the Annotation → Hatch option from the menu.
    • Use the keyboard shortcut: H then A.
  3. The Hatch task panel opens. See Options for more information.
  4. Press the OK button to finish the command.

Options

Pattern alignment

When the hatch pattern for a face is calculated it is temporarily translated to the global XY plane by default. For a face with straight edges the first straight edge determines how this happens. The first point of that edge is put on the origin, and the edge itself is aligned with the X-axis. If you create Draft Wires with that in mind you can control how the hatch pattern is aligned with the outline of the face.

If all faces of the selected object are on the global XY plane you can switch off this default behavior by setting the DataTranslate property of the Draft Hatch to false. The hatch pattern is then aligned with the origin and the X axis of the global coordinate system. For faces on the XY plane with straight edges the DataTranslate property can be used to switch between absolute (on the left in the image) and relative (on the right in the image) patterns.

Two Draft Wires with hatches.
The wires were created in a CCW direction starting from the bottom left point.
For the Draft Hatch on the left the Translate property is set to false.
For the Draft Hatch on the right it is set to true.

Notes

Preferences

See also: Preferences Editor and Draft Preferences.

The following preferences are involved:

Properties

See also: Property editor.

A Draft Hatch object is derived from a Part Feature object and inherits all its properties. It also has the following additional properties:

Data

Hatch

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a Draft Hatch use the make_hatch method of the Draft module.

hatch = make_hatch(baseobject, filename, pattern, scale, rotation)

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

rectangle = Draft.make_rectangle(4000, 1000)
rectangle.MakeFace = True
filename = App.getHomePath() + "data/Mod/TechDraw/PAT/FCPAT.pat"
pattern = "Horizontal5"
hatch = Draft.make_hatch(rectangle, filename, pattern, scale=50, rotation=45)

doc.recompute()