Salome HOME
0022618: [CEA 1062] Define the transparency by default in the preferences
[modules/geom.git] / doc / salome / gui / GEOM / input / working_with_groups.doc
index ed0909498f4cfa75195a532a8f25948ba3c3ccce..d1eac3994c018e6efdb3729809da5fa45a4ac578 100644 (file)
@@ -2,15 +2,27 @@
 
 \page work_with_groups_page Working with groups
 
-Creation and editing groups of subshapes of a geometrical object makes
-handling subshapes much easier. This functionality is available in OCC
-viewer only.
+Creation and editing groups of sub-shapes of a geometrical object makes
+handling sub-shapes much easier. Boolean operations on
+groups are also available.
 
-<br><h2>Create a group</h2>
+<ul>
+<li>\ref create_groups_anchor "Create a Group"</li>
+<li>\ref edit_groups_anchor "Edit a Group"</li>
+<li>\ref union_groups_anchor "Union Groups"</li>
+<li>\ref intersect_groups_anchor "Intersect Groups"</li>
+<li>\ref cut_groups_anchor "Cut Groups"</li>
+</ul>
+
+<br>
+\anchor create_groups_anchor
+<h2>Create a group</h2>
 
-\image html image56.gif
+\image html image56.png
 
-To create a group of subshapes of a geometrical object in the main
+This functionality is available in OCC viewer only.
+
+To create a group of sub-shapes of a geometrical object in the main
 menu select <b>New entity > Group > Create</b>
 \n The following menu will appear:
 
@@ -19,71 +31,180 @@ menu select <b>New entity > Group > Create</b>
 In this Menu:
 
 <ul>
-<li><b>Shape Type</b> radio button define the type of elements for the
+<li><b>Shape Type</b> radio button defines the type of elements for the
 group (points, wires, faces, shells or solids).</li>
-<li><b>Group Name</b> - here you can enter the name of the group, by
+<li><b>Group Name</b> - allows defining the name of the group, by
 default, it is Group_n.</li>
 <li>Then, using the "Select" button, select the <b>Main Shape</b> (a
-geometrical object on which the group will be created). You can select
-the elements of your group in two ways: </li>
+geometrical object on which the group will be created). </li>
+<li> <b>Main Shape Selection restriction</b> button group allows limiting the range
+of available group elements,
+<ul><li> <b>No restriction</b> button enables all sub-shapes of the Main
+Shape.</li>
+<li><b>Geometrical parts of the Second Shape</b> restricts the range of accessible
+elements to the sub-shapes of the Main Shape that geometrically
+coincide with the <b>Second Shape</b>.</li>
+<li><b>Only Sub-shapes of the Second Shape</b> restricts the range of
+accessible elements to the sub-shapes of the Main Shape that 
+are sub-shapes of the <b>Second Shape</b>. This is useful because 
+sometimes purely geometrical coincidence is not enough and it 
+is necessary to work with shapes, which actually belong both 
+to the main and the second shape.</li>
+</ul>
+<li>You can selectively display the selected elements using the following buttons:</li>
 <ul>
-<li>Clicking <b>Select Sub-Shapes</b> button you can select them
-manually in the 3D Viewer, and add to the group by clicking the \b Add
-button (keep down the Shift button on the keyboard to select several
-elements and add all them together). The indexes of the selected
-elements will be displayed in the list. To delete elements from the
-list, select them and click \b Remove button.</li>
+<li><b>Show only selected</b> - displays only the sub-shapes selected in the list box.</li>
+<li><b>Hide selected</b> - hides the sub-shapes selected in the list box.</li>
+<li><b>Show all sub-shapes</b> - displays only the sub-shapes of the Main Shape.</li>
+</ul>
+<li> You can select the elements of your group in two ways:
+<ul>
+<li>You can select them manually in the 3D Viewer, and add to the
+group by clicking the \b Add button (keep down the Shift button on the
+keyboard to select several elements and add all them together). The
+indexes of the selected elements will be displayed in the list. To
+delete elements from the list, select them and click \b Remove
+button.</li>
 <li>Clicking <b>Select All</b> button you can add all object's
 elements of a certain type in the list of the elements of the
-group. To delete elements from the list, select them and click \b
-Remove button.</li>
-</ul>
-<li>Finally, confirm your selection by clicking \b OK (also closes the
-Menu) or \b Apply (leaves the Menu open for creation of other groups),
-or skip it by clicking \b Close button.</li>
-</ul>
+group. If the <b>Second Shape</b> is used, the elements are added 
+according to <b>Main Shape Selection restriction</b> settings. To delete elements 
+from the list, select them and click \b Remove button.
+</li></ul>
+</li>
+<li>Finally, confirm your selection by clicking <b>Apply and Close
+</b> (also closes the Menu) or \b Apply (leaves the Menu open for 
+creation of other groups), or skip it by clicking \b Close button.
+</li></ul>
 
 \n The Result of the operation will be a \b GEOM_Object.
 
 \n <b>TUI Command:</b> <em>geompy.CreateGroup(MainShape,
 ShapeType),</em> where MainShape is a shape for which the group is
 created, ShapeType is a type of shapes in the created group.
