3 \page occ_3d_viewer_page OCC 3D Viewer
7 The functionalities of OCC viewer are available via its Viewer
8 Toolbar. Buttons marked with small downward triangles have extended
9 functionality which can be accessed by locking on them with left mouse
12 \image html occviewer_toolbar.png
15 \image html occ_view_camera_dump.png
17 <b>Dump View</b> - exports an object from the viewer in bmp, png,
18 jpeg or another image format.
21 \image html occ_view_style_switch.png
23 <b>Interaction style switch</b> - allows to switch between standard
24 and "keyboard free" interaction styles. "Keyboard free" style allows
25 to process all view transformations without using keyboard (only by
26 mouse). By default, rotation in this mode is performed by left mouse
27 button, panning - by middle mouse button, zooming - by right mouse
28 button. Selection in view by pressing "s" key works in both
32 \image html occ_view_zooming_style_switch.png
34 <b>Zooming style switch</b> - allows to switch between standard
35 (zooming at the center of the view) and advanced (zooming at the
36 current cursor position) zooming styles.
39 \image html occ_view_triedre.png
41 <b>Show/Hide Trihedron</b> - shows or hides coordinate axes.
44 \image html occ_view_preselection.png
46 <b>Enable/Disable preselection</b> - enables or disables preselection (highlighting) in the view.
49 \image html occ_view_selection.png
51 <b>Enable/Disable selection</b> - enables or disables selection in the view.
54 \image html occ_view_fitall.png
56 <b>Fit all</b> - represents all displayed objects in the
60 \image html occ_view_fitarea.png
62 <b>Fit area</b> - resizes the view to place in the visible area only
63 the contents of a frame drawn with pressed left mouse button.
66 \image html occ_view_fitselection.png
68 <b>Fit selection</b> - fits view contents to the current selection.
71 \image html occ_view_zoom.png
73 <b>Zoom</b> - allows to zoom in and out.
76 \image html occ_view_pan.png
78 <b>Panning</b> - if the represented objects are greater that the
79 visible area and you don't wish to use <b>Fit all</b> functionality,
80 click on this button and you'll be able to drag the scene to see its
84 \image html occ_view_glpan.png
86 <b>Global panning</b> - allows to select a point to be the center of a scene
87 representing all displayed objects in the visible area.
90 \image html occ_view_rotation_point.png
92 <b>Change rotation point</b> - allows to choose the point around
93 which the rotation is performed.
95 \image html set_rotation_point_dialog1.png
97 By default the rotation point is located in the Center of the bounding
98 box of represented objects.
100 \image html set_rotation_point_dialog2.png
102 Unchecking <b>Use Bounding Box Center</b> check-box allows you to
103 change rotation point:
105 - <b>Set to Origin</b> button sets the rotation point to
106 origin of coordinates: (0, 0, 0).
108 - <b>Gravity Center of Selected Object</b> button allows using the
109 gravity center of the object selected in the viewer as the center of
111 When you click this button, you should first choose the type of
112 selectable object: Point, Edge, Face or Solid and only then proceed
113 with selection in the viewer.
115 - Also you can define the coordinates of the rotation point manually.
119 \image html occ_view_rotate.png
121 <b>Rotation</b> - allows to rotate the scene using the mouse.
124 \image html occ_view_front.png
125 \image html occ_view_back.png
126 \image html occ_view_top.png
127 \image html occ_view_bottom.png
128 \image html occ_view_left.png
129 \image html occ_view_right.png
131 These buttons orientate the scene strictly about coordinate axes:
132 \b Front, \b Back, \b Top, \b Bottom, \b Left or \b Right side.
135 \image html occ_view_anticlockwise.png
137 <b>Rotate counterclockwise</b> - rotates view 90 @htmlonly ° @endhtmlonly counterclockwise.
140 \image html occ_view_clockwise.png
142 <b>Rotate clockwise</b> - rotates view 90 @htmlonly ° @endhtmlonly clockwise.
145 \image html occ_view_orthographic.png
147 <b>Ortographic projection</b> - default OCC viewer projection mode.
150 \image html occ_view_perspective.png
152 <b>Perspective projection</b> - perspective OCC viewer projection mode.
155 \image html occ_view_stereo.png
157 <b>Stereo projection</b> - stereoscopic rendering of the view.
158 \note Activation of this mode also switches the view to perpective projection
159 in case if the orthographic one has been active.
160 \note By default, quad-buffered stereo is activated, if it is supported by the graphic card.
161 If no stereo capabilities are available, an error message is shown.
162 \note The stereoscopic view settings can be defined in
163 \ref occ_preferences "OCC 3D Viewer" preferences.
167 \image html occ_view_reset.png
169 <b>Reset</b> - restores the default position (isometric) of objects in
173 \image html occ_view_shoot.png
175 <b>Memorize view</b> - saves the current position of objects in the
179 \image html occ_view_presets.png
181 <b>Restore view</b> - restores the saved position of objects in the
185 \image html occ_view_clone.png
187 <b>Clone view</b> - opens a new duplicate scene.
190 \anchor clipping_planes
192 \b Clipping allows creating cross-section views (clipping planes)
195 To create a clipping plane, click on the \b New button in the dialog and choose how it will be defined by \b Absolute or \b Relative coordinates.
197 <b>Absolute Coordinates</b>
199 \image html Clipping_Absolute.png
201 - <b>Base point</b> - allows defining the coordinates of the base
202 point for the clipping plane.
204 - <b>Reset</b> - returns the base point to coordinate origin.
206 - <b>Direction</b> - allows defining the orientation of the
209 - <b>Invert</b> - allows selecting, which part of the object will be
210 removed and which will remain after clipping.
214 \image html Clipping_Relative.png
216 - \b Orientation ( ||X-Y, ||X-Z or ||Y-Z).
218 - \b Distance between the opposite extremities of the boundary box of
219 represented objects, if it is set to 0.5 the boundary box is split in two halves.
221 - \b Rotation (in angle degrees) <b>around X</b> (Y to Z) and <b>around
222 Y</b> (X to Z) (depending on the chosen Orientation)
224 The other parameters are available in both modes :
225 - <b>Active</b> checkbox is used to apply/erase current plane and it's affect to/from view.
226 - <b>Delete</b> removes the active clipping plane and discards it's view changes.
227 - <b>Disable all</b> deactivates all created clipping planes and clears <b>Auto Apply</b> checkbox.
228 - <b>Preview</b> check-box shows the clipping plane in the <b>3D Viewer</b>.
229 - <b>Auto Apply</b> check-box allows you to see the result of clipping
230 in the <b>3D Viewer</b> immediately. Be careful, it is not a preview
231 and Close button could not cancel the applied modifications.
233 It is also possible to interact with the clipping plane directly in 3D
234 view using the mouse.
238 \image html occ_view_scaling.png
240 <b>Scaling</b> - represents objects deformed (stretched or stuffed)
241 along the axes of coordinates.
244 \image html occ_view_graduated_axes.png
246 <b>Graduated axes</b> - allows to define axes parameters and graduate
249 \image html graduatedaxes2.png
251 - <b>Axis name</b> - if checked the axis name is displayed in the viewer.
253 - <b>Name</b> - allows to redefine the axis name.
255 - <b>Font</b> - allows to define the font color of the axis name.
257 - <b>Labels</b> - if checked the labels are displayed in the viewer.
259 - <b>Number</b> - allows to define the number of labels.
261 - <b>Offset</b> - allows to define the distance between axis and labels.
263 - <b>Font</b> - allows to define the font color of labels names.
265 - <b>Tick marks</b> - if checked the tick marks are displayed in the viewer.
267 - <b>Length</b> - allows to define the length of tick marks.
269 - <b>Is visible</b> - if checked the graduated axes are displayed in the viewer.
273 \image html occ_view_ambient.png
275 <b>Toggle ambient light</b> - toggle "keep only ambient light" flag
279 \image html occ_view_minimized.png
280 \image html occ_view_maximized.png
282 <b>Minimize/Maximize</b> - these buttons allow switching the current
283 view area to the minimized / maximized state.
286 \image html occ_view_return_3d_view.png
288 <b>Return to 3D</b> - this button switches from 2D view projection back to the 3D view mode.
291 \image html occ_view_sync.png
293 <b>Synchronize view</b> - allows to synchronize 3d view
294 parameters. This button has two states - checked and
295 unchecked. Clicking on this button opens a drop-down menu listing the
296 compatible 3d views. As soon as the user selects any view from the
297 list, the parameters (view point, position, zoom coefficient, etc.) of
298 the current view are synchronized with the selected view (static
301 In addition, when this button is in the "checked" state, the dynamic
302 synchronization of the views is performed, i.e. any zoom, pan, rotate
303 or other view operation done in one view is automatically applied to
307 \image html occ_view_ray_tracing.png
311 <b>Ray tracing</b> - allows to switch between rendering methods in run-time
312 in the current OCCT 3D view. It can be used to produce images with photorealistic quality.
314 \image html doc_ray_tracing.png
316 - <b>Ray tracing</b> - specifies rendering mode: OpenGL rasterization (by default) or GPU ray-tracing.
318 - <b>Depth</b> - defines maximum ray-tracing depth.
320 - <b>Specular reflections</b> - enables/disables specular reflections.
322 - <b>Adaptive anti-aliasing</b> - enables/disables adaptive anti-aliasing.
324 - <b>Shadows rendering</b> - enables/disables shadows rendering.
326 - <b>Transparent shadow</b> - enables/disables light propagation through transparent media.
330 \image html occ_view_env_texture.png
334 <b>Environment texture</b> - allows to set parameters for environment texture.
335 This is a special mode of texture mapping when specular reflection of environment texture
336 is simulated by OpenGL using a special texture coordinates generation algorithm (a sphere map).
338 \image html doc_env_texture.png
340 - <b>Environment texture</b> - enables/disables environment texture in the current OCCT 3D view.
342 User can select one of 7 predefined environment texture from the list or define its texture from file by
343 choosing item <b>"Custom..."</b> in a combo box.
345 \note Environment texture file should normally satisfy the following requirements
346 in order to produce good visual result:
347 - The image file should have 2:1 width-to-height ratio.
348 - It should constitute a 360-degrees panoramic image created using a fish-eye lens.
352 \image html occ_view_light_source.png
356 <b>Light source</b> - allows to set parameters for light source.
358 It's possible to choose a type of light source between directional and positional light.
360 \image html doc_dir_light_source.png
362 <b>Directional</b> light - creates a directional light source in the viewer.
363 It is defined by direction coordinates, color and headlight parameter.
365 \image html doc_pos_light_source.png
367 <b>Positional</b> light - creates an isolated light source X,Y,Z in the viewer.
368 It is also defined by the color and headlight parameter.
372 - <b>Apply and Close</b> to apply defined light source to the OCC 3D Viewer.
374 - <b>Default</b> to restore default values of light source.
376 - <b>Close</b> to return parameters of light source on initial values.