TechDraw ActiveView: Difference between revisions

From FreeCAD Documentation
(put the name of the dialog box)
(The mentioned Properties are in fact task panel options.)
Line 38: Line 38:
# If you have multiple drawing pages in your document, you will also need to select the desired page in the tree.
# If you have multiple drawing pages in your document, you will also need to select the desired page in the tree.
# Press the {{Button|[[Image:TechDraw ActiveView.svg|16px]] [[TechDraw_ActiveView|Insert Active View]]}} button
# Press the {{Button|[[Image:TechDraw ActiveView.svg|16px]] [[TechDraw_ActiveView|Insert Active View]]}} button
# The {{MenuCommand|ActiveView to TD View}} task panel opens. See [[#Options|Options]] for more information.
# A dialog will open to allow you to specify the size, border and background color of the copy.
# Press the {{Button|OK}} button.

== Options ==

The following options are available:

* {{MenuCommand|Width}}: The width of the generated view.
* {{MenuCommand|Height}}: The height of the generated view.
* {{MenuCommand|Border}}: The amount of empty space to be left around the view (but within Width x Height).
* {{MenuCommand|Background}}: Show or hide a background.
* {{MenuCommand|Background Color}}: Color to paint the background, if applicable.
* {{MenuCommand|Line Width}}: Thickness of individual lines in the view.
* {{MenuCommand|Render Mode}}: The [https://grey.colorado.edu/coin3d/classSoRenderManager.html#a4b8d99cff0fd91e31bc2c5d33610f6eb render mode] of the library [https://en.wikipedia.org/wiki/Coin3D Coin3d]. The possible modes are:
** {{Value|AS_IS}} Render primitives as they are
** {{Value|WIREFRAME}} Render polygons as wireframe
** {{Value|POINTS}} Render only the vertices of the polygons and lines
** {{Value|WIREFRAME_OVERLAY}} Render a wireframe overlay in addition to the {{Value|AS_IS}} mode
** {{Value|HIDDEN_LINE}} As {{Value|WIREFRAME}}, but culls lines which would otherwise not be shown due to geometric culling
** {{Value|BOUNDING_BOX}} Only show the bounding box of each object


== Notes == <!--T:7-->
== Notes == <!--T:7-->
Line 51: Line 70:
<!--T:22-->
<!--T:22-->
See [[Image:TechDraw_Symbol.svg|16px]] [[TechDraw_Symbol|Symbol]]
See [[Image:TechDraw_Symbol.svg|16px]] [[TechDraw_Symbol|Symbol]]

=== Dialog box: ActiveView to TD View=== <!--T:14-->

* {{PropertyData|Width}}: The width of the generated view.
* {{PropertyData|Height}}: The height of the generated view.
* {{PropertyData|Border}}: The amount of empty space to be left around the view (but within Width x Height).
* {{PropertyData|Background}}: Show or hide a background.
* {{PropertyData|Background Color}}: Color to paint the background, if applicable.
* {{PropertyData|Line Width}}: Thickness of individual lines in the view.
* {{PropertyData|Render Mode}}: The [https://grey.colorado.edu/coin3d/classSoRenderManager.html#a4b8d99cff0fd91e31bc2c5d33610f6eb render mode] of the library [https://en.wikipedia.org/wiki/Coin3D Coin3d]. The possible modes are
** '''AS_IS''' Render primitives as they are
** '''WIREFRAME''' Render polygons as wireframe
** '''POINTS''' Render only the vertices of the polygons and lines
** '''WIREFRAME_OVERLAY''' Render a wireframe overlay in addition to the '''AS_IS''' mode
** '''HIDDEN_LINE''' As '''WIREFRAME''', but culls lines which would otherwise not be shown due to geometric culling
** '''BOUNDING_BOX''' Only show the bounding box of each object


==Scripting== <!--T:6-->
==Scripting== <!--T:6-->

Revision as of 15:16, 14 April 2022

TechDraw ActiveView

Menu location
TechDraw → Insert Active View (3D View)
Workbenches
TechDraw
Default shortcut
None
Introduced in version
0.19
See also
TechDraw Symbol

Description

The ActiveView tool inserts a copy of a 3D window into a drawing page.

A simple view from the 3D model that doesn't perform any complex calculation.

Usage

  1. Navigate to the 3D window you wish to copy.
  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 Insert Active View button
  4. The ActiveView to TD View task panel opens. See Options for more information.
  5. Press the OK button.

Options

The following options are available:

  • Width: The width of the generated view.
  • Height: The height of the generated view.
  • Border: The amount of empty space to be left around the view (but within Width x Height).
  • Background: Show or hide a background.
  • Background Color: Color to paint the background, if applicable.
  • Line Width: Thickness of individual lines in the view.
  • Render Mode: The render mode of the library Coin3d. The possible modes are:
    • AS_IS Render primitives as they are
    • WIREFRAME Render polygons as wireframe
    • POINTS Render only the vertices of the polygons and lines
    • WIREFRAME_OVERLAY Render a wireframe overlay in addition to the AS_IS mode
    • HIDDEN_LINE As WIREFRAME, but culls lines which would otherwise not be shown due to geometric culling
    • BOUNDING_BOX Only show the bounding box of each object

Notes

  • Active views are static once generated, they are never updated with changes to the 3D model.
  • ActiveView behind the scenes is a Symbol View. Its DataScale Type is therefore always initialized as Custom.
  • This tool is still somewhat Experimental.

Properties

See Symbol

Scripting

See also: TechDraw API and FreeCAD Scripting Basics.

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

import TechDrawGui
TechDrawGui.copyActiveViewToSvgFile(Gui.ActiveDocument.ActiveView,"myFile.svg")