Draft Hatch/it: Difference between revisions

From FreeCAD Documentation
(Created page with "* Premere il pulsante {{Button|...}} per selezionare un {{MenuCommand|file PAT}}. Vedere Note. * Selezionare un {{MenuCommand|Motivo}} dal file. Attualmente è consigliabile evitare modelli con linee tratteggiate. * Specificare un {{MenuCommand|Scala}} per il modello. * Specificare un {{MenuCommand|Rotazione}} per il modello. * Premere {{KEY|Esc}} o il pulsante {{Button|Annulla}} per interrompere il comando.")
No edit summary
Tag: Manual revert
 
(25 intermediate revisions by 2 users not shown)
Line 40: Line 40:


* Premere il pulsante {{Button|...}} per selezionare un {{MenuCommand|file PAT}}. Vedere [[#Note|Note]].
* Premere il pulsante {{Button|...}} per selezionare un {{MenuCommand|file PAT}}. Vedere [[#Note|Note]].
* Selezionare un {{MenuCommand|Motivo}} dal file. Attualmente è consigliabile evitare modelli con linee tratteggiate.
* Selezionare un {{MenuCommand|Motivo}} dal file. Attualmente è consigliabile evitare motivi con linee tratteggiate.
* Specificare un {{MenuCommand|Scala}} per il modello.
* Specificare un {{MenuCommand|Scala}} per il motivo.
* Specificare un {{MenuCommand|Rotazione}} per il modello.
* Specificare un {{MenuCommand|Rotazione}} per il motivo.
* Premere {{KEY|Esc}} o il pulsante {{Button|Annulla}} per interrompere il comando.
* Premere {{KEY|Esc}} o il pulsante {{Button|Annulla}} per interrompere il comando.


<span id="Pattern_alignment"></span>
== Pattern alignment ==
== Allineamento motivo ==


Quando viene calcolato il motivo del tratteggio per una faccia, viene temporaneamente tradotto nel piano XY globale per impostazione predefinita. Per una faccia con bordo dritto, il primo bordo dritto determina come ciò avvenga. Il primo punto di quel bordo viene posizionato sull'origine e il bordo stesso viene allineato con l'asse X. Se vengono create [[Draft_Wire/it|Polilinee]] con questo presupposto, si può controllare come il motivo del tratteggio verrà allineato con il contorno della faccia.
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.


If all faces of the selected object are on the global XY plane you can switch off this default behavior by setting the {{PropertyData|Translate}} 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 {{PropertyData|Translate}} property can be used to switch between absolute (on the left in the image) and relative (on the right in the image) patterns.
Se tutte le facce dell'oggetto selezionate si trovano sul piano XY globale, si può disattivare questo comportamento predefinito impostando la proprietà {{PropertyData|Translate}} del Tratteggio su {{FALSE}}. Il motivo di tratteggio verrà quindi allineato con l'origine e l'asse X del sistema di coordinate globale. Per le facce sul piano XY con spigoli dritti, la proprietà {{PropertyData|Translate}} può essere utilizzata per alternare tra motivi assoluti (a sinistra nell'immagine) e relativi (a destra nell'immagine).


[[Image:Draft_Hatch_alignment.png|400px]]
[[Image:Draft_Hatch_alignment.png|400px]]
{{Caption|
{{Caption|
Two Draft Wires with hatches.<br>
Due Polilinee con Tratteggio.<br>
Le Polilinee sono state create in senso antiorario partendo dal punto in basso a sinistra.<br>
The wires were created in a CCW direction starting from the bottom left point.<br>
For the Draft Hatch on the left the Translate property is set to false.<br>
Per il tratteggio a sinistra, la proprietà Translate è impostata su false.<br>
For the Draft Hatch on the right it is set to true.
Per il tratteggio sulla destra è impostata su true.
}}
}}


== Notes ==
<span id="Notes"></span>
== Note ==


* For now the advice is to download a PAT file. Many can be found online. You can for example do a web search for {{FileName|acad.pat}} or {{FileName|acadiso.pat}}.
* Per ora il consiglio è di scaricare un file PAT. Molti possono essere trovati online. Ad esempio, si può eseguire una ricerca web per {{FileName|acad.pat}} o {{FileName|acadiso.pat}}.
* A small PAT file is installed with FreeCAD: {{FileName|<program_folder>/data/Mod/TechDraw/PAT/FCPAT.pat}}, where {{FileName|<program_folder>}} is the FreeCAD program folder:
* Un piccolo file PAT viene installato con FreeCAD: {{FileName|<program_folder>/data/Mod/TechDraw/PAT/FCPAT.pat}}, dove {{FileName|<program_folder>}} è la cartella del programma FreeCAD:
** On Linux it is usually {{FileName|/usr/share/freecad}}.
** Su Linux di solito è {{FileName|/usr/share/freecad}}.
** On Windows it is usually {{FileName|C:\Program Files\FreeCAD}}.
** Su Windows di solito è {{FileName|C:\Program Files\FreeCAD}}.
** On macOS it is usually {{FileName|/Applications/FreeCAD}}.
** Su macOS di solito è {{FileName|/Applications/FreeCAD}}.


== Preferences ==
<span id="Preferences"></span>
== Preferenze ==


See also: [[Preferences_Editor|Preferences Editor]] and [[Draft_Preferences|Draft Preferences]].
Vedere anche: [[Preferences_Editor/it|Impostare le preferenze]] e [[Draft_Preferences/it|Preferenze per l'ambiente Draft]].


Sono coinvolte le seguenti preferenze:
The following preferences are involved:


* PAT file: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → FilePattern}}.
* PAT file: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → FilePattern}}.
* Pattern: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → NamePattern}}.
* Motivo: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → NamePattern}}.
* Scale: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternScale}}.
* Scala: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternScale}}.
* Rotation: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternRotation}}.
* Rotazione: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternRotation}}.


