Ambiente Draft

From FreeCAD Documentation
Revision as of 13:48, 2 July 2022 by Simone.b (talk | contribs)
L'icona di Draft

Introduzione

L' Ambiente Draft si concentra principalmente sulla creazione e modifica di oggetti 2D in FreeCAD. Ma non è limitato al piano XY del sistema di coordinate globale. I suoi oggetti possono avere qualsiasi orientamento e posizione nello spazio 3D e alcuni oggetti Draft possono essere planari o non planari.

Gli oggetti Draft possono essere utilizzati per il disegno generale, in modo simile a quanto si può fare con Inkscape o AutoCAD. Ma possono anche costituire la base per la creazione di oggetti 3D in altri banchi di lavoro. Una Polilinea può definire il percorso di un Muro, un Poligono può essere estruso con Estruzione, ecc. Molti degli strumenti di Modifica possono essere comunque applicati agli oggetti 2D e 3D creati con altri ambienti di lavoro. Ad esempio, puoi spostare uno Sketch o creare una Serie Ortogonale da un oggetto Part.

The Draft Workbench also provides tools to define a working plane, a grid, and a snapping system to precisely control the position of geometry.

FreeCAD è principalmente un'applicazione di modellazione 3D, quindi i suoi strumenti 2D non sono così avanzati come in altri programmi di disegno. Se l'obiettivo principale è la produzione di disegni 2D complessi e di file DXF, e non si ha bisogno di modelli 3D, si può prendere in considerazione un programma software dedicato al disegno tecnico come LibreCAD, QCad, e altri.

The image shows the grid aligned with the XY plane.
On the left, in white, several planar objects.
On the right a non-planar Draft Wire used as the Path Object of a Draft PathArray.

Drafting

  • Line: creates a straight line.
  • Polyline: creates a polyline, a sequence of several connected line segments.
  • Arc tools
  • Arc: creates a circular arc from a center, a radius, a start angle and an aperture angle.
  • Circle: creates a circle from a center and a radius.
  • Ellipse: creates an ellipse from two points defining a rectangle in which the ellipse will fit.
  • Rectangle: creates a rectangle from two points.
  • Polygon: creates a regular polygon from a center and a radius.
  • B-spline: creates a B-spline curve from several points.
  • Bézier tools
  • Point: creates a simple point.
  • Facebinder: creates a surface object from selected faces.
  • ShapeString: creates a compound shape that represents a text string.

Annotation

  • Text: creates a multi-line text at a given point.
  • Dimension: creates a linear dimension, a radial dimension or an angular dimension.
  • Label: creates a multi-line text with a 2-segment leader line and an arrow.

Modification

  • Move: moves or copies selected objects from one point to another.
  • Rotate: rotates or copies selected objects around a center point by a given angle.
  • Scale: scales or copies selected objects around a base point.
  • Mirror: creates mirrored copies from selected objects.
  • Offset: offsets each segment of a selected object over a given distance, or creates an offset copy of the selected object.
  • Trimex: trims or extends a selected object.
  • Stretch: stretches objects by moving selected points.
  • Clone: creates linked copies, clones, of selected objects.
  • Array tools
  • Path array: creates an array from a selected object by placing copies along a path.
  • Point Array: creates an array from a selected object by placing copies at the points from a point compound.
  • Edit: puts selected objects in Draft Edit mode. In this mode the properties of objects can be edited graphically.
  • Subelement highlight: temporarily highlights selected objects, or the base objects of selected objects.
  • Upgrade: upgrades selected objects.

Barra degli strumenti del vassoio di Draft

La barra degli strumenti del vassoio di Draft viene visualizzata all'avvio dell'ambiiente e consente di selezionare il piano di lavoro, insieme ad alcune proprietà visive come il colore della linea, il colore della forma, la dimensione del testo, la larghezza della linea e il gruppo automatico.

  • Toggle construction mode: switches Draft construction mode on or off. Also available in the menu: Draft → Utilities → Toggle construction mode.

Draft annotation scale widget

With the Draft annotation scale widget the Draft annotation scale can be specified. introduced in version 0.19

Draft snap widget

The Draft snap widget can be used as an alternative for the Draft Snap toolbar. introduced in version 0.19

Barra degli strumenti di aggancio

