1 .. _common_functionality_page:
3 ********************************************
4 Functionality common for OCC and VTK viewers
5 ********************************************
12 Viewers background can be customized using the "Change background"
13 popup menu command that opens the following dialog box:
15 .. image:: ../images/change_background_dlg.png
18 The following types of the background are supported:
20 * **Single color:** the background is colored with the solid color specified by the user in the dialog box.
22 * **Gradient background:** the background is gradiently colored according to two colors and the gradient type specified in the dialog box. The following types of background are supported:
33 * **Image:** allows to set image as viewer background and define filling type:
35 * **Center:** the image is located at the center of the viewer backgound
36 * **Tile:** the image fills the entire viewer backgound one by one
37 * **Stretch:** the image is stretched to the entire viewer backgound.
39 Default background for the OCC viewer is specified via the
40 :ref:`occ_preferences` and for the
41 VTK viewer via the :ref:`vtk_preferences`.
47 An element can be selected by clicking on it with the left mouse button.
48 Selecting objects with locked *Shift* key produces a multi selection.
50 Additionally, when the viewer owns an input focus, an object can be selected
51 by pressing *"S"* on the keyboard. Pressing *"S"* when holding
52 \em Shift key allows adding/removing an object to/from the current selection.
54 OCC viewer provides a way to navigate between the selectable objects.
55 This feature (disabled by default) is used in some dialog boxes (for example,
56 in Geometry module). When there are several objects which suit current
57 selection requirements (specified by the dialog) under the current mouse cursor,
58 it is possible to switch between them by means of mouse scroll wheel.
59 The same can be also done by pressing *"N"* and *"P"* keys.
61 There are also two additional selection mechanisms: rectangle and
67 Rectangle Selection is the basic and commonly used selection tool.
69 To select a rectangle area press and hold the left mouse button while drawing the diagonal of the selection rectangle in the viewer.
71 .. image:: ../images/rectselectionvtk.png
74 As a result, the objects within the rectangle are selected.
76 .. image:: ../images/rectselectionvtk2.png
79 .. note:: It is possible to add an area to the existing selection by holding down *Shift* key while selecting.
84 OCC and VTK Viewers feature a special Polyline Selection mechanism,
85 which allows selecting an arbitrary part of the graphic area using a
86 polygon frame (rubber band), instead of the usual selection with a
89 To produce a Polyline Selection, press and hold the right mouse button and draw
90 the first side of the selection polygon, then change the direction by clicking
91 the left mouse button add draw another side, etc. Click twice by left mouse
92 button to finish drawing.
94 .. image:: ../images/polyselectionvtk11.png
97 As a result, the objects within the polygon are selected.
99 .. image:: ../images/polyselectionvtk21.png
102 To add an area to the existing selection it is necessary to hold down
103 *Shift* key while selecting.
105 .. _viewer_navigation_modes:
111 OCC and VTK 3D viewers support two different navigation modes:
113 * **Salome standard controls**
114 Rectangle selection in this mode is performed by the left mouse button
115 and polyline selection by the right mouse button;
116 multiple selection is available when *Shift* button is pressed.
118 Also, holding *Ctrl* key with pressed mouse buttons performs the following view transformations:
120 * *Ctrl* + left mouse button - zooming;
121 * *Ctrl* + middle mouse button - panning;
122 * *Ctrl* + right mouse button - rotation.
124 * **Keyboard free style**
126 This mode allows performing all view transformations without using the
127 keyboard (only by the mouse):
129 * Left mouse button performs view rotation;
130 * Middle mouse button performs panning;
131 * Right mouse button makes zooming.
133 In this style rectangle selection is done by the left mouse button with *Ctrl* key pressed;
134 polyline selection is done by the right mouse button with *Ctrl* key pressed.
136 In both styles selection of objects in the viewer can be performed by pressing
137 *"S"* key or by the left mouse button click.
139 Zooming can be alternatively done by scrolling mouse wheel.