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