5 Introduction to SHAPER
\r
6 ======================
\r
8 SHAPER module of SALOME is destined for:
\r
10 - import and export of geometrical models in IGES, BREP, STEP and XAO formats;
\r
11 - parametric construction of geometrical objects using a wide range of functions:
\r
13 - creation of complex 2D sections using :ref:`sketchPlugin` with consequent extrusion or revolution (see :ref:`featuresPlugin`);
\r
14 - construction of model using primitives defined in :ref:`primitivesPlugin`;
\r
15 - usage of Boolean operations (see :ref:`featuresPlugin`);
\r
17 - viewing geometrical objects in the OCC viewer;
\r
18 - transformation of geometrical objects using various algorithms.
\r
20 It is possible to easily set :ref:`parameter_usage` predefined to be used as arguments when objects are created.
\r
22 SHAPER module preferences are described in the :ref:`preferences` section of SALOME Help.
\r
24 Almost all SHAPER module functionalities are accessible via Python Interface.
\r
26 SHAPER module works with one study containing several documents:
\r
29 - one or several parts.
\r
31 Only one document can be active. In complicated models partset consists of several parts. Parts in partset may be copied, positioned relatively to each other, or simply translated.
\r
33 A new study contains only a partset with 7 default constructions, which cannot be deleted:
\r
35 - one point **Origin** coinciding with the origin of the coordinate system;
\r
36 - three axes **OX**, **OY**, **OZ** coinciding with coordinate axes;
\r
37 - three planes **YOZ**, **XOZ**, **XOY** coinciding with coordinate planes.
\r
39 Only points, axis, planes (see :ref:`constructionPlugin`) and sketches (see :ref:`sketchPlugin`) can be added into Partset to be used in any part later.
\r
40 :ref:`parameter_usage` can be used both in Partset and any Part.
\r
43 A new Part can be created as described in :ref:`partPlugin`.
\r
45 Double click or pop-up menu can be used to activate existing document.
\r
51 The main window of the application consists of the following components:
\r
54 - :ref:`doc_windows`;
\r
59 .. image:: images/main_window.png
\r
63 Main window of SHAPER module
\r
71 Main menu provides access to all commands of the application.
\r
73 .. image:: images/main_menu.png
\r
79 Main menu includes standard Salome items:
\r
88 and items specific for SHAPER module:
\r
90 - Part (see :ref:`partPlugin`);
\r
91 - Sketch (see :ref:`sketchPlugin`);
\r
92 - Construction (see :ref:`constructionPlugin`);
\r
93 - Build (see :ref:`buildPlugin`);
\r
94 - Primitives (see :ref:`primitivesPlugin`);
\r
95 - GDML (see :ref:`gdmlPlugin`);
\r
96 - Features (see :ref:`featuresPlugin`);
\r
104 Application toolbar contains:
\r
106 - standard toolbar;
\r
110 .. image:: images/toolbar.png
\r
116 SHAPER toolbar duplicates the main menu and provides access to all commands of the application.
\r
118 SHAPER toolbar is separated into sections:
\r
134 Visibility of SHAPER toolbar sections is managed using *View -> Toolbar* :ref:`main_menu` item or toolbar pop-up menu.
\r
142 Standard dock windows are:
\r
144 - :ref:`object_browser`
\r
145 - :ref:`inspection_panel`
\r
146 - :ref:`python console`
\r
147 - :ref:`property_panel`
\r
149 Dock windows can be placed in three dock areas using drag-and-drop:
\r
155 By default Object browser window is placed at the left dock area, Inspection panel at the right dock area and Python console at the bottom dock area of the main window.
\r
157 Property Panel is hidden.
\r
159 Property Panel is shown on operation start in left dock area of the main window by default.
\r
161 If Object browser is shown at the same side then they will be tabbed.
\r
163 Each dock window can be closed using **Cross** window button and opened again using a corresponding command from *View - Windows* :ref:`main_menu` or alternatively using pop-up menu.
\r
165 .. image:: images/popup_menu.png
\r
169 Pop-up menu for visibility of windows and toolbars
\r
172 .. _object_browser:
\r
177 Object browser contains all documents created in the current study.
\r
179 Each document includes standard branches where created objects are placed.
\r
181 Documents with branches are shown in Tree View.
\r
183 .. image:: images/object_browser.png
\r
187 Object browser. Partset active
\r
190 Partset includes three branches:
\r
196 Part includes the following branches:
\r
205 New part contains only 3 empty branches:
\r
211 Features are placed one after another in the active document with default names and their results are placed into the corresponding branch.
\r
213 Examples of default names assigned automatically for :ref:`box_feature` are:
\r
215 * **Box_1**, **Box_2**, ... for Feature;
\r
216 * **Box_1_1**, **Box_2_1**, ... for Result.
\r
218 Note, that a default branch is added into Tree View when the first feature of this type is created.
\r
220 Note, that the result used in feature as argument is removed.
\r
222 This child result can be restored using **Recover** feature.
\r
224 Each feature, result, construction, group, field, parameter can be renamed using *Rename* pop-up menu command.
\r
226 .. image:: images/popup_menu_object_browser_feature.png
\r
230 Feature pop-up menu
\r
232 .. image:: images/popup_menu_object_browser_result.png
\r
238 .. image:: images/popup_menu_object_browser_construction.png
\r
242 Construction pop-up menu
\r
244 The order of features can be changed using *Move to the end* pop-up menu command. It works only for Group features. The selected group will be moved to the end of features list.
\r
246 Folders can be used to arrange long Tree View for features.
\r
248 .. image:: images/object_browser_folder.png
\r
252 Object browser with folder Dome. Part_1 active
\r
254 *Insert a folder before* pop-up menu command creates a new empty folder before the selected feature. The folder can be renamed.
\r
256 Features placed after/before the created folder can be moved into the folder using *Move into the previous folder* / *Move into the next folder* pop-up menu command.
\r
258 This allows to decrease the length of feature list.
\r
260 Features can be removed from the folder using *Move out before the folder* / *Move out after the folder* pop-up menu command.
\r
262 *Clean history* pop-up menu command looks for features that do not participate in other features.
\r
264 **Clean history** dialog box shows a list of unused features. After confirmation by click **Yes** button unused features are removed.
\r
266 .. image:: images/clean_history.png
\r
270 **Clean history** dialog box
\r
273 *Select result* and *Select parent feature* pop-up menu commands help to navigate along Tree View.
\r
276 A feature and its result can be deleted using *Delete* pop-up menu command.
\r
278 Note that all features using the removed feature and their results will be removed simultaneously.
\r
280 **Delete feature** dialog box shows the list of features to be removed. After confirmation by click **Yes** button all these features are removed.
\r
283 .. image:: images/delete_feature.png
\r
287 **Delete feature** dialog box
\r
289 .. _property_panel:
\r
294 Property panel consists of two parts:
\r
296 - controls a container for input of parameters for the current operation;
\r
297 - buttons panel containing standard buttons:
\r
299 .. image:: images/button_ok.png
\r
301 **Ok/Apply** executes operation with defined parameters,
\r
304 .. image:: images/button_cancel.png
\r
306 **Cancel/Close** calls **Abort operation** dialog box to confirm operation abort,
\r
308 .. image:: images/button_help.png
\r
310 **Help** calls User's guide opened on page describing the current operation.
\r
312 .. image:: images/abort_operation.png
\r
316 **Abort operation** dialog box
\r
319 .. image:: images/button_ok.png
\r
321 **OK/Apply** button is disabled if not all input parameters are defined or some errors are found. Error is shown as tooltip and in status bar.
\r
323 .. _inspection_panel:
\r
328 Inspection panel provides the list of types and quantities of all topological entities, composing the selected result, construction or feature.
\r
330 .. image:: images/inspection_panel.png
\r
334 Inspection panel for default Box
\r
336 **Object** displays name of the selected result, construction or feature.
\r
338 **Type** characterizes the whole shape.
\r
340 The information about Point, Axis or Edge additionally shows coordinates of point / end points.
\r
342 .. image:: images/inspection_panel_line.png
\r
346 Inspection panel for Axis
\r
349 The information about Plane, Face additionally shows coordinates of center point and direction of normal.
\r
351 .. image:: images/inspection_panel_face.png
\r
355 Inspection panel for Face
\r
357 .. _python console:
\r
362 Python console interpreters Python commands entered manually.
\r
364 In particular, it is possible to load the python script:
\r
366 *execfile(r"/dn48/newgeom/data/example.py")*
\r
368 Pop-up menu gives the possibility to:
\r
370 - Copy the selected text to clipboard;
\r
371 - Paste the text from clipboard to Python console ;
\r
372 - Clear Python console;
\r
373 - Dump commands from console into the specified file;
\r
374 - Start/Stop writing log into the specified file.
\r
377 .. image:: images/python_console_popup.png
\r
381 Pop-up menu of Python console
\r
388 The application supports one instance of OCC 3D viewer and is able to show only one 3D space.
\r
390 This 3D space can be represented in several view windows. New view window can be created using **Clone view** button in viewer toolbar.
\r
392 Each view windows shows its own point of view on the 3D scene.
\r
394 This point of view can be modified using viewer commands: **Panning**, **Zooming**, **Scaling**, etc.
\r
397 .. image:: images/2_viewers.png
\r
403 The description of OCC 3D Viewer architecture and functionality is provided in GUI module user's guide in chapter **OCC 3D Viewer**.
\r
406 .. _parameter_usage:
\r
411 Model parametrization can be done using parameters.
\r
413 A parameter can be created in the active partset or part by:
\r
415 - :ref:`parameter`;
\r
416 - :ref:`parameters`;
\r
417 - :ref:`parameter_expression`.
\r
419 Any argument in features can be defined as parameter or expression containing parameters.
\r
421 The list of features using parameters is given in **Parameters** dialog box:
\r
423 .. image:: images/parameters_feature.png
\r
427 Parameters dialog box
\r
429 If a parameter value is changed, then all features where it is used are rebuilt.
\r
431 A parameter name should be unique in the active document.
\r
433 However, partset and part can have parameters with the same name. If parameter names in Partset and Part are identical, then Part parameter has a higher priority and its value will be used in the features of this part.
\r
435 In contrast to features (see :ref:`object_browser`), there is an additional option when parameters are deleted.
\r
437 .. image:: images/delete_parameter.png
\r
443 After clicking **Replace** button, the selected parameter is removed but its parent parameters and features are not removed. The deleted parameter is replaced by its value.
\r
445 .. _parameter_expression:
\r
447 Create parameter on fly
\r
448 ^^^^^^^^^^^^^^^^^^^^^^^
\r
450 Parameter can be created during feature creation simply by writing *variable=expression* in any editbox.
\r
452 After feature validation a new parameter with the given name **variable** and value equal to the evaluated expression appears in object browser under **Parameters** in the active partset or part.
\r
459 Description of General application preferences and **Preferences** dialog box is provided in GUI module user's guide in chapter **Setting Preferences**.
\r
461 SHAPER preferences define visualization of objects, visualization during selection, edition. New preferences can be used right after modification or later after activation of SHAPER module.
\r
463 To call **Preferences** dialog box:
\r
465 #. select in the Main Menu *File - > Preferences* item or
\r
466 #. use **Ctrl+P** shortcut.
\r
468 SHAPER preferences include 4 tabs:
\r
470 - :ref:`visualization_preferences`;
\r
471 - :ref:`plugins_preferences`;
\r
472 - :ref:`sketch_preferences`;
\r
473 - :ref:`viewer_preferences`.
\r
475 Visualization tab is activated by default when **Preferences** dialog box is opened in the active SHAPER module.
\r
477 Other tabs are activated by click on tab header.
\r
479 .. _visualization_preferences:
\r
484 This tab defines presentation of objects displayed in OCC 3D viewer.
\r
486 .. image:: images/visualization_preferences.png
\r
490 Preferences - Visualization tab
\r
494 - **Result color** selects default shading color for objects from **Results** branch;
\r
495 - **Group color** selects default color for objects from **Groups** branch;
\r
496 - **Construction color** selects default color for objects from **Constructions** branch;
\r
497 - **Part color** selects default color for parts shown in Partset;
\r
498 - **Field color** selects default color for objects from **Fields** branch;
\r
499 - **Body deflection coefficient** defines default deflection coefficient for objects from **Results** branch. A smaller coefficient provides better quality of a shape in the viewer;
\r
500 - **Construction deflection coefficient** defines default deflection coefficient for objects from **Constructions** branch. A smaller coefficient provides better quality of a shape in the viewer;
\r
501 - **Reference shape wireframe color in operation** selects default color used for wireframe visualization of objects used in active operation;
\r
502 - **Result shape wireframe color in operation** selects default color used for wireframe visualization of result in active operation. Click **See preview** button to show result;
\r
503 - **Multi selector item color in operation** selects default color used for visualization of objects selected in property panel to distinguish them among all objects used in active operation;
\r
504 - **Color of removed feature in operation** selects default color used for visualization of sketch entities to be removed during **Trim/Split** operations;
\r
505 - **Color of sketch plane** selects default shading color for sketch plane;
\r
506 - **Hidden faces transparency** defines default transparency value for hidden faces;
\r
507 - **Dimension arrow size** defines default size of arrows for extension line showing dimensional constraint;
\r
508 - **Dimension font** defines font used for value of dimensional constraint;
\r
509 - **Dimension value size** defines default size of value for dimensional constraint;
\r
510 - **Sketch dimension color** defines default color of dimensional constraint;
\r
511 - **Construction plane color** selects default color for Construction planes;
\r
512 - **Sketch entity color** selects default color for sketch objects;
\r
513 - **Sketch external entity color** selects default color for external objects selected as reference during sketch creation/edition;
\r
514 - **Sketch auxiliary entity color** selects default color for sketch auxiliary objects;
\r
515 - **Sketch overconstraint color** selects default color for a sketch with redundant constraints;
\r
516 - **Sketch fully constraint color** selects default color for a sketch with zero degrees of freedom.
\r
518 To redefine any color click on the corresponding line to access **Select color** dialog box
\r
520 .. image:: images/select_color.png
\r
524 **Select color** dialog box
\r
526 Preferences for sketch are applicable during sketch creation/edition operation.
\r
528 .. _plugins_preferences:
\r
532 Plugins tab defines folders where plugins and resources are located.
\r
534 .. image:: images/plugins_preferences.png
\r
538 Preferences - Plugins tab
\r
542 - **Default path** selects default folder where plugins are located. Click on **Open** button opens standard **Find directory** dialog box to navigate to desired folder;
\r
544 - **Import initial directory** selects default folder where resources are located. Click on **Open** button opens standard **Find directory** dialog box to navigate to desired folder.
\r
546 .. image:: images/open_button.png
\r
552 .. image:: images/find_directory.png
\r
556 **Find directory** dialog box
\r
559 .. _sketch_preferences:
\r
564 Sketch tab defines properties of coordinate planes shown for selection of sketch plane when no convenient objects are shown in OCC 3D viewer.
\r
566 .. image:: images/sketch_preferences.png
\r
570 Preferences - Sketch tab
\r
574 - **Size** defines size of coordinate planes;
\r
575 - **Thickness** defines thickness of coordinate plane borders;
\r
576 - **Rotate to plane when selected** check-box turns on/off automatic switch the viewer to the top view for the selected sketch plane.
\r
579 .. _viewer_preferences:
\r
584 Viewer tab defines selection in OCC 3D viewer properties.
\r
586 .. image:: images/viewer_preferences.png
\r
590 Preferences - Viewer tab
\r
594 - **Default Selection** defines objects to be selected by mouse click in OCC 3D viewer:
\r
596 - **Faces** check-box turns on/off selection of faces;
\r
597 - **Edges** check-box turns on/off selection of edges;
\r
598 - **Vertices** check-box turns on/off selection of vertices;
\r
600 - **Selection sensitivity** defines size of area around object in pixels, in which mouse click selects object inside this area:
\r
602 - **Vertex** defines selection sensitivity for vertices;
\r
603 - **Edge** defines selection sensitivity for edges.
\r
606 .. _toolbars_management:
\r
608 Toolbars management
\r
609 -------------------
\r
611 .. _toolbars_dialog:
\r
613 **Toolbars** dialog box
\r
614 ^^^^^^^^^^^^^^^^^^^^^^^
\r
615 To edit the current tool bars structure select in the Main Menu *Edit - > Edit toolbars* item.
\r
616 The following dialog box with existing toolbars appears:
\r
618 .. image:: images/Toolbars.png
\r
622 **Toolbars** dialog box
\r
626 - **Toolbars** window contains list of toolbars names. Number of commands in each tool bar is shown in brackets.
\r
627 - **Add** button creates a new toolbar. Click on **Add** button opens :ref:`create_toolbar`;
\r
628 - **Edit** button calls :ref:`edit_toolbar` for currently selected tool bar;
\r
629 - **Delete** button removes currently selected tool bar. Click on **Delete** button opens warning dialog box. After confirmation by click **Yes** button the selected toolbar is deleted. Click **No** button cancels removing of the selected toolbar;
\r
630 - **Reset** button restores modified tool bars structure to default state;
\r
631 - **OK** button closes the dialog box, stores result of tool bars edition and updates Shaper tool bars;
\r
632 - **Cancel** button closes the dialog box without modification of tool bars.
\r
634 .. image:: images/delete_toolbar.png
\r
641 .. _create_toolbar:
\r
643 **Create toolbar** dialog box
\r
644 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
\r
646 **Input fields** of **Create toolbar** dialog box:
\r
648 .. image:: images/create_toolbar.png
\r
652 **Create toolbar** dialog box
\r
654 - **Name of a new toolbar** defines name of the new tool bar. The name of tool bar has to be unique. If user defines a not unique name then a warning appears and a new tooolbar with not unique name is not created;
\r
655 - **Ok** button closes the dialog box and add a new tool bar of the module into **Toolbars** window;
\r
656 - **Cancel** button closes the dialog box without addition of a new tool bar.
\r
658 .. image:: images/name_toolbar.png
\r
662 **Warning** dialog box
\r
667 **Edit toolbar** dialog box
\r
668 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
\r
670 **Input fields** of **Edit toolbar** dialog box:
\r
672 .. image:: images/EditToolbar.png
\r
676 **Edit toolbar** dialog box
\r
678 - **Toolbar name** non-editable field displays name of modified tool bar;
\r
679 - **Out of toolbars** window contains list of commands which are not included into any tool bar and separator definition "------";
\r
680 - **In the toolbar** window contains list of commands which are defined in the current tool bar. Items in this window are listed according to order of commands in the toolbar;
\r
681 - **Right arrow** button transfers currently selected item from **Out of toolbars** window to **In the toolbar** window and puts new item before the selected item in **In the toolbar** window.
\r
682 If there is no selected item in **In the toolbar** window then new item will be added at the end of items list. In order to clear current selection it is necessary to click in empty space of the window.
\r
683 - **Left arrow** button transfers currently selected item from **In the toolbar** window into **Out of toolbars** window;
\r
684 - **Up** and **Down** buttons change position of selected command in **In the toolbar** window;
\r
685 - **Ok** button closes the dialog box, stores result of edition;
\r
686 - **Cancel** button closes the dialog box without modification of tool bar content.
\r