Draft Hatch/pl: Difference between revisions
(Created page with "==Opcje==") |
(Created page with "==Wyrównanie wzoru==") |
||
Line 41: | Line 41: | ||
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command. |
* Press {{KEY|Esc}} or the {{Button|Close}} button to abort the command. |
||
==Wyrównanie wzoru== |
|||
== 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 edged 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_Wire|Draft Wires]] with that in mind you can control how the hatch pattern is aligned with the outline of the face. |
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 edged 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_Wire|Draft Wires]] with that in mind you can control how the hatch pattern is aligned with the outline of the face. |
Revision as of 12:39, 31 October 2021
Draft Hatch |
Menu location |
---|
Drafting → Hatch |
Workbenches |
Draft, Arch |
Default shortcut |
H A |
Introduced in version |
0.20 |
See also |
Draft Pattern |
Opis
The Draft Hatch command creates hatches on the planar faces of a selected object.
Użycie
- Select an object with faces. Only the planar faces of the object will be hatched.
- There are several ways to invoke the command:
- Press the Draft Hatch button.
- Select the Drafting → Hatch option from the menu.
- Use the keyboard shortcut: H then A.
- The Hatch task panel opens. See Options for more information.
- Press the OK button to finish the command.
Opcje
- Press the ... button to select a PAT file. See Notes.
- Select a Pattern from the file. It is currently advisable to avoid patterns with dashed lines.
- Specify a Scale for the pattern.
- Specify a Rotation for the pattern.
- Press Esc or the Close button to abort the command.
Wyrównanie wzoru
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 edged 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 DANETranslate 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 DANETranslate 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
- For now the advice is to download a PAT file. Many can be found online. You can for example do a web search for acad.pat or acadiso.pat.
- A small PAT file is installed with FreeCAD: <program_folder>/data/Mod/TechDraw/PAT/FCPAT.pat, where <program_folder> is the FreeCAD program folder:
- On Linux it is usually /usr/share/freecad.
- On Windows it is usually C:\Program Files\FreeCAD.
- On macOS it is usually /Applications/FreeCAD.
Preferences
See also: Preferences Editor and Draft Preferences.
The following preferences are involved:
- PAT file: Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → FilePattern.
- Pattern: Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → NamePattern.
- Scale: Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternScale.
- Rotation: Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternRotation.
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
- DANEBase (
Link
): specifies the object whose faces are hatched. - DANEFile (
File
): specifies the PAT file. - DANEPattern (
String
): specifies the pattern name. - DANERotation (
Angle
): specifies the rotation of the pattern. - DANEScale (
Float
): specifies the scale of the pattern. - DANETranslate (
Bool
): specifies if the faces are temporarily translated to the global XY plane during the hatching process. Setting it tofalse
may give wrong results for non-XY faces.
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()
- Kreślenie: Linia, Polilinia, Zaokrąglenie, Łuk, Łuk przez 3 punkty, Okrąg, Elipsa, Wielokąt foremny, Krzywa złożona, Krzywa Bezier'a, Punkt, Łącznik ścian, Kształt z tekstu, Kreskowanie, Prostokąt
- Adnotacje: Adnotacja wieloliniowa, Wymiarowanie, Etykieta, Edytor stylów adnotacji, Widżet skali anotacji
- Modyfikacja: Przesuń, Obróć, Skala, Odbicie lustrzane, Odsunięcie, Przytnij, Rozciągnij, Klonuj, Szyk, Szyk biegunowy, Szyk kołowy, Szyk po ścieżce, Szyk powiązań po ścieżce, Szyk z punktów, Szyk powiązań w punktach, Edycja, Podświetl element podrzędny, Połącz, Rozdziel, Ulepsz kształt, Rozbij obiekt na elementy, Polilinia na krzywą złożoną, Rysunek Roboczy do szkicu, Nachylenie, Obróć wymiar, Widok 2D kształtu
- Tacka narzędziowa: Wybór płaszczyzny, Ustaw styl, Przełącz tryb konstrukcyjny, Grupowanie automatyczne
- Przyciąganie: Przełącz przyciąganie, Przyciągnij do punktu końcowego, Przyciągnij do punktu środkowego, Przyciągnij do środka, Przyciągnij do kąta, Przyciąganie do punktu przecięcia, Przyciągnij prostopadle, Rozszerz, Przyciągnij równolegle, Przyciągnij specjalnie, Przyciąganie do najbliższego, Przyciągnij ortogonalnie, Przyciągnij do siatki, Przyciągnij do płaszczyzny roboczej, Przyciągnij do wymiaru, Pokaż / ukryj siatkę
- Różności: Zastosuj bieżący styl, Warstwa, Zarządzaj warstwami, Dodaj grupę o nazwie, Dodaj do grupy, Wybierz grupę, Dodaj do grupy konstrukcyjnej, Przełącz tryb wyświetlania, Pośrednia płaszczyzna robocza, Ulecz, Przełącz tryb kontynuacji, Pokaż przybornik przyciągania
- Dodatkowe:: Wiązania, Wypełnienie wzorem, Preferencje, Ustawienia Importu i Eksportu, DXF/DWG, SVG, OCA, DAT
- Menu podręczne:
- Kontener warstwy: Połącz duplikaty warstw, Dodaj warstwę
- Warstwa: Aktywuj warstwę, Zaznacz zawartość warstwy
- Pośrednia płaszczyzna robocza: Zapisz ujęcie widoku, Zapisz stan obiektów
- Jak zacząć
- Instalacja: Pobieranie programu, Windows, Linux, Mac, Dodatkowych komponentów, Docker, AppImage, Ubuntu Snap
- Podstawy: Informacje na temat FreeCAD, Interfejs użytkownika, Profil nawigacji myszką, Metody wyboru, Nazwa obiektu, Edytor ustawień, Środowiska pracy, Struktura dokumentu, Właściwości, Pomóż w rozwoju FreeCAD, Dotacje
- Pomoc: Poradniki, Wideo poradniki
- Środowiska pracy: Strona Startowa, Architektura, Assembly, CAM, Rysunek Roboczy, MES, Inspekcja, Siatka, OpenSCAD, Część, Projekt Części, Punkty, Inżynieria Wsteczna, Robot, Szkicownik, Arkusz Kalkulacyjny, Powierzchnia 3D, Rysunek Techniczny, Test Framework