La barra degli strumenti di Aggancio consente di selezionare la modalità di aggancio corrente. Il suo pulsante rimane premuto quando una modalità è attiva.

  • Snap Lock: enables or disables snapping globally.
  • Snap Angle: snaps to the special cardinal points on circular edges, at multiples of 30° and 45°.
  • Snap Extension: snaps to an imaginary line that extends beyond the endpoints of straight edges.
  • Snap Parallel: snaps to an imaginary line parallel to straight edges.
  • Snap Special: snaps to special points defined by the object.
  • Snap Near: snaps to the nearest point on faces or edges.
  • Snap Ortho: snaps to imaginary lines that cross the previous point at 0°, 45°, 90° and 135°.
  • Snap Grid: snaps to the intersections of grid lines.

Strumenti di utilità

Menu di utilità

Strumenti aggiuntivi disponibili dal menu Draft → Utilità o tramite il menu di scelta rapida visualizzato facendo clic con il pulsante destro del mouse, a seconda dell'oggetto selezionato.

  • Heal: heals problematic Draft objects found in very old files.

Ulteriori funzioni

  • Vincolare: limita il puntatore nei movimenti orizzontali o verticali rispetto a un punto precedente.
  • Ancorare (Snap): posiziona nuovi punti su posti speciali su oggetti esistenti o sulla griglia.
  • Modalità costruzione: Permette di creare geometrie separate dalle altre semplicemente attivandola o disattivandola.
  • Piano di lavoro: consente di selezionare una superficie nello spazio 3D su cui lavorare.

Tree view context menu

The following additional options are available in the Tree view context menu:

Default options

If there is an active document the context menu contains one additional sub-menu:

  • Utilities: a subset of the tools available in the main Draft Utilities menu.

Wire options

For a Draft Wire, Draft BSpline, Draft CubicBezCurve and Draft BezCurve this additional option is available:

  • Flatten this wire: flattens the wire based on its internal geometry. This option currently does not work properly.

Layer container options

For a Draft LayerContainer these additional options are available:

  • Merge layer duplicates: merges all layers with the same base label. This does not work in FreeCAD version 0.19.

Layer options

For a Draft Layer these additional options are available:

Working plane proxy options

For a Draft WorkingPlaneProxy these additional options are available:

  • Write objects state: updates the VistaVisibility Map property of the working plane proxy with the current visibility state of objects in the document.

3D view context menu

The following additional options are available in the 3D view context menu:

Default options

If there is an active document the context menu contains one additional sub-menu:

  • Utilities: a subset of the tools available in the main Draft Utilities menu.

Obsoleti

Questi strumenti sono stati rimossi dall'interfaccia in v0.19 perché non avevano più alcuno scopo.

Preferenze

  • Preferenze: preferenze generali per il piano di lavoro e gli strumenti di disegno.
  • Preferenze Import-Export: preferenze disponibili per l'importazione e l'esportazione in diversi formati di file.

Formato dei file

Queste sono le funzioni per l'apertura, l'importazione o l'esportazione di altri formati di file. Il comando Apri apre un nuovo documento con i contenuti del file, mentre Importa aggiunge i contenuti del file al documento corrente. Esporta salva gli oggetti selezionati in un file. Se non viene selezionato nulla, vengono esportati tutti gli oggetti. Ricordare che lo scopo di Draft è di lavorare con oggetti 2D, quindi le procedure di importazione si concentrano solo su oggetti 2D e sebbene i formati DXF e OCA supportino anche le definizioni di oggetti nello spazio 3D (gli oggetti non sono necessariamente piatti), non importa oggetti volumetrici come mesh, superfici 3D, ecc., ma solo linee, cerchi, testi o forme piatte. I formati di file attualmente supportati sono:

Test unitari

Vedere anche: Ambiente Test.

Per eseguire i test unitari dell'ambiente, eseguire quanto segue dal terminale del sistema operativo.

freecad -t TestDraft

Script

Gli strumenti di Draft possono essere utilizzati nelle macro e dalla console Python utilizzando le API Draft.

L'ambiente include un modulo per creare dei campioni di tutti gli oggetti in un nuovo documento. disponibile dalla versione 0.19

Utilizzare questo per verificare che tutti gli oggetti siano prodotti correttamente.

import drafttests.draft_test_objects as dto
doc = dto.create_test_file()

Ispezionare il codice di questo modulo è utile per capire come utilizzare l'interfaccia di programmazione.

Tutorials