3D view: Difference between revisions

From FreeCAD Documentation
(→‎Actions: MenuCommand template. Small fixes.)
m (decrease image size)
(27 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<translate>
<translate>


== Introduction ==
== Introduction == <!--T:1-->
The [[3D view|3D view]] of FreeCAD is an instance of a Coin3D [[Scenegraph|scenegraph]]. Coin3D is a library that implements the OpenInventor 2.1 scene description standard.


</translate>
[[File:FreeCAD_3D_view.png|800px]]
{{TOCright}}
<translate>


<!--T:2-->
{{Caption|By the default the 3D view shows a small widget with coordinate axes, and the navigation cube also with coordinate axes; the grid can be displayed and configured using the [[Draft Workbench|Draft Workbench]].}}
The [[3D view|3D view]] of FreeCAD is an instance of a Coin3D [[Scenegraph|scenegraph]] that forms the most important window in the [[interface|interface]]. Coin3D is a library that implements the OpenInventor 2.1 scene description standard.


<!--T:3-->
== Actions ==
Certain properties of the view, like background color, [[Mouse Model|mouse navigation]] style, and zooming steps, can be configured in the [[Preferences_Editor|preferences editor]].


<!--T:4-->
When the default [[Start Workbench]] is active, right clicking on the 3D view shows only one command:
[[File:FreeCAD_3D_view.png|600px]]

<!--T:5-->
{{Caption|The [[3D view]] is a component of the FreeCAD [[interface]]. By default it shows a small widget with coordinate axes, and the navigation cube also with coordinate axes; the grid can be displayed and configured by loading the [[Draft Workbench|Draft Workbench]].}}

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

<!--T:16-->
{{Emphasis|Note:}} link actions {{Version|0.19}}.

<!--T:17-->
Since the [[tree view|tree view]] lists most objects that are visible in the 3D view, many of the actions are the same to those that can be executed from the [[tree view|tree view]].

<!--T:7-->
When the default [[Start Workbench|Start Workbench]] is active, right clicking on the 3D view shows only one command:
* {{MenuCommand|[[Mouse Model|Navigation styles]]}}: different button styles to use with a 3-button mouse or laptop trackpad.
* {{MenuCommand|[[Mouse Model|Navigation styles]]}}: different button styles to use with a 3-button mouse or laptop trackpad.


<!--T:8-->
However, once a [[Workbenches|Workbench]] is loaded, there are additional commands:
However, once a [[Workbenches|Workbench]] is loaded, there are additional commands:
* {{MenuCommand|Link actions}}: creates different types of [[Std_LinkMake|App::Link]] objects. {{Version|0.19}}
* {{MenuCommand|Link actions}}: [[Std LinkMake|Make Link]].
** {{MenuCommand|Make Link group}}: [[Std_LinkMakeGroup|Simple group]], [[Std_LinkMakeGroup|Group with links]], [[Std_LinkMakeGroup|Group with transform links]].
* {{MenuCommand|[[Std_ViewFitAll|Fit all]]}}: pan and zoom the 3D view to fit all objects in the document in the screen.
* {{MenuCommand|[[Std_ViewFitSelection|Fit selection]]}}: pan and zoom the 3D view to fit the currently selected object in the screen.
* {{MenuCommand|[[Std_ViewFitAll|Fit all]]}}: pans and zooms the view to fit all objects in the document on the screen.
* {{MenuCommand|[[Std_ViewFitSelection|Fit selection]]}}: pans and zooms the view to tightly fit the currently selected object on the screen.
* {{MenuCommand|Draw style}}: solid, wireframe, and point options.
* {{MenuCommand|[[Std_View_Menu|Standard views]]}}: isometric, top, bottom, left, right.
* {{MenuCommand|[[Std_DrawStyle|Draw style]]}}: as is, flat lines, shaded, wireframe, points, hidden line, no shading.
* {{MenuCommand|[[Std_View_Menu|Standard views]]}}: [[Std_ViewIsometric|isometric]], [[Std_ViewFront|front]], [[Std_ViewTop|top]], [[Std_ViewRight|right]], [[Std_ViewRear|rear]], [[Std_ViewBottom|bottom]], [[Std_ViewLeft|left]], [[Std_ViewRotateLeft|rotate left]], [[Std_ViewRotateRight|rotate right]].
* {{MenuCommand|Measure}}: create some measurements on the 3D view with the selected objects, or clear the measurements on the screen.
* {{MenuCommand|Measure}}: [[View_Measure_Toggle_All|toggle measurement]], [[View_Measure_Clear_All|clear measurement]].
* {{MenuCommand|Document window}}: docked, undocked, and fullscreen.
* {{MenuCommand|Document window}}: [[Std_ViewDockUndockFullscreen|docked]], [[Std_ViewDockUndockFullscreen|undocked]], and [[Std_ViewDockUndockFullscreen|fullscreen]].

<!--T:9-->
Additionally, depending on the workbench and object that is active, other contextual commands may become available.


<!--T:18-->
Additionally, depending on the workbench and object that is active, other command menus may become available. For example, with the [[Part Workbench|Part Workbench]] and one object selected:
For example, with the [[Part Workbench|Part Workbench]] and one object selected:
* {{MenuCommand|Appearance}}: color and sizes of lines and vertices, and color of faces.
* {{MenuCommand|[[Std_SetAppearance|Appearance]]}}: launches the dialog to change color and sizes of lines and vertices, and color of faces.
* {{MenuCommand|Toggle visibility}}: hide or show.
* {{MenuCommand|Toggle selectability}}: set to be able to be selected or not. Change the property by toggling {{PropertyView|Selectable}} in the [[Property editor|Property editor]].
* {{MenuCommand|[[Std_ToggleVisibility|Toggle visibility]]}}: makes the object visible or invisible in the 3D view.
* {{MenuCommand|[[Std_ToggleSelectability|Toggle selectability]]}}: makes the object no longer selectable in the 3D view; use again this command to cancel its effect. It sets the object's {{incode|Selectable}} attribute to {{TRUE}} or {{FALSE}}. Change the property by toggling {{PropertyView|Selectable}} in the [[property editor|property editor]].
* {{MenuCommand|Go to selection}}: select the object in the tree view.
* {{MenuCommand|Random color}}: assign a random color to the object.
* {{MenuCommand|[[Std_TreeSelection|Go to selection]]}}: expand the [[tree view|tree view]] to show the selected object in the hierarchy.
* {{MenuCommand|[[Std_RandomColor|Random color]]}}: assigns a random color to the object. It sets the object's {{incode|ShapeColor}} attribute to a tuple {{incode|(r,g,b)}} with tree random floats between 0 and 1. Change the property by modifying {{PropertyView|Shape Color}} in the [[property editor|property editor]].
* {{MenuCommand|[[Std Delete|Delete]]}}: delete the object.
* {{MenuCommand|[[Std_Delete|Delete]]}}: removes the object from the document, and from the 3D view, by calling the document's {{incode|removeObject()}} method.


<!--T:10-->
For example, with the [[Draft Workbench|Draft Workbench]] and one object selected:
Another example, with the [[Draft Workbench|Draft Workbench]] and one object selected, it shows the same commands as with the [[Part Workbench|Part Workbench]], but also:
* {{MenuCommand|Draft}}
* {{MenuCommand|Draft}}: object creation and modification commands from the [[Draft Workbench|Draft Workbench]].
* {{MenuCommand|Utilities}}
* {{MenuCommand|Utilities}}: additional contextual commands provided by the [[Draft Workbench|Draft Workbench]].


== Details ==
== Details == <!--T:11-->


<!--T:12-->
Since FreeCAD uses Qt as its graphical toolkit, FreeCAD uses the Quarter library to use Coin3D in a Qt environment.
FreeCAD uses the Quarter library to use Coin3D in a Qt environment.


<!--T:13-->
Moreover, it is possible to interact directly with the 3D view scenegraph from the [[Python console|Python console]] by using the Python library Pivy.
It is possible to interact directly with the 3D view scenegraph from the [[Python console|Python console]] by using the Python library Pivy.


<!--T:14-->
For more information see the power user documentation:
For more information see the power user documentation:
* [[Scenegraph|Scenegraph]], description of Coin3D.
* [[Scenegraph|Scenegraph]], description of Coin3D.
* [[Pivy|Pivy]], usage of Coin3D from the Python console.
* [[Pivy|Pivy]], usage of Coin3D from the Python console.
* [[Third_Party_Libraries|Third party libraries]] used by FreeCAD.
* [[Third_Party_Libraries|Third party libraries]] used by FreeCAD.
* [https://grey.colorado.edu/coin3d/index.html Coin3D] C++ documentation.


{{Userdocnavi}}
</translate>
</translate>
{{Interface navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Revision as of 13:51, 23 March 2020

Introduction

The 3D view of FreeCAD is an instance of a Coin3D scenegraph that forms the most important window in the interface. Coin3D is a library that implements the OpenInventor 2.1 scene description standard.

Certain properties of the view, like background color, mouse navigation style, and zooming steps, can be configured in the preferences editor.

The 3D view is a component of the FreeCAD interface. By default it shows a small widget with coordinate axes, and the navigation cube also with coordinate axes; the grid can be displayed and configured by loading the Draft Workbench.

Actions

Note: link actions introduced in version 0.19.

Since the tree view lists most objects that are visible in the 3D view, many of the actions are the same to those that can be executed from the tree view.

When the default Start Workbench is active, right clicking on the 3D view shows only one command:

  • Navigation styles: different button styles to use with a 3-button mouse or laptop trackpad.

However, once a Workbench is loaded, there are additional commands:

Additionally, depending on the workbench and object that is active, other contextual commands may become available.

For example, with the Part Workbench and one object selected:

  • Appearance: launches the dialog to change color and sizes of lines and vertices, and color of faces.
  • Toggle visibility: makes the object visible or invisible in the 3D view.
  • Toggle selectability: makes the object no longer selectable in the 3D view; use again this command to cancel its effect. It sets the object's Selectable attribute to true or false. Change the property by toggling ViewSelectable in the property editor.
  • Go to selection: expand the tree view to show the selected object in the hierarchy.
  • Random color: assigns a random color to the object. It sets the object's ShapeColor attribute to a tuple (r,g,b) with tree random floats between 0 and 1. Change the property by modifying ViewShape Color in the property editor.
  • Delete: removes the object from the document, and from the 3D view, by calling the document's removeObject() method.

Another example, with the Draft Workbench and one object selected, it shows the same commands as with the Part Workbench, but also:

Details

FreeCAD uses the Quarter library to use Coin3D in a Qt environment.

It is possible to interact directly with the 3D view scenegraph from the Python console by using the Python library Pivy.

For more information see the power user documentation: