TechDraw ActiveView: Difference between revisions

From FreeCAD Documentation
(File:TechDraw_ActiveView_Example.png, with "_example" for convention. And added caption: A simple view from the 3D model that doesn't perform any complex calculation.)
No edit summary
(18 intermediate revisions by 8 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:19-->
<!--T:19-->
{{Docnav
{{Docnav|[[TechDraw_Spreadsheet|Spreadsheet]]|[[TechDraw_Clip|Clip]]|[[TechDraw_Module|TechDraw]]|IconL=techdraw-spreadsheet.svg|IconC=Workbench_TechDraw.svg|IconR=techdraw-clip.svg}}
|[[TechDraw_View|View]]
|[[TechDraw_ProjectionGroup|Projection Group]]
|[[TechDraw_Module|TechDraw]]
|IconL=TechDraw View.svg
|IconR=TechDraw_ProjectionGroup.svg
|IconC=Workbench_TechDraw.svg
}}


<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=TechDraw ActiveView
|Name=TechDraw ActiveView
|MenuLocation=TechDraw → Insert Active View (3D View)
|Icon=techdraw-activeview.svg
|MenuLocation=TechDraw → View
|Workbenches=[[TechDraw_Module|TechDraw]]
|Workbenches=[[TechDraw Module|TechDraw]]
|SeeAlso=
|Version=0.19
|Version=0.19
|SeeAlso=[[TechDraw_Symbol|TechDraw Symbol]]
}}
}}


Line 17: Line 23:


<!--T:10-->
<!--T:10-->
The ActiveView tool inserts a copy of a 3D window into a Drawing page.
The ActiveView tool inserts a copy of a 3D window into a drawing page.


</translate>
</translate>
[[File:TechDraw_ActiveView_Example.png]]
[[File:TechDraw_ActiveView_example.png]]
<translate>
<translate>


<!--T:21-->
{{Caption|A simple view from the 3D model that doesn't perform any complex calculation.}}
{{Caption|A simple view from the 3D model that doesn't perform any complex calculation.}}


==How to use== <!--T:3-->
==Usage== <!--T:3-->


<!--T:12-->
<!--T:12-->
# Navigate to the 3D window you wish to copy.
# Navigate to the 3D window you wish to copy.
# 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|ActiveView]]}} button
# Press the {{Button|[[Image:TechDraw ActiveView.svg|16px]] [[TechDraw_ActiveView|Insert Active View]]}} button
# A dialog will open to allow you to specify the size, border and background color of the copy.
# A dialog will open to allow you to specify the size, border and background color of the copy.


Line 37: Line 44:
<!--T:13-->
<!--T:13-->
* Active views are static once generated, they are never updated with changes to the 3D model.
* Active views are static once generated, they are never updated with changes to the 3D model.
* ActiveView behind the scenes is a [[Image:TechDraw_Symbol.svg|24px]] [[TechDraw_Symbol|Symbol View]]. Its {{PropertyData|Scale Type}} is therefore always initialized as ''Custom''.
* This tool is still somewhat '''Experimental'''.
* This tool is still somewhat '''Experimental'''.


==Properties== <!--T:5-->
==Properties== <!--T:5-->


<!--T:22-->
see [[Image:Techdraw-symbol.svg|16px]] [[TechDraw Symbol|Symbol]]
See [[Image:TechDraw_Symbol.svg|16px]] [[TechDraw_Symbol|Symbol]]



=== Dialog Fields === <!--T:14-->
=== Dialog Fields === <!--T:14-->
Line 51: Line 59:
* {{PropertyData|Background Color}}: Color to paint the background, if applicable.
* {{PropertyData|Background Color}}: Color to paint the background, if applicable.
* {{PropertyData|Line Width}}: Thickness of individual lines in the view.
* {{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
* {{PropertyData|Render Mode}}: Various special effects. See Coin3d SoRenderManager for details.
** '''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-->


<!--T:15-->
<!--T:15-->
{{Emphasis|See also:}} [[TechDraw API]] and [[FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[TechDraw_API|TechDraw API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:16-->
<!--T:16-->
The New View tool can be used in [[macros]] and from the [[Python]] console by using the following functions:
The ActiveView tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following functions:


</translate>
</translate>
Line 69: Line 83:


<!--T:20-->
<!--T:20-->
{{Docnav
{{Docnav|[[TechDraw_Spreadsheet|Spreadsheet]]|[[TechDraw_Clip|Clip]]|[[TechDraw_Module|TechDraw]]|IconL=techdraw-spreadsheet.svg|IconC=Workbench_TechDraw.svg|IconR=techdraw-clip.svg}}
|[[TechDraw_View|View]]

|[[TechDraw_ProjectionGroup|Projection Group]]
<!--T:17-->
|[[TechDraw_Module|TechDraw]]
{{TechDraw Tools navi}}
|IconL=TechDraw View.svg
|IconR=TechDraw_ProjectionGroup.svg
|IconC=Workbench_TechDraw.svg
}}


<!--T:18-->
{{Userdocnavi}}
</translate>
</translate>
{{TechDraw Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Revision as of 20:30, 21 December 2020

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. A dialog will open to allow you to specify the size, border and background color of the copy.

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

Dialog Fields

  • DataWidth: The width of the generated view.
  • DataHeight: The height of the generated view.
  • DataBorder: The amount of empty space to be left around the view (but within Width x Height).
  • DataBackground: Show or hide a background.
  • DataBackground Color: Color to paint the background, if applicable.
  • DataLine Width: Thickness of individual lines in the view.
  • DataRender 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

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