3D view: Difference between revisions

From FreeCAD Documentation
(Delete: removes the object from the document, and from the tree view, by calling the document's removeObject() method.)
(object creation and modification commands from the Draft Workbench.)
Line 38: Line 38:


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

For example, with the [[Part Workbench|Part Workbench]] and one object selected:
* {{MenuCommand|[[Std_SetAppearance|Appearance]]}}: launches the dialog to change 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|[[Std_ToggleVisibility|Toggle visibility]]}}: makes the object visible or invisible in the 3D view.
* {{MenuCommand|[[Std_ToggleVisibility|Toggle visibility]]}}: makes the object visible or invisible in the 3D view.
Line 47: Line 49:


<!--T:10-->
<!--T:10-->
And 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}}: creation and modification commands from this workbench.
* {{MenuCommand|Draft}}: object creation and modification commands from the [[Draft Workbench|Draft Workbench]].
* {{MenuCommand|Utilities}}: auxiliary commands from this workbench.
* {{MenuCommand|Utilities}}: additional contextual commands provided by the [[Draft Workbench|Draft Workbench]].


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

Revision as of 05:24, 27 September 2019

Introduction

The 3D view of FreeCAD is an instance of a Coin3D scenegraph. 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.

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 by loading the Draft Workbench.

Actions

Note: link actions were added 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

Since FreeCAD uses Qt as its graphical toolkit, FreeCAD uses the Quarter library to use Coin3D in a Qt environment.

Moreover, 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:

Template:Interface