TechDraw DraftView/pl: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 19: Line 19:
==Description==
==Description==


The [[Image:TechDraw_DraftView.svg|24px]] [[TechDraw_DraftView|DraftView]] tool inserts a view of a selected [[Part_Workbench|Part]]-based or Group object into a drawing page. Unlike the standard [[Image:TechDraw_View.svg|24px]] [[TechDraw_View|View]] tool, views created with this tool are handled by the [[Image:Workbench_Draft.svg|24px]] [[Draft_Workbench|Draft Workbench]], and specially designed for showing 2D objects. See Notes.
The [[Image:TechDraw_DraftView.svg|24px]] [[TechDraw_DraftView|DraftView]] tool inserts a view of a selected [[Part_Workbench|Part]]-based or Group object into a drawing page. Unlike the standard [[Image:TechDraw_View.svg|24px]] [[TechDraw_View|View]] tool, views created with this tool are handled by the [[Image:Workbench_Draft.svg|24px]] [[Draft_Workbench|Draft Workbench]], and specially designed for showing 2D objects. See [[#Notes|Notes]].


[[Image:TechDraw_DraftView_example.png]]
[[Image:TechDraw_DraftView_example.png]]
Line 30: Line 30:
# Press the {{Button|[[Image:TechDraw DraftView.svg|16px]] [[TechDraw_DraftView|Insert Draft Workbench Object]]}} button
# Press the {{Button|[[Image:TechDraw DraftView.svg|16px]] [[TechDraw_DraftView|Insert Draft Workbench Object]]}} button
# A view of the draft object will appear on the page.
# A view of the draft object will appear on the page.

=== Limitations ===

The DraftView is rendered within the [[Draft_Workbench|Draft Workbench]], therefore TechDraw has limited control over its appearance. You may need to make changes within Draft to get the representation you want.


==Options==
==Options==
Line 45: Line 41:
==Properties==
==Properties==


See also [[TechDraw_View#Properties|TechDraw View]].
* {{PropertyData|Source}}: The Draft object to be displayed
* {{PropertyData|LineWidth}}: The width of the lines, independently of the scale
* {{PropertyData|FontSize}}: The size of all texts appearing in this view (texts and dimensions)
* {{PropertyData|Direction}}: The projection direction to use
* {{PropertyData|Color}}: The color of lines
* {{PropertyData|LineStyle}}: A line style to use for this view. Can be Solid, Dashed, Dashdot, Dot or a SVG line pattern like 0.20,0.20
* {{PropertyData|LineSpacing}}: The spacing to use between lines of texts for multiline texts


=== Data ===
Note: Draft View inherits all applicable basic View properties.

{{TitleProperty|Draft view}}

* {{PropertyData|Source|Link}}: The Draft object to be displayed.
* {{PropertyData|Line Width|Float}}: The width of the lines, independently of the scale.
* {{PropertyData|Font Size|Float}}: The size of all texts appearing in this view (texts and dimensions).
* {{PropertyData|Direction|Vector}}: The projection direction to use.
* {{PropertyData|Color|Color}}: The color of lines.
* {{PropertyData|Line Style|String}}: A line style to use for this view. Can be {{Value|Solid}}, {{Value|Dashed}}, {{Value|Dashdot}}, {{Value|Dot}} or an SVG line pattern like {{Value|0.20,0.20}}.
* {{PropertyData|Line Spacing|Float}}: The spacing to use between lines of texts for multiline texts.
* {{PropertyData|Override Style|Bool}}: If {{TRUE}}, line color, width and style of this view will override those of the rendered object.

== Notes ==

The DraftView is rendered within the [[Draft_Workbench|Draft Workbench]], therefore TechDraw has limited control over its appearance. You may need to make changes within Draft to get the representation you want.


==Scripting==
==Scripting==

Revision as of 09:42, 11 September 2022

TechDraw DraftView

Menu location
TechDraw → Insert Draft Workbench Object
Workbenches
TechDraw, Draft
Default shortcut
None
Introduced in version
-
See also
TechDraw Arch View

Description

The DraftView tool inserts a view of a selected Part-based or Group object into a drawing page. Unlike the standard View tool, views created with this tool are handled by the Draft Workbench, and specially designed for showing 2D objects. See Notes.

Draft elements like circles and arrays imported into a TechDraw drawing page

Usage

  1. Select a Draft object in the 3D view or in the tree
  2. If you have multiple drawing pages in your document, you will need to select the desired page in the tree.
  3. Press the Insert Draft Workbench Object button
  4. A view of the draft object will appear on the page.

Options

  • Creating a DraftView of a layer will recursively handle all objects found in that layer. The View is updated automatically when the contents of the layer changes
  • There is no hidden line removal. Each face found in the handled object(s) will simply be projected along the Direction vector, no specific action is taken when faces overlap
  • The Draft View also supports all Draft objects that are not Part-based, such as dimensions and texts
  • Color, line width and line pattern can be specified in the properties. Line patterns can be fine-tuned by directly giving a stroke-dasharray value, such as 3,5
  • Projected faces are filled with the face color

Properties

See also TechDraw View.

Data

Draft view

  • DANESource (Link): The Draft object to be displayed.
  • DANELine Width (Float): The width of the lines, independently of the scale.
  • DANEFont Size (Float): The size of all texts appearing in this view (texts and dimensions).
  • DANEDirection (Vector): The projection direction to use.
  • DANEColor (Color): The color of lines.
  • DANELine Style (String): A line style to use for this view. Can be Solid, Dashed, Dashdot, Dot or an SVG line pattern like 0.20,0.20.
  • DANELine Spacing (Float): The spacing to use between lines of texts for multiline texts.
  • DANEOverride Style (Bool): If true, line color, width and style of this view will override those of the rendered object.

Notes

The DraftView is rendered within the Draft Workbench, therefore TechDraw has limited control over its appearance. You may need to make changes within Draft to get the representation you want.

Scripting

See also: TechDraw API and FreeCAD Scripting Basics.

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

dv = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewDraft','TestDraft')
dv.Source = myDraftbject
rc = page.addView(dv)