|
|
| Menu location |
|---|
| TechDraw → Hatching → Geometric Hatch |
| Workbenches |
| TechDraw |
| Default shortcut |
| None |
| Introduced in version |
| - |
| See also |
| TechDraw Hatch, TechDraw Hatching |
Description
The TechDraw GeometricHatch tool fills a closed region in a view with a pattern based on an Autodesk PAT hatching specification. Alternatively the TechDraw Hatch tool uses SVG based hatch patterns. See Hatching for details.
Geometric hatch pattern on a face
Usage
- Select a closed region in a view.
- There are several ways to invoke the tool:
- Press the
Geometric Hatch button.
- Select the TechDraw → Hatching →
Geometric Hatch option from the menu.
- Press the
- The Geometric Hatch task panel opens.
- Optionally change the Pattern file, the Pattern name, the Pattern scale, the Line width, the Line color, the Rotation, the Offset X and the Offset Y.
- Press the OK button.
Notes
- For a solid color fill use TechDraw Hatch instead and select solid.svg as the Pattern File.
- Hatching objects are vulnerable to the "topological naming problem". See TechDraw LengthDimension for more information. It is recommended that hatching be one of the last steps in your drawing process.
- A small set of sample patterns are available in:
$INSTALL_DIR/data/Mod/TechDraw/PAT/FCPAT.pat
- Where
$INSTALL_DIRis the directory where FreeCAD was installed, for example: /usr/share/freecad/data/Mod/TechDraw/PAT/FCPAT.pat
Properties
- DataSource: The View and Face to receive the hatch pattern.
- DataFile Pattern: The location of the PAT file to use.
- DataName Pattern: The name of the PAT specification within File Pattern.
- DataScale Pattern: The scale to be applied to the pattern (must be > 0.0).
- ViewWeight Pattern: The thickness of the pattern lines.
- ViewColor Pattern: The color for the pattern lines.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
A GeometricHatch can be created with macros and from the Python Console by using the following functions:
hatch = FreeCAD.ActiveDocument.addObject("TechDraw::DrawGeomHatch", "GeomHatch")
hatch.Source = (view1, ["Face0"])
hatch.FilePattern = "path/to/myPATfile.pat"
hatch.NamePattern = "Diamond"
page.addView(hatch)
It is also possible to use TechDraw's geometric hatch engine to produce a compound object in the 3D space. One must take care that the base face lies on the XY-plane, as the algorithm is not tailored yet for other cases:
import TechDraw
face = Part.makePlane(10, 10)
patfile = "path/to/myPATfile.pat"
pattern = "Diamond"
scale = 10
hatch = TechDraw.makeGeomHatch(face, scale, pattern, patfile)
Part.show(hatch)
This page is retrieved from https://wiki.freecad.org/TechDraw_GeometricHatch