Draft Hatch/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "* Naciśnij przycisk {{Button|...}}, aby wybrać plik {{MenuCommand|PAT}} z wzorem. Zobacz Uwagi. * Wybierz {{MenuCommand|Wzór}} z pliku. Obecnie zaleca się unika...")
No edit summary
Line 40: Line 40:
* Określ {{MenuCommand|Skalę}} dla wzoru.
* Określ {{MenuCommand|Skalę}} dla wzoru.
* Określ {{MenuCommand|Obrót}} dla wzoru.
* Określ {{MenuCommand|Obrót}} dla wzoru.
* Naciśnij przycisk {{KEY|Esc}} lub przycisk {{Button|Zamknij}}, aby przerwać polecenie.
* Naciśnij klawisz {{KEY|Esc}} lub przycisk {{Button|Zamknij}}, aby przerwać polecenie.


==Wyrównanie wzoru==
==Wyrównanie wzoru==

Revision as of 12:24, 1 November 2021

Other languages:

Rysunek Roboczy: Kreskowanie

Lokalizacja w menu
Kreślenie → Kreskowanie
Środowisko pracy
Rysunek Roboczy, Architektura
Domyślny skrót
H A
Wprowadzono w wersji
0.20
Zobacz także
Wypełnienie

Opis

Polecenie Kreskowanie środowiska Rysunek Roboczy tworzy kreskowanie na powierzchniach planarnych wybranego obiektu.

Użycie

  1. Wybierz obiekt z powierzchniami. Tylko planarne powierzchnie obiektu zostaną zakreskowane.
  2. Istnieje kilka sposobów, aby wywołać to polecenie:
    • Naciśnij przycisk Kreskowanie.
    • Wybierz z menu opcję Kreślenie → Kreskowanie.
    • Użyj skrótu klawiaturowego: H, a następnie A.
  3. Otworzy się panel zadań Kreskowanie. Zobacz Opcje, aby uzyskać więcej informacji.
  4. Naciśnij przycisk OK, aby zakończyć polecenie.

Opcje

  • Naciśnij przycisk ..., aby wybrać plik PAT z wzorem. Zobacz Uwagi.
  • Wybierz Wzór z pliku. Obecnie zaleca się unikanie wzorów z przerywanymi liniami.
  • Określ Skalę dla wzoru.
  • Określ Obrót dla wzoru.
  • Naciśnij klawisz Esc lub przycisk Zamknij, aby przerwać polecenie.

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.

Uwagi

  • 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.

Ustawienia

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.

Właściwości

Zobacz również stronę: Edytor właściwości.

Obiekt Kreskowanie wywodzi się z obiektu Część: Cecha i dziedziczy wszystkie jego właściwości. Posiada on również następujące dodatkowe właściwości:

Dane

Kreskowanie

  • DANEPodstawowe (Link): określa obiekt, którego ściany zostaną zakreskowane.
  • DANEPlik (Plik): określa plik wzoru PAT.
  • DANEWzór (Ciąg znaków): określa nazwę wzoru.
  • DANEObrót (Kąt): określa obrót wzoru.
  • DANESkala (Float): określa skalę wzoru.
  • DANEPrzesunięcie (Bool): określa, czy podczas procesu kreskowania powierzchnie są tymczasowo przeliczane na globalną płaszczyznę XY. Ustawienie tej wartości na FAŁSZ może dać błędne wyniki dla powierzchni innych niż XY.

Tworzenie skryptów

Zobacz również stronę: Dokumentacja API generowana automatycznie oraz Podstawy tworzenia skryptów FreeCAD.

Aby utworzyć kreskowanie, użyj metody make_hatch modułu Rysunek Roboczy.

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

Przykład:

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()