Salome HOME
efbd97403cd83793192ee8192d1a698a785bba35
[modules/smesh.git] / doc / salome / gui / SMESH / input / constructing_meshes.doc
1 /*!
2
3 \page constructing_meshes_page Constructing meshes
4
5 \n Construction of a mesh consists of:
6 <ul>
7 <li>Selecting a geometrical object for meshing</li>
8 <li>Applying \subpage basic_meshing_algos_page "meshing algorithms" and
9 \subpage about_hypo_page "hypotheses" which will be used at computation of
10 this mesh.</li>
11 </ul>
12
13 <em>To construct a mesh:</em>
14 <ol>
15 <li>In the \b Mesh menu select <b>Create Mesh</b> or click <em>"Create
16 Mesh"</em> button in the toolbar. 
17
18 \image html image32.png
19 <center><em>"Create Mesh" button</em></center>
20
21 The following dialog box will appear: 
22
23 \image html createmesh-inv.png
24 </li>
25 <li>For example, you need to mesh a 3d object.
26 \n First, type the name for your mesh in the "Name" box, by default,
27 it is "Mesh_1". Then select the object you wish to mesh in the Object
28 Browser and click the "Add" button.
29
30 \image html image120.png
31 <center><em>"Add" button</em></center>
32
33 Now you can define 1d Algorithm and 1d Hypotheses, which will be
34 applied to the edges of your object. (Note that any object has edges,
35 even if their existence is not apparent, for example, a sphere has 4
36 edges). Click the <em>"Add Hypothesis"</em>  button to add a hypothesis.
37
38 \image html image121.png
39 <center><em>"Add Hypothesis" button</em></center>
40
41 Click the <em>"Edit Hypothesis"</em> button to define values for the
42 current hypothesis.
43
44 \image html image122.png
45 <center><em>"Edit Hypothesis" button</em></center>
46
47 The use of additional hypotheses is optional (i.e. you may leave
48 "None" in this box).
49
50 Proceed in the same way with 2d and 3d Algorithms and Hypotheses, note
51 that the choice of hypotheses depends on the algorithm. There must be
52 one Algorithm and one or several Hypotheses for each dimension of your
53 object, otherwise you will not get any mesh at all. Of course, if you
54 wish to mesh a face, which is a 2d object, you don't need to define 3d
55 Algorithm and Hypotheses.
56 \n In the <b>Object Browser</b> the structure of the new mesh will be
57 displayed as follows:
58
59 \image html image88.jpg
60
61 It contains:
62 <ul>
63 <li>a reference to the geometrical object on the basis of which the mesh has been constructed;</li>
64 <li><b>Applied hypotheses</b> folder containing the references to the
65 hypotheses applied to the construction of the mesh;</li>
66 <li><b>Applied algorithms</b> folder containing the references to the
67 algorithms applied to the construction of the mesh.</li>
68 </ul>
69
70 There is an alternative way to create a mesh on an object simply by
71 clicking <b>Assign a set of hypotheses</b> button and selecting between
72 Automatic Tetrahedralization or Hexahedralization.  The program will
73 automatically generate a 3D mesh with the most appropriate
74 settings. In the same way you can apply this functionality for meshing
75 2D objects, in which case 3D algorithms are not applied.</li>
76
77 <li> After the mesh object is created and all hypotheses are assigned and
78 before the mesh computation, it is possible to see the mesh preview.
79
80 For this, select the mesh in the Object Browser. From the \b Mesh menu
81 select \b Preview or click "Preview" button in the
82 toolbar or activate "Preview" item from the pop-up menu.
83
84 \image html mesh_precompute.png
85 <center><em>"Preview" button</em></center>
86
87 Select <b>1D mesh</b> or <b>2D mesh</b> preview mode in the Preview dialog. 
88
89
90 \image html preview_mesh_1D.png "1D mesh preview shows nodes computed on geometry edges"
91
92 \image html preview_mesh_2D.png "2D mesh preview shows edge mesh elements, computed on geometry faces"
93
94 <b>Compute</b> button computes the whole mesh.
95
96 When the Preview dialog is closed, the question about the storage of temporarily
97 created mesh elements appers:
98
99 \image html preview_tmp_data.png
100
101 These elenents can be reused in the next mesh computation.
102 </li>
103
104
105 <li>It is equally possible to skip the Preview and \b Compute the mesh
106 after the hypotheses are assigned. For this, select your mesh in the <b>Object
107 Browser</b>. From the \b Mesh menu select \b Compute or click "Compute" button of the
108 toolbar. 
109
110 \image html image28.png
111 <center><em>"Compute" button</em></center>
112
113 The Mesh Computation information box appears.
114
115 \image html meshcomputationsucceed.png
116
117 If the mesh computation failed, the information about the cause of the
118 failure is provided.
119
120 \image html meshcomputationfail.png
121
122 After you select the error, <b>Show Subshape</b> button allows
123 visualizing the geometrical entity that causes it.
124
125 \image html failed_computation.png "Example of the invalid input mesh"
126
127 \Note Mesh Computation Information box does not appear if you set
128 "Mesh computation/Show a computation result notification" preference 
129 to the "Never" value. This option gives the possibility to control mesh
130 computation reporting. There are the following possibilities: always
131 show information box, only if an error occurs or never. 
132 By default, the information box is always shown after mesh computation operation.
133
134 <b>Publish Subshape</b> button publishes the subshape, whose meshing
135 failed, in GEOM component as a child of the mesh geometry, which
136 allows analyzing the problem geometry and creating a submesh on it in
137 order to locally tune hypotheses.
138
139 <b>NOTE</b> It is possible to define a 1D or a 2D mesh in a
140 python script and then use such submeshes in the construction of a 3D
141 mesh. For this, there exist two algorithms: <b>Use existing edges</b> and <b>Use
142 existing faces</b>. They are not entirely usable from the GUI, so a
143 mesh created using these algorithms should be exported into a python
144 script, edited and then imported into the GUi. 
145
146 Consider trying a sample script for construction of a mesh from our 
147 \ref tui_creating_meshes_page "TUI Scripts" section.
148 </li>
149 </ol>
150
151 */