TechDraw Vista

From FreeCAD Documentation
This page is a translated version of the page TechDraw View and the translation is 18% complete.
Outdated translations are marked like this.

TechDraw Vista

Ubicación en el Menú
TechDraw → Insertar Vista
Entornos de trabajo
TechDraw
Atajo de teclado por defecto
Ninguno
Introducido en versión
-
Ver también
TechDraw Insertar Grupo de Proyección, TechDraw Insertar vista de sección

Descripción

La herramienta Vista añade una representación de uno o más objetos a una página de Dibujo. Este es el elemento básico del módulo TechDraw. La mayoría de las otras Vistas se derivan de alguna manera de NuevoVista.

View will try to draw anything with a Shape property. You can select sketches, PartDesign Bodies, Draft objects etc. View will also extract any shapes from objects within a Std Part or a Std Group.

Vista de una caja sólida con líneas ocultas

Utilización

  1. Optionally rotate the 3D view. Unless a face is selected in the next step, the camera direction in the 3D view determines the initial value of the DatosDirection property of the View.
  2. Select one or more objects in the 3D view or Tree view. When selecting in the 3D view the first selected face determines the initial value of the DatosDirection property.
  3. If there are multiple drawing pages in the document: optionally add the desired page to the selection by selecting it in the Tree view.
  4. There are several ways to invoke the tool:
    • Press the Insert View button.
    • Select the TechDraw → TechDraw Views → Insert View option from the menu.
  5. If there are multiple drawing pages in the document and you have not yet selected a page, the Page Chooser dialog box opens: introduced in version 0.20
    1. Select the desired page.
    2. Press the OK button.

Propiedades

Datos

Base

  • DatosX (Distance): The view's horizontal position on the page. (1)
  • DatosY (Distance): The view's vertical position on the page. (1)
  • DatosLock Position (Bool): Prevents Views from being dragged in the Gui when true. The View can still be moved by changing X,Y properties. (1)
  • DatosRotation (Angle): Counterclockwise rotation of the View on the page in degrees. (1)
  • DatosScale Type (Enumeration): The scale type. Options: (1)
    • Page: Use the Page's scale setting.
    • Automatic: Fit the view to the page.
    • Custom: Use the scale defined by DatosScale.
  • DatosScale (FloatConstant): The view will be rendered on the page in Scale:1 ratio to the Source. (1)
  • DatosCaption (String): Optional short text caption. (1)

Cosmetics

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

HLR Parameters

  • DatosCoarse 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.
  • DatosSmooth Visible (Bool): Visible Smooth lines on/off.
  • DatosSeam Visible (Bool): Visible Seam lines on/off.
  • DatosIso Visible (Bool): Visible Isometric(u,v) lines on/off.
  • DatosHard Hidden (Bool): Hidden lines on/off.
  • DatosSmooth Hidden (Bool): Hidden Smooth lines on/off.
  • DatosSeam Hidden (Bool): Hidden Seam lines on/off.
  • DatosIso Hidden (Bool): Hidden Isometric(u,v) lines on/off.
  • DatosIso Count (Integer): Number of Isometric(u,v) lines to draw on each face.

Projection

  • DatosSource (LinkList): Links to the drawable objects to be depicted.
  • DatosXSource (XLinkList): Links to the drawable objects in an external file.
  • DatosDirection (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).
  • DatosXDirection (Vector): This vector controls the rotation of the view around the Direction.
  • DatosPerspective (Bool): true for perspective projection, false for orthogonal projection.
  • DatosFocus (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) these properties are common to all View types.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

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