TechDraw View

From FreeCAD Documentation
Revision as of 19:32, 26 November 2018 by Vocx (talk | contribs) (The information doesn't need to be in separate notes, it can be integrated into the other sections)

TechDraw NewView

Menu location
TechDraw → View
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
TechDraw NewProjGroup, TechDraw NewSection

Description

The View tool adds a representation of one or more objects to a Drawing page. This is the basic building block of the TechDraw module. Most other Views are derived in some way from NewView.

View of a solid box with hidden lines

How to use

  1. Select one or more objects (Body, App::Part, Part::Feature, Draft object, ... See Notes) in the 3D window or tree.
  2. If you have multiple drawing pages in your document, you will also need to select the desired page in the tree.
  3. Press the File:Techdraw-view.svg View button

Options

None.

Properties

Data

  • DataX: The view's horizontal position on the page. (1)
  • DataY: The view's vertical position on the page. (1)
  • DataLockPosition: Prevents Views from being dragged in the Gui when true. The View can still be moved by changing X,Y properties. (1)
  • DataRotation: Counterclockwise rotation of the View on the page in degrees. (1)
  • DataScaleType: "Document": use the Page's scale setting. "Custom": use a scale unique to this view. "Automatic": fit view to page. (1)
  • DataScale: A view will be rendered on the page in Scale:1 ratio to the Source. (1)
  • DataCaption: Optional short text caption.
  • DataSource: Links to the Drawable Objects to be depicted
  • DataDirection: A vector representing the viewing direction. See note below. (1)
  • DataPerspective: True for perspective projection, false for orthogonal projection.
  • DataFocus: 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.
  • DataCoarseView: If true, TechDraw will use a polygon approximation to calculate drawing geometry. If false, TechDraw will use a precision algorithm. See Notes.
  • DataSmooth Visible Lines: Visible Smooth lines on/off.
  • DataSeam Visible Lines: Visible Seam lines on/off.
  • DataIso Visible Lines: Visible Isometric(u,v) lines on/off.
  • DataHard Hidden Lines: Hidden lines on/off.
  • DataSmooth Hidden Lines: Hidden Smooth lines on/off.
  • DataSeam Hidden Lines: Hidden Seam lines on/off.
  • DataIso Hidden Lines: Hidden Isometric(u,v) lines on/off.
  • DataIso Count: Number of Isometric(u,v) lines to draw on each face.


(1) these properties are common to all View types.

View

  • ViewKeep Label: Always show View Label if true.
  • ViewLineWidth: The thickness of visible lines. See Line Groups.
  • ViewHiddenWidth: The thickness of hidden lines, if enabled.
  • ViewIsoWidth: The thickness of isometric(u,v) surface lines and Dimension lines.
  • ViewExtraWidth: not implemented yet.
  • ViewShowCenters: Circle/arc center marks on/off.
  • ViewCenterScale: Circular arc center mark size adjustment, if enabled.
  • ViewHorizCenterLine: Show a horizontal centerline through view.
  • ViewVertCenterLine: Show a vertical centerline through view.
  • ViewShowSectionLine: Show/hide section line if applicable.

Scripting

See also: TechDraw API and FreeCAD Scripting Basics.

The New View tool can be used in macros and from the Python console by using the following functions:

view = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewPart','View')
rc = page.addView(view)
FreeCAD.ActiveDocument.View.Source = [App.ActiveDocument.Box]
FreeCAD.ActiveDocument.View.Direction = (0.0,0.0,1.0)