Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / doc / salome / gui / GEOM / input / working_with_groups.doc
1 /*!
2
3 \page work_with_groups_page Working with groups
4
5 Creation and editing groups of sub-shapes of a geometrical object makes
6 handling sub-shapes much easier. This functionality is available in OCC
7 viewer only.
8
9 <br><h2>Create a group</h2>
10
11 \image html image56.png
12
13 To create a group of sub-shapes of a geometrical object in the main
14 menu select <b>New entity > Group > Create</b>
15 \n The following menu will appear:
16
17 \image html geomcreategroup.png
18
19 In this Menu:
20
21 <ul>
22 <li><b>Shape Type</b> radio button defines the type of elements for the
23 group (points, wires, faces, shells or solids).</li>
24 <li><b>Group Name</b> - allows defining the name of the group, by
25 default, it is Group_n.</li>
26 <li>Then, using the "Select" button, select the <b>Main Shape</b> (a
27 geometrical object on which the group will be created). </li>
28 <li> <b>Main Shape Selection restriction</b> button group allows limiting the range
29 of available group elements,
30 <ul><li> <b>No restriction</b> button enables all sub-shapes of the Main
31 Shape.</li>
32 <li><b>Geometrical parts of the Second Shape</b> restricts the range of accessible
33 elements to the sub-shapes of the Main Shape that geometrically
34 coincide with the <b>Second Shape</b>.</li>
35 <li><b>Only Sub-shapes of the Second Shape</b> restricts the range of
36 accessible elements to the sub-shapes of the Main Shape that 
37 are sub-shapes of the <b>Second Shape</b>. This is useful because 
38 sometimes purely geometrical coincidence is not enough and it 
39 is necessary to work with shapes, which actually belong both 
40 to the main and the second shape.</li>
41 </ul>
42 <li>You can selectively display the selected elements using the following buttons:</li>
43 <ul>
44 <li><b>Show only selected</b> - displays only the sub-shapes selected in the list box.</li>
45 <li><b>Hide selected</b> - hides the sub-shapes selected in the list box.</li>
46 <li><b>Show all sub-shapes</b> - displays only the sub-shapes of the Main Shape.</li>
47 </ul>
48 <li> You can select the elements of your group in two ways:
49 <ul>
50 <li>You can select them manually in the 3D Viewer, and add to the
51 group by clicking the \b Add button (keep down the Shift button on the
52 keyboard to select several elements and add all them together). The
53 indexes of the selected elements will be displayed in the list. To
54 delete elements from the list, select them and click \b Remove
55 button.</li>
56 <li>Clicking <b>Select All</b> button you can add all object's
57 elements of a certain type in the list of the elements of the
58 group. If the <b>Second Shape</b> is used, the elements are added 
59 according to <b>Main Shape Selection restriction</b> settings. To delete elements 
60 from the list, select them and click \b Remove button.
61 </li></ul>
62 </li>
63 <li>Finally, confirm your selection by clicking <b>Apply and Close
64 </b> (also closes the Menu) or \b Apply (leaves the Menu open for 
65 creation of other groups), or skip it by clicking \b Close button.
66 </li></ul>
67
68 \n The Result of the operation will be a \b GEOM_Object.
69
70 \n <b>TUI Command:</b> <em>geompy.CreateGroup(MainShape,
71 ShapeType),</em> where MainShape is a shape for which the group is
72 created, ShapeType is a type of shapes in the created group.
73 \n <b>Arguments:</b> 1 Shape + Type of sub-shape.
74
75 <b>Example:</b>
76
77 \image html image193.png "Groups on a cylinder"
78
79
80 <br><h2>Edit a group</h2>
81
82 \image html image57.png
83
84 To \b Edit an existing group in the main menu select <b>New entity >
85 Group > Edit</b>. This menu is designed in the same way as the
86 <b>Create a group</b> menu.
87
88 \n The \b Result of the operation will be a \b GEOM_Object.
89
90 \n <b>TUI Command:</b>
91 <ul>
92 <li><em>geompy.AddObject(Group, SubShapeID),</em> where Group is a
93 group to which a sub-shape has to be added, SubShapeID is an ID of the
94 sub-shape to be added to the group.</li>
95 <li><em>geompy.RemoveObject(Group, SubShapeID),</em> where Group is a
96 group from which a sub-shape has to be removed, SubShapeID is an ID of
97 the sub-shape to be removed from the group.</li>
98 <li><em>geompy.GetObjectIDs(Group),</em> where Group is a group for which its object's are returned.
99 \n Returns: List of IDs.</li>
100 </ul>
101
102 \n <b>Arguments:</b> 1 Shape + its sub-shapes.
103
104 \n <b>Dialog Box:</b> 
105
106 \image html editgroup.png
107
108 Our <b>TUI Scripts</b> provide you with useful examples of 
109 \ref tui_working_with_groups_page "Working with Groups".
110
111 */