== Properties ==
<span id="Properties"></span>
== Proprietà ==


See also: [[Property_editor|Property editor]].
Vedere anche: [[Property_editor/it|Editor delle proprietà]].


A Draft Hatch object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:
Un oggetto Tratteggio è derivato da una [[Part_Feature/it|Funzione Part]] e ne eredita tutte le proprietà. Ha anche le seguenti proprietà aggiuntive:


<span id="Data"></span>
=== Data ===
=== Dati ===


{{TitleProperty|Hatch}}
{{TitleProperty|Hatch}}


* {{PropertyData|Base|Link}}: specifies the object whose faces are hatched.
* {{PropertyData|Base|Link}}: specifica l'oggetto le cui facce sono tratteggiate.
* {{PropertyData|File|File}}: specifies the PAT file.
* {{PropertyData|File|File}}: specifica il file PAT.
* {{PropertyData|Pattern|String}}: specifies the pattern name.
* {{PropertyData|Pattern|String}}: specifica il nome del motivo.
* {{PropertyData|Rotation|Angle}}: specifies the rotation of the pattern.
* {{PropertyData|Rotation|Angle}}: specifica la rotazione del motivo.
* {{PropertyData|Scale|Float}}: specifies the scale of the pattern.
* {{PropertyData|Scale|Float}}: specifica la scala del motivo.
* {{PropertyData|Translate|Bool}}: specifies if the faces are temporarily translated to the global XY plane during the hatching process. Setting it to {{FALSE}} may give wrong results for non-XY faces.
* {{PropertyData|Translate|Bool}}: specifica se le facce vengono traslate temporaneamente sul piano XY globale durante il processo di tratteggio. Impostandolo su {{FALSE}} si potrebbero ottenere risultati errati per le facce non XY.


== Scripting ==
<span id="Scripting"></span>
== Script ==


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
Vedere anche: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] e [[FreeCAD Scripting Basics/it|Script di base per FreeCAD]].


To create a Draft Hatch use the {{incode|make_hatch}} method of the Draft module.
Per creare un Draft Tratteggio utilizzare il metodo {{incode|make_hatch}} del modulo Draft.


{{Code|code=
{{Code|code=
Line 105: Line 111:
}}
}}


Example:
Esempio:


