TechDraw: Vista

From FreeCAD Documentation
Revision as of 21:06, 3 March 2024 by Marco T (talk | contribs)

TechDraw Vista

Posizione nel menu
TechDraw → Viste TechDraw → Inserisci Vista
Ambiente
TechDraw
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Gruppo di proiezioni, Vista di sezione

Descrizione

Lo strumento TechDraw Vista aggiunge una rappresentazione di uno o più oggetti ad una pagina di disegno. Questo è l'elemento base dell'ambiente TechDraw. La maggior parte delle altre visualizzazioni derivano in qualche modo da Vista.

Vista proverà a disegnare qualsiasi cosa con una proprietà Shape. È possibile selezionare schizzi, corpi PartDesign, oggetti Draft ecc. Vista estrarrà anche qualsiasi forma dagli oggetti all'interno di una Parte o di un Gruppo.

Vista di un solido con linee nascoste

Utilizzo

  1. Facoltativamente ruotare la Vista 3D. A meno che non venga selezionata una faccia nel passaggio successivo, la direzione della telecamera nella Vista 3D determina il valore iniziale della proprietà DatiDirection della Vista.
  2. Selezionare uno o più oggetti nella Vista 3D o nella Vista ad albero. Quando si seleziona nella vista 3D, la prima faccia selezionata determina il valore iniziale della proprietà DatiDirection.
  3. Se nel documento sono presenti più pagine di disegno: facoltativamente aggiungere la pagina desiderata alla selezione selezionandola nella Vista ad albero.
  4. Esistono diversi modi per richiamare lo strumento:
    • Premere il pulsante Inserisci Vista.
    • Selezionare l'opzione TechDraw → Viste TechDraw → Inserisci Vista dal menu.
  5. Se nel documento sono presenti più pagine di disegno e non è stata ancora selezionata una pagina, si apre la finestra di dialogo Scelta Pagina: disponibile dalla versione 0.20
    1. Selezionare la pagina desiderata.
    2. Premere il pulsante OK.

Proprietà

Dati

Base

  • DatiX (Distance): la posizione orizzontale della vista sulla pagina. (1)
  • DatiY (Distance): la posizione verticale della vista sulla pagina. (1)
  • DatiLock Position (Bool): impedisce alle viste di essere trascinate nella GUI quando true. La vista può ancora essere spostata modificando le proprietà X,Y. (1)
  • DatiRotation (Angle): rotazione in senso antiorario della vista sulla pagina in gradi. (1)
  • DatiScale Type (Enumeration): il tipo di scala. Opzioni: (1)
    • Page: utilizza l'impostazione di scala di Page.
    • Automatic: adatta la visualizzazione alla pagina.
    • Custom: utilizza la scala definita da DatiScale.
  • DatiScale (FloatConstant): la vista verrà visualizzata sulla pagina in rapporto Scala:1 rispetto all'origine. (1)
  • DatiCaption (String): didascalia di testo breve opzionale. (1)

Cosmetics

  • Dati (Hidden)Cosmetic Vertexes (TechDraw::PropertyCosmeticVertexList)
  • Dati (Hidden)Cosmetic Edges (TechDraw::PropertyCosmeticEdgeList)
  • Dati (Hidden)Center Lines (TechDraw::PropertyCenterLineList)
  • Dati (Hidden)Geom Formats (TechDraw::PropertyGeomFormatList)

HLR Parameters

  • DatiCoarse View (Bool): If true, TechDraw will use a polygon approximation to calculate drawing geometry. If false, TechDraw will use a precision algorithm. CoarseView can be much faster for complex models. The quality of the drawing is reduced, since every curve is approximated as a series of short line segments. Vertices are not displayed in CoarseView since each short segment would result in two new Vertices and the display becomes cluttered. Linear Dimensions can be added to a CoarseView, but are unlikely to be useful.
  • DatiSmooth Visible (Bool): Visible Smooth lines on/off.
  • DatiSeam Visible (Bool): Visible Seam lines on/off.
  • DatiIso Visible (Bool): Visible Isometric(u,v) lines on/off.
  • DatiHard Hidden (Bool): Hidden lines on/off.
  • DatiSmooth Hidden (Bool): Hidden Smooth lines on/off.
  • DatiSeam Hidden (Bool): Hidden Seam lines on/off.
  • DatiIso Hidden (Bool): Hidden Isometric(u,v) lines on/off.
  • DatiIso Count (Integer): Number of Isometric(u,v) lines to draw on each face.

Projection

  • DatiSource (LinkList): Links to the drawable objects to be depicted.
  • DatiXSource (XLinkList): Links to the drawable objects in an external file.
  • DatiDirection (Vector): This vector controls the direction from which you are viewing the object. +X is right, -X is left, +Y is rear, -Y is front (looking into the screen), +Z is up and -Z is down. So a Front view is (0,-1,0) and an isometric view is (1,-1,1).
  • DatiXDirection (Vector): This vector controls the rotation of the view around the Direction.
  • DatiPerspective (Bool): true for perspective projection, false for orthogonal projection.
  • DatiFocus (Distance): Distance from camera to projection plane for perspective projections. Needs to be adjusted to fit the object. Too far and the perspective is lost, too close and the object is distorted.

View

Base

  • VistaKeep Label (Bool): Always show view label if true. (1)
  • VistaStack Order (Integer): Over or under lap relative to other views. (1) introduced in version 0.21

Decoration

  • VistaArc Center Marks (Bool): Circular arc center marks on/off.
  • VistaCenter Scale (Float): Circular arc center mark size adjustment, if enabled.
  • VistaHoriz Center Line (Bool): Show a horizontal centerline through the view.
  • VistaSection Line Color (Color): Set the section line color if applicable.
  • VistaSection Line Style (Enumeration): Set the section line style if applicable.
  • VistaShow All Edges (Bool): Temporarily show invisible lines.
  • VistaShow Section Line (Bool): Show/hide the section line if applicable.
  • VistaVert Center Line (Bool): Show a vertical centerline through the view.

Highlight

  • VistaHighlight Adjust (Float): Adjust the rotation of the Detail highlight if applicable.
  • VistaHighlight Line Color (Color): Set the highlight line color if applicable.
  • VistaHighlight Line Style (Enumeration): Set the highlight line style if applicable.

Lines

  • VistaExtra Width (Length): Not implemented yet.
  • VistaHidden Width (Length): The thickness of hidden lines, if enabled.
  • VistaIso Width (Length): The thickness of isometric(u,v) surface lines and Dimension lines.
  • VistaLine Width (Length): The thickness of visible lines. See Line Groups.

(1) queste proprietà sono comuni a tutti i tipi di Viste.

Script

A View can be created with macros and from the Python console by using the following functions:

import FreeCAD as App

doc = App.ActiveDocument
box = doc.addObject("Part::Box", "Box")

page = doc.addObject("TechDraw::DrawPage", "Page")
template = doc.addObject("TechDraw::DrawSVGTemplate", "Template")
template.Template = App.getResourceDir() + "Mod/TechDraw/Templates/A4_LandscapeTD.svg"
page.Template = template

# Toggle the visibility of the page to ensure its width and height are updated (hack):
page.Visibility = False
page.Visibility = True

view = doc.addObject("TechDraw::DrawViewPart", "View")
page.addView(view)
view.Source = [box]
view.Direction = (0, 0, 1)

view.X = page.PageWidth / 2
view.Y = page.PageHeight / 2

doc.recompute()