Salome HOME
Common update of Salome GUI documentation
[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 subshapes of a geometrical object makes
6 handling subshapes much easier. This functionality is available in OCC
7 viewer only.
8
9 <br><h2>Create a group</h2>
10
11 \image html image56.gif
12
13 To create a group of subshapes 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 select the elements of your group in two ways:
43 <ul>
44 <li>You can select them manually in the 3D Viewer, and add to the
45 group by clicking the \b Add button (keep down the Shift button on the
46 keyboard to select several elements and add all them together). The
47 indexes of the selected elements will be displayed in the list. To
48 delete elements from the list, select them and click \b Remove
49 button.</li>
50 <li>Clicking <b>Select All</b> button you can add all object's
51 elements of a certain type in the list of the elements of the
52 group. If the <b>Second Shape</b> is used, the elements are added 
53 according to <b>Main Shape Selection restriction</b> settings. To delete elements 
54 from the list, select them and click \b Remove button.
55 </li></ul>
56 </li>
57 <li>Finally, confirm your selection by clicking <b>Apply and Close
58 </b> (also closes the Menu) or \b Apply (leaves the Menu open for 
59 creation of other groups), or skip it by clicking \b Close button.
60 </li></ul>
61
62 \n The Result of the operation will be a \b GEOM_Object.
63
64 \n <b>TUI Command:</b> <em>geompy.CreateGroup(MainShape,
65 ShapeType),</em> where MainShape is a shape for which the group is
66 created, ShapeType is a type of shapes in the created group.
67 \n <b>Arguments:</b> 1 Shape + Type of subshape.
68
69 <b>Example:</b>
70
71 \image html image193.jpg
72
73
74 <br><h2>Edit a group</h2>
75
76 \image html image57.gif
77
78 To \b Edit an existing group in the main menu select <b>New entity >
79 Group > Edit</b>. This menu is designed in the same way as the
80 <b>Create a group</b> menu.
81
82 \n The \b Result of the operation will be a \b GEOM_Object.
83
84 \n <b>TUI Command:</b>
85 <ul>
86 <li><em>geompy.AddObject(Group, SubShapeID),</em> where Group is a
87 group to which a sub shape has to be added, SubShapeID is an ID of the
88 sub shape to be added to the group.</li>
89 <li><em>geompy.RemoveObject(Group, SubShapeID),</em> where Group is a
90 group from which a sub shape has to be removed, SubShapeID is an ID of
91 the sub shape to be removed from the group.</li>
92 <li><em>geompy.GetObjectIDs(Group),</em> where Group is a group for which its object's are returned.
93 \n Returns: List of IDs.</li>
94 </ul>
95
96 \n <b>Arguments:</b> 1 Shape + its subshapes.
97
98 \n <b>Dialog Box:</b> 
99
100 \image html editgroup.png
101
102 Our <b>TUI Scripts</b> provide you with useful examples of 
103 \ref tui_working_with_groups_page "Working with Groups".
104
105 */