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