Salome HOME
merge V7_7_BR
[modules/smesh.git] / doc / salome / gui / SMESH / input / creating_groups.doc
1 /*!
2
3 \page creating_groups_page Creating groups
4
5 \n In MESH you can create a \ref grouping_elements_page "group" of
6 elements of a certain type. The main way to create a group, is to
7 select in the \b Mesh menu <b>Create Group</b> item (also available in
8 the context menu of the mesh).<br>
9 To create a group you should define the following: 
10 <ul>
11 <li><b>Mesh</b> - the mesh whose elements will form your
12 group. You can select your mesh in the Objet Browser or in the 3D
13 viewer.</li>
14 <li><b>Elements Type</b> - set of radio buttons allows to select the type of
15 elements which will form your group:</li>
16 <ul>
17 <li><b>Nodes</b></li>
18 <li><b>0D Element</b></li>
19 <li><b>Ball</b></li>
20 <li><b>Edges</b></li>
21 <li><b>Faces</b></li>
22 <li><b>Volumes</b></li>
23 </ul>
24 <li><b>Name</b> field allows to enter the name of your new group.</li>
25 <li><b>Color</b> - allows to assign to the group a certain color. The
26   chosen color is used to display the elements of the group.<br>
27   Activation of <em>Auto Color</em> item in mesh context menu
28   switches on a random choice of a color for a new group.</li>
29 </ul>
30 Mesh module distinguishes between the three Group types:
31 <b>Standalone Group</b>, <b>Group on Geometry</b> and <b>Group on Filter</b>.
32
33 \anchor standalone_group <br><h2>"Standalone Group"</h2>
34
35 <b>Standalone Group</b> contains a list of mesh elements, which you can define in
36 the following ways:
37 <ul>
38 <li>By adding all entities of the chosen type existing in the
39   mesh. For this, turn on the <b>Select All</b> check-box. In this mode
40   all controls, which allow selecting the entities, are
41   disabled.</li>
42 <li>By choosing entities manually with the mouse in the 3D Viewer. For
43   this, turn on the <b>Enable manual edition</b> check box. You can
44   click on an element in the 3D viewer and it will be highlighted. After
45   that click the \b Add button and the ID of this element will be
46   added to the list.<br>
47   The <b>Set filter</b> button allows to define the filter for
48   selection of the elements for your group. See more about filters on
49   the \ref selection_filter_library_page "Selection filter library"
50   page.</li> 
51 <li>By adding entities from either a sub-mesh or another
52   group. For this, turn on the <b>Enable manual edition</b> check
53   box. <b>Select from</b> fields group allows to select a sub-mesh or
54   a group of the appropriate type and to \b Add their elements to the
55   group.</li>
56 </ul>
57 In the <b>manual edition</b> mode you can
58 <ul>
59 <li>click the \b Remove button to remove the selected items from
60   the list.</li>
61 <li>click the <b>Sort List</b> button to sort the list of IDs of 
62   mesh elements.</li>
63 </ul>
64
65 \image html creategroup.png
66
67
68 For example, to create a new group containing all faces of an
69 existing group and some other faces selected in the viewer:
70 <ul>
71 <li> Select the \b Face type of entities and input the name of the new group.</li>
72 <li> Check the \b Group checkbox in <b>Select From</b> group.</li>
73 <li> Select the existing group of faces in the object browser or in the viewer.</li>
74 <li> Click \b Add in \b Content group. <b>Id Elements</b> list will be filled
75 with IDs of faces belonging to the selected group.</li>
76 <li> Select other faces in the viewer.</li>
77 <li> Click \b Add in \b Content group.</li>
78 <li> Click \b Apply button to create the new group.</li>
79 </ul>
80
81 Please note that the new group does not have references to the source
82 group. It contains only the list of face IDs. So if the source group
83 is changed, the new one is not updated accordingly.
84
85
86 \image html image130.gif
87 <center>In this picture the brown cells belong to a group defined
88   manually.</center> 
89
90 <b>See Also</b> a sample TUI Script of a 
91 \ref tui_create_standalone_group "Create a Standalone Group"
92 operation.  
93
94
95 \anchor group_on_geom <br><h2>"Group on Geometry"</h2>
96
97 To create a group on geometry check <b>Group on geometry</b> in the \b
98 Group \b type field. The group on geometry contains the elements
99 of a certain type generated on the selected geometrical object. Group
100 contents are dynamically updated if the mesh is modified. The group on
101 geometry can be created only if the mesh is based on geometry.
102
103 To define a group, click the \a Selection button and choose
104 - <em>Direct geometry selection</em> to select a shape in the Object
105   Browser or in the Viewer;
106 - <em>Find geometry by mesh element selection</em> to activate a
107   dialog which retrieves a shape by the selected element generated on
108   this shape.
109
110 Note that this choice is available only if the mesh elements are
111 already generated.
112
113 \image html a-creategroup.png
114
115 After confirmation of the operation a new group of mesh elements will
116 be created.
117
118 \image html image132.gif
119 <center>In this picture the cells which belong to a certain
120   geometrical face are selected in green.</center>
121
122 <b>See Also</b> a sample TUI Script of a 
123 \ref tui_create_group_on_geometry "Create a Group on Geometry"
124 operation.
125
126
127 \anchor group_on_filter <br><h2>"Group on Filter"</h2>
128
129 To create a group on filter check <b>Group on filter</b> in the <b>
130 Group type</b> field. The group on filter contains the elements
131 of a certain type satisfying the defined filter. Group contents are
132 dynamically updated if the mesh is modified.
133
134 To define a group, click the <b>Set filter</b> button and define
135 criteria of the filter in the opened dialog. After the
136 operation is confirmed, a new group of mesh elements will be created. See more about
137 filters on the 
138 \ref selection_filter_library_page "Selection filter library" page. 
139
140 \image html creategroup_on_filter.png
141
142 <b>See Also</b> a sample TUI Script of a 
143 \ref tui_create_group_on_filter "Create a Group on Filter" operation.
144
145 */