TechDraw View

From FreeCAD Documentation
Revision as of 21:42, 22 January 2018 by Wandererfan (talk | contribs)

TechDraw NewView

Menu location
TechDraw → View
Workbenches
TechDraw
Default shortcut
na
Introduced in version
-
See also
None

Description

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

File:ViewOfBox2.png

How to use

  1. Select one or more objects (Body or Part) 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.png View button

Options

None.

Properties

  • 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)
  • DataScale: A view will be rendered on the page in Scale:1 ratio to the Source. (1)
  • DataScaleType: "Document": use the Page's scale setting. "Custom": use a scale unique to this view. "Automatic": fit view to page. (1)
  • DataRotation: Counterclockwise rotation of the View on the page in degrees. (1)
  • DataSource: The 3D object to be depicted
  • DataDirection: A vector representing the viewing direction. Common Directions are Front: (0,-1,0), Top: (0,0,1), Right: (1,0,0), Axo: (1,1,1). (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.
  • DataShowHiddenLines: Hidden lines on/off.
  • DataShowSmoothLines: Smooth lines on/off.
  • DataShowSeamLines: Seam lines on/off.
  • DataTolerance: Internal tolerance.
  • DataLineWidth: The thickness of visible lines.
  • DataHiddenWidth: The thickness of hidden lines, if enabled.
  • DataShowCenters: Circle/arc center marks on/off.
  • DataCenterScale: Center mark size adjustment, if enabled.
  • DataHorizCenterLine: Show a horizontal centerline through view.
  • DataVertCenterLine: Show a vertical centerline through view.
  • DataShowSectionLine: Show/hide section line if applicable.

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

Scripting

Views can be added to Pages using Python.

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)

Notes

  • View will draw anything with a Shape property. You can select Draft objects or Bodies also. View will also extract any shapes from objects within an App::Part container.
  • 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 very cluttered. Linear Dimensions can be added to a CoarseView, but are unlikely to be very useful.