Salome HOME
Merge remote branch 'origin/V8_5_asterstudy'
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_modifying_meshes.rst
1 .. _tui_modifying_meshes_page: 
2
3 ****************
4 Modifying Meshes
5 ****************
6
7 .. contents:: `Table of contents`
8
9
10 .. _tui_adding_nodes_and_elements: 
11
12 Adding Nodes and Elements
13 =========================
14
15 .. _tui_add_node:
16
17 Add Node
18 ********
19
20 .. literalinclude:: ../../../examples/modifying_meshes_ex01.py
21     :linenos:
22     :language: python
23
24 :download:`Download this script <../../../examples/modifying_meshes_ex01.py>`
25
26 .. _tui_add_0DElement:
27
28 Add 0D Element
29 **************
30
31 .. literalinclude:: ../../../examples/modifying_meshes_ex02.py
32     :linenos:
33     :language: python
34
35 :download:`Download this script <../../../examples/modifying_meshes_ex02.py>`
36
37 .. _tui_add_0DElement_on_all_nodes:
38
39 Add 0D Element on Element Nodes
40 *******************************
41
42 .. literalinclude:: ../../../examples/modifying_meshes_ex03.py
43     :linenos:
44     :language: python
45
46 :download:`Download this script <../../../examples/modifying_meshes_ex03.py>`
47
48 .. _tui_add_edge:
49
50 Add Edge
51 ********
52
53 .. literalinclude:: ../../../examples/modifying_meshes_ex04.py
54     :linenos:
55     :language: python
56
57 :download:`Download this script <../../../examples/modifying_meshes_ex04.py>`
58
59 .. _tui_add_triangle:
60
61 Add Triangle
62 ************
63
64 .. literalinclude:: ../../../examples/modifying_meshes_ex05.py
65     :linenos:
66     :language: python
67
68 :download:`Download this script <../../../examples/modifying_meshes_ex05.py>`
69
70 .. _tui_add_quadrangle:
71
72 Add Quadrangle
73 **************
74
75 .. literalinclude:: ../../../examples/modifying_meshes_ex06.py
76     :linenos:
77     :language: python
78
79 :download:`Download this script <../../../examples/modifying_meshes_ex06.py>`
80
81 .. _tui_add_tetrahedron:
82
83 Add Tetrahedron
84 ***************
85
86 .. literalinclude:: ../../../examples/modifying_meshes_ex07.py
87     :linenos:
88     :language: python
89
90 :download:`Download this script <../../../examples/modifying_meshes_ex07.py>`
91
92 .. _tui_add_hexahedron:
93
94 Add Hexahedron
95 **************
96
97 .. literalinclude:: ../../../examples/modifying_meshes_ex08.py
98     :linenos:
99     :language: python
100
101 :download:`Download this script <../../../examples/modifying_meshes_ex08.py>`
102
103 .. _tui_add_polygon:
104
105 Add Polygon
106 ***********
107
108 .. literalinclude:: ../../../examples/modifying_meshes_ex09.py
109     :linenos:
110     :language: python
111
112 :download:`Download this script <../../../examples/modifying_meshes_ex09.py>`
113
114 .. _tui_add_polyhedron:
115
116 Add Polyhedron
117 **************
118
119 .. literalinclude:: ../../../examples/modifying_meshes_ex10.py
120     :linenos:
121     :language: python
122
123 :download:`Download this script <../../../examples/modifying_meshes_ex10.py>`
124
125 .. _tui_removing_nodes_and_elements: 
126
127 Removing Nodes and Elements
128 ===========================
129
130 .. _tui_removing_nodes:
131
132 Removing Nodes
133 **************
134
135 .. literalinclude:: ../../../examples/modifying_meshes_ex11.py
136     :linenos:
137     :language: python
138
139 :download:`Download this script <../../../examples/modifying_meshes_ex11.py>`
140
141 .. _tui_removing_elements:
142
143 Removing Elements
144 *****************
145
146 .. literalinclude:: ../../../examples/modifying_meshes_ex12.py
147     :linenos:
148     :language: python
149
150 :download:`Download this script <../../../examples/modifying_meshes_ex12.py>`
151
152 .. _tui_removing_orphan_nodes:
153
154 Removing Orphan Nodes
155 *********************
156
157 .. literalinclude:: ../../../examples/modifying_meshes_ex13.py
158     :linenos:
159     :language: python
160
161 :download:`Download this script <../../../examples/modifying_meshes_ex13.py>`
162
163 .. _tui_moving_nodes: 
164
165 Moving Nodes
166 ============
167
168 .. literalinclude:: ../../../examples/modifying_meshes_ex15.py
169     :linenos:
170     :language: python
171
172 :download:`Download this script <../../../examples/modifying_meshes_ex15.py>`
173
174 .. _tui_diagonal_inversion: 
175
176 Diagonal Inversion
177 ==================
178
179 .. literalinclude:: ../../../examples/modifying_meshes_ex16.py
180     :linenos:
181     :language: python
182
183 :download:`Download this script <../../../examples/modifying_meshes_ex16.py>`
184
185 .. _tui_uniting_two_triangles:
186
187 Uniting two Triangles
188 =====================
189
190 .. literalinclude:: ../../../examples/modifying_meshes_ex17.py
191     :linenos:
192     :language: python
193
194 :download:`Download this script <../../../examples/modifying_meshes_ex17.py>`
195
196 .. _tui_uniting_set_of_triangles:
197
198 Uniting a Set of Triangles
199 ==========================
200
201 .. literalinclude:: ../../../examples/modifying_meshes_ex18.py
202     :linenos:
203     :language: python
204
205 :download:`Download this script <../../../examples/modifying_meshes_ex18.py>`
206
207 .. _tui_orientation: 
208
209 Orientation
210 ===========
211
212 .. literalinclude:: ../../../examples/modifying_meshes_ex19.py
213     :linenos:
214     :language: python
215
216 :download:`Download this script <../../../examples/modifying_meshes_ex19.py>`
217
218 .. _tui_cutting_quadrangles: 
219
220 Cutting Quadrangles
221 ===================
222
223 .. literalinclude:: ../../../examples/modifying_meshes_ex20.py
224     :linenos:
225     :language: python
226
227 :download:`Download this script <../../../examples/modifying_meshes_ex20.py>`
228
229 .. _modifying_meshes_split_vol: 
230
231 Split Volumes into Tetrahedra
232 =============================
233
234 .. literalinclude:: ../../../examples/modifying_meshes_split_vol.py
235     :linenos:
236     :language: python
237
238 :download:`Download this script <../../../examples/modifying_meshes_split_vol.py>`
239
240 .. _tui_smoothing: 
241
242 Smoothing
243 =========
244
245 .. literalinclude:: ../../../examples/modifying_meshes_ex21.py
246     :linenos:
247     :language: python
248
249 :download:`Download this script <../../../examples/modifying_meshes_ex21.py>`
250
251 .. _tui_extrusion: 
252
253 Extrusion
254 =========
255
256 .. literalinclude:: ../../../examples/modifying_meshes_ex22.py
257     :linenos:
258     :language: python
259
260 :download:`Download this script <../../../examples/modifying_meshes_ex22.py>`
261
262 .. _tui_extrusion_along_path: 
263
264 Extrusion along a Path
265 ======================
266
267 .. literalinclude:: ../../../examples/modifying_meshes_ex23.py
268     :linenos:
269     :language: python
270
271 :download:`Download this script <../../../examples/modifying_meshes_ex23.py>`
272
273 .. _tui_revolution: 
274
275 Revolution
276 ==========
277
278 .. literalinclude:: ../../../examples/modifying_meshes_ex24.py
279     :linenos:
280     :language: python
281
282 :download:`Download this script <../../../examples/modifying_meshes_ex24.py>`
283
284 .. _tui_pattern_mapping: 
285
286 Pattern Mapping
287 ===============
288
289 .. literalinclude:: ../../../examples/modifying_meshes_ex25.py
290     :linenos:
291     :language: python
292
293 :download:`Download this script <../../../examples/modifying_meshes_ex25.py>`
294
295 .. _tui_quadratic: 
296
297 Convert mesh to/from quadratic
298 ==============================
299
300 .. literalinclude:: ../../../examples/modifying_meshes_ex26.py
301     :linenos:
302     :language: python
303
304 :download:`Download this script <../../../examples/modifying_meshes_ex26.py>`
305
306 .. _tui_split_biquad: 
307
308 Split bi-quadratic into linear
309 ==============================
310
311 .. literalinclude:: ../../../examples/split_biquad.py
312     :linenos:
313     :language: python
314
315 :download:`Download this script <../../../examples/split_biquad.py>`
316
317 .. _tui_double_nodes_on_group_boundaries:
318
319 Double nodes on groups boundaries
320 =================================
321
322 Double nodes on shared faces between groups of volumes and create flat elements on demand.
323
324 The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups.
325
326 The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements.
327
328 Triangles are transformed into prisms, and quadrangles into hexahedrons.
329
330 The flat elements are stored in groups of volumes.
331
332 These groups are named according to the position of the group in the list:
333 the group j_n_p is the group of the flat elements that are built between the group \#n and the group \#p in the list.
334 If there is no shared faces between the group \#n and the group \#p in the list, the group j_n_p is not created.
335 All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation).
336 The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples".
337
338 This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder).
339 The big cylinder is defined by two geometric volumes.
340
341 .. literalinclude:: ../../../examples/generate_flat_elements.py
342     :linenos:
343     :language: python
344
345 :download:`Download this script <../../../examples/generate_flat_elements.py>`
346
347 Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh.
348 The flat elements on group boundaries and on faces are built with the
349 2 last lines of the code above.
350
351 If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1,
352 the flat elements are built, otherwise, there is only a duplication of the nodes.
353
354 To observe flat element groups, save the resulting mesh on a MED file and reload it.
355
356