{{Code|code=
{{Code|code=

Latest revision as of 16:03, 8 December 2023

Other languages:

Tratteggio

Posizione nel menu
Drafting → Tratteggio
Ambiente
Draft, Arch
Avvio veloce
H A
Introdotto nella versione
0.20
Vedere anche
Campitura

Descrizione

Il comando Tratteggio crea dei tratteggi sulle facce piane di un oggetto selezionato.

Utilizzo

  1. Selezionare un oggetto con facce. Verranno tratteggiate solo le facce piane dell'oggetto.
  2. Esistono diversi modi per invocare il comando:
    • Premere il pulsante Tratteggio.
    • Selezionare l'opzione Drafting → Tratteggio dal menu.
    • Usare la scorciatoia da tastiera: H poi A.
  3. Si apre il pannello attività Tratteggio. Vedere Opzioni per maggiori informazioni.
  4. Premere il pulsante OK per terminare il comando.

Opzioni

  • Premere il pulsante ... per selezionare un file PAT. Vedere Note.
  • Selezionare un Motivo dal file. Attualmente è consigliabile evitare motivi con linee tratteggiate.
  • Specificare un Scala per il motivo.
  • Specificare un Rotazione per il motivo.
  • Premere Esc o il pulsante Annulla per interrompere il comando.

Allineamento motivo

Quando viene calcolato il motivo del tratteggio per una faccia, viene temporaneamente tradotto nel piano XY globale per impostazione predefinita. Per una faccia con bordo dritto, il primo bordo dritto determina come ciò avvenga. Il primo punto di quel bordo viene posizionato sull'origine e il bordo stesso viene allineato con l'asse X. Se vengono create Polilinee con questo presupposto, si può controllare come il motivo del tratteggio verrà allineato con il contorno della faccia.

Se tutte le facce dell'oggetto selezionate si trovano sul piano XY globale, si può disattivare questo comportamento predefinito impostando la proprietà DatiTranslate del Tratteggio su false. Il motivo di tratteggio verrà quindi allineato con l'origine e l'asse X del sistema di coordinate globale. Per le facce sul piano XY con spigoli dritti, la proprietà DatiTranslate può essere utilizzata per alternare tra motivi assoluti (a sinistra nell'immagine) e relativi (a destra nell'immagine).

Due Polilinee con Tratteggio.
Le Polilinee sono state create in senso antiorario partendo dal punto in basso a sinistra.
Per il tratteggio a sinistra, la proprietà Translate è impostata su false.
Per il tratteggio sulla destra è impostata su true.

Note

  • Per ora il consiglio è di scaricare un file PAT. Molti possono essere trovati online. Ad esempio, si può eseguire una ricerca web per acad.pat o acadiso.pat.
  • Un piccolo file PAT viene installato con FreeCAD: <program_folder>/data/Mod/TechDraw/PAT/FCPAT.pat, dove <program_folder> è la cartella del programma FreeCAD:
    • Su Linux di solito è /usr/share/freecad.
    • Su Windows di solito è C:\Program Files\FreeCAD.
    • Su macOS di solito è /Applications/FreeCAD.

Preferenze

Vedere anche: Impostare le preferenze e Preferenze per l'ambiente Draft.

Sono coinvolte le seguenti preferenze:

  • PAT file: Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → FilePattern.
  • Motivo: Tools → Edit parameters... → BaseApp → Preferences → Mod → TechDraw → PAT → NamePattern.
  • Scala: Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternScale.
  • Rotazione: Tools → Edit parameters... → BaseApp → Preferences → Mod → Draft → HatchPatternRotation.

Proprietà

Vedere anche: Editor delle proprietà.

Un oggetto Tratteggio è derivato da una Funzione Part e ne eredita tutte le proprietà. Ha anche le seguenti proprietà aggiuntive:

Dati

Hatch

  • DatiBase (Link): specifica l'oggetto le cui facce sono tratteggiate.
  • DatiFile (File): specifica il file PAT.
  • DatiPattern (String): specifica il nome del motivo.
  • DatiRotation (Angle): specifica la rotazione del motivo.
  • DatiScale (Float): specifica la scala del motivo.
  • DatiTranslate (Bool): specifica se le facce vengono traslate temporaneamente sul piano XY globale durante il processo di tratteggio. Impostandolo su false si potrebbero ottenere risultati errati per le facce non XY.

Script

Vedere anche: Autogenerated API documentation e Script di base per FreeCAD.

Per creare un Draft Tratteggio utilizzare il metodo make_hatch del modulo Draft.

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

Esempio:

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