-\n <b>Arguments:</b> 1 Shape + Type of subshape.
+\n <b>Arguments:</b> 1 Shape + Type of sub-shape.
+
+Our <b>TUI Scripts</b> provide you with useful examples of 
+\ref tui_create_groups_anchor "Create a Group" operation.
 
 <b>Example:</b>
 
-\image html image193.jpg
+\image html image193.png "Groups on a cylinder"
 
+<br>
+\anchor edit_groups_anchor
+<h2>Edit a group</h2>
 
-<br><h2>Edit a group</h2>
+\image html image57.png
 
-\image html image57.gif
+This functionality is available in OCC viewer only.
 
 To \b Edit an existing group in the main menu select <b>New entity >
 Group > Edit</b>. This menu is designed in the same way as the
 <b>Create a group</b> menu.
 
+\n When a GEOM group is edited, the main shape appears in the 3D viewer in the same mode 
+as it is displayed in the viewer. If the main shape was not displayed in the viewer, then 
+the default mode defined in the preferences will be used. 
+
+\n <b>Working with Dialog Box:</b> 
+
+\image html editgroup.png
+
+\n The subshapes already in the group are displayed in the 3D viewer with a specific color, 
+defined via preferences. The IDs of the subshapes already in the group are also displayed in 
+a specific color in the dialog box. When the user adds some subshapes, the new IDs are 
+displayed in the other color.
+
 \n The \b Result of the operation will be a \b GEOM_Object.
 
 \n <b>TUI Command:</b>
 <ul>
 <li><em>geompy.AddObject(Group, SubShapeID),</em> where Group is a
-group to which a sub shape has to be added, SubShapeID is an ID of the
-sub shape to be added to the group.</li>
+group to which a sub-shape has to be added, SubShapeID is an ID of the
+sub-shape to be added to the group.</li>
 <li><em>geompy.RemoveObject(Group, SubShapeID),</em> where Group is a
-group from which a sub shape has to be removed, SubShapeID is an ID of
-the sub shape to be removed from the group.</li>
+group from which a sub-shape has to be removed, SubShapeID is an ID of
+the sub-shape to be removed from the group.</li>
 <li><em>geompy.GetObjectIDs(Group),</em> where Group is a group for which its object's are returned.
 \n Returns: List of IDs.</li>
 </ul>
 
-\n <b>Arguments:</b> 1 Shape + its subshapes.
+\n <b>Arguments:</b> 1 Shape + its sub-shapes.
+
+Our <b>TUI Scripts</b> provide you with useful examples of 
+\ref tui_edit_groups_anchor "Edit a Group" operation.
 
-\n <b>Dialog Box:</b> 
+<br>
+\anchor union_groups_anchor
+<h2>Union of groups</h2>
 
-\image html editgroup.png
+This operation allows to create a new group in such a way that all
+sub-shapes that are present in the initial groups will be added to
+the new one.
+
+<em>To union groups:</em>
+<ol>
+<li>In the <b>New Entity</b> menu select the \b Group - <b>Union Groups</b> item.
+The following dialog box will appear:
+
+\image html groups_union_dlg.png
+
+In this dialog box you should specify the name of the resulting group
+and select the groups, which will be united.
+</li>
+<li>Click the \b Apply or <b>Apply and Close</b> button to confirm creation of the group.</li>
+</ol>
+
+<b>See Also</b> a sample TUI Script of a 
+\ref tui_union_groups_anchor "Union of Groups" operation.
+
+<br>
+\anchor intersect_groups_anchor
+<h2>Intersection of groups</h2>
+
+This operation allows to create a new group in such a way that only
+the sub-shapes that are present in all initial groups are added to the
+new one.
+
+<em>To intersect groups:</em>
+<ol>
+<li>In the <b>New Entity</b> menu select the \b Group - <b>Intersect Groups</b> item.
+The following dialog box will appear:
+
+\image html groups_intersect_dlg.png
+
+In this dialog box you should specify the name of the resulting group
+and select the groups, which will be intersected.
+</li>
+<li>Click the \b Apply or <b>Apply and Close</b> button to confirm creation of the group.</li>
+</ol>
+
+<b>See Also</b> a sample TUI Script of an  
+\ref tui_intersect_groups_anchor "Intersection of Groups" operation.
+
+<br>
+\anchor cut_groups_anchor
+<h2>Cut of groups</h2>
+
+This operation allows to create a new group in such a way that all
+sub-shapes that are present in the main groups but are absent in the
+tool groups are added to the new one.
+
+<em>To cut groups:</em>
+<ol>
+<li>In the <b>New Entity</b> menu select the \b Group - <b>Cut Groups</b> item.
+The following dialog box will appear:
+
+\image html groups_cut_dlg.png
+
+In this dialog box you should specify the name of the resulting group
+and the groups which will be cut.
+</li>
+<li>Click the \b Apply or <b>Apply and Close</b> button to confirm creation of the group.</li>
+</ol>
 
 Our <b>TUI Scripts</b> provide you with useful examples of 
-\ref tui_working_with_groups_page "Working with Groups".
+\ref tui_cut_groups_anchor "Cut of Groups" operation.
 
 */