Salome HOME
0023546: [EDF] AsterStudy: add a method to Python API to show/hide orientation vector...
[modules/smesh.git] / doc / salome / gui / SMESH / input / 1d_meshing_hypo.rst
1 .. _a1d_meshing_hypo_page:
2
3 *********************
4 1D Meshing Hypotheses
5 *********************
6
7 Basic 1D hypothesis specifies:
8         * how a :ref:`a1d_algos_anchor` should divide the edge;
9         * how a :ref:`a1d_algos_anchor` should divide the group of C1-continuous edges.
10
11 1D hypotheses can be categorized by type of nodes distribution as follows:
12         * Uniform distribution:
13                 * :ref:`average_length_anchor`
14                 * :ref:`max_length_anchor`
15                 * :ref:`number_of_segments_anchor` with Equidistant distribution
16                 * :ref:`automatic_length_anchor`
17
18         * Constantly increasing or decreasing length of segments:
19                 * :ref:`arithmetic_1d_anchor` 
20                 * :ref:`geometric_1d_anchor`
21                 * :ref:`start_and_end_length_anchor` 
22                 * :ref:`number_of_segments_anchor` with Scale distribution
23
24         * Distribution depending on curvature:
25                 * :ref:`adaptive_1d_anchor` 
26                 * :ref:`deflection_1d_anchor` 
27
28         * Arbitrary distribution:
29                 * :ref:`fixed_points_1d_anchor` 
30                 * :ref:`number_of_segments_anchor` "Number of Segments" with :ref:`analyticdensity_anchor` or Table Density Distribution
31
32
33 .. _adaptive_1d_anchor:
34
35 Adaptive hypothesis
36 ###################
37
38 **Adaptive** hypothesis allows to split edges into segments with a length that depends on the curvature of edges and faces and is limited by **Min. Size** and **Max Size**. The length of a segment also depends on the lengths of adjacent segments (that can't differ more than twice) and on the  distance to close geometrical entities (edges and faces) to avoid creation of narrow 2D elements.
39
40         .. image:: ../images/adaptive1d.png
41                 :align: center
42
43 * **Min size** parameter limits the minimal segment size. 
44 * **Max size** parameter defines the length of segments on straight edges. 
45 * **Deflection** parameter gives maximal distance of a segment from a curved edge.
46
47         .. image:: ../images/adaptive1d_sample_mesh.png 
48                 :align: center
49
50         .. centered::
51                 Adaptive hypothesis and NETGEN 2D algorithm - the size of mesh segments reflects the size of geometrical features
52
53 **See Also** a :ref:`tui_1d_adaptive` that uses Adaptive hypothesis.
54
55 .. _arithmetic_1d_anchor:
56
57 Arithmetic Progression hypothesis
58 #################################
59
60 **Arithmetic Progression** hypothesis allows to split edges into segments with a length that changes in arithmetic progression (Lk = Lk-1 + d) beginning from a given starting length and up to a given end length.
61
62 The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use 
63 **Add** button to add the selected edges to the list.
64
65 :ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter.
66
67
68 .. image:: ../images/a-arithmetic1d.png
69         :align: center
70
71
72 .. image:: ../images/b-ithmetic1d.png 
73         :align: center
74
75 .. centered::
76         "Arithmetic Progression hypothesis - the size of mesh elements gradually increases"
77
78 **See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation.  
79
80 .. _geometric_1d_anchor:
81
82 Geometric Progression hypothesis
83 ################################
84
85 **Geometric Progression** hypothesis allows splitting edges into segments with a length that changes in geometric progression (Lk = Lk-1 * d) starting from a given **Start Length** and with a given **Common Ratio**.
86
87 The splitting direction is defined by the orientation of the underlying geometrical edge.
88 **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list.
89
90 :ref:'reversed_edges_helper_anchor' group assists you in
91 defining **Reversed Edges** parameter.
92
93 .. image:: ../images/a-geometric1d.png
94         :align: center
95
96 **See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation.  
97
98 .. _deflection_1d_anchor:
99
100 Deflection hypothesis
101 #####################
102
103 **Deflection** hypothesis can be applied for meshing curvilinear edges composing your geometrical object. It defines only one parameter: the value of deflection (or chord error).
104
105 A geometrical edge is divided into segments of length depending on edge curvature. The more curved the edge, the shorter the segment. Nodes on the edge are placed so that the maximum distance between the edge and a segment approximating a part of edge between two nodes should not exceed the value of deflection.
106
107 .. image:: ../images/a-deflection1d.png
108         :align: center
109
110 .. image:: ../images/b-flection1d.png 
111         :align: center
112
113 .. centered::
114         "Deflection hypothesis - useful for meshing curvilinear edges"
115
116 **See Also** a sample TUI Script of a :ref:`tui_deflection_1d` operation.
117
118 .. _average_length_anchor:
119
120 Local Length hypothesis
121 #######################
122
123 **Local Length** hypothesis can be applied for meshing of edges composing your geometrical object. Definition of this hypothesis consists of setting the **length** of segments, which will approximate these edges, and the **precision** of rounding.
124
125 The **precision** parameter is used to round a *number of segments*, calculated by dividing the *edge length* by the specified **length** of segment, to the higher integer if the *remainder* exceeds the **precision** and to the lower integer otherwise. 
126 Use value 0.5 to provide rounding to the nearest integer, 1.0 for the lower integer, 0.0 for the higher integer. Default value is 1e-07.
127
128 For example: if *edge length* is 10.0 and the segment **length**
129 is 3.0 then their division gives 10./3. = 3.33(3) and the *remainder* is 0.33(3).
130 If **precision** is less than 0.33(3) then the edge is divided into 3 segments.
131 If **precision** is more than 0.33(3) then the edge is divided into 4 segments.
132
133
134 .. image:: ../images/image41.gif
135         :align: center
136
137 .. image:: ../images/a-averagelength.png
138         :align: center
139
140 .. image:: ../images/b-erage_length.png 
141         :align: center
142
143 .. centered::
144         "Local Length hypothesis - all 1D mesh segments are equal"
145
146 **See Also** a sample TUI Script of a :ref:`tui_average_length` hypothesis
147 operation.
148
149 .. _max_length_anchor:
150
151 Max Size
152 ########
153
154 **Max Size** hypothesis allows splitting geometrical edges into segments not longer than the given length. Definition of this hypothesis consists of setting the maximal allowed **length** of segments.
155 **Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`diagonal_size_ratio_pref` preference parameter.
156 **Use preestimated length** check box is enabled only if the geometrical object has been selected before hypothesis definition.
157
158 .. image:: ../images/a-maxsize1d.png
159         :align: center
160
161 .. _number_of_segments_anchor:
162
163 Number of Segments hypothesis
164 #############################
165
166 **Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`nb_segments_pref` preference parameter.
167
168 The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser.
169
170 :ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter.
171
172 You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog bog :
173
174 .. image:: ../images/a-nbsegments1.png
175         :align: center
176
177 **Equidistant Distribution** - all segments will have the same length, you define only the **Number of Segments**.
178
179 **Scale Distribution** - length of segments gradually changes depending on the **Scale Factor**, which is a ratio of the first segment length to the last segment length.
180
181 Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: <code> A = S**(1/(N-1))</code>. For an edge of length L, length of the first segment is 
182
183 ::
184
185         L * (1 - A)/(1 - A**N)
186
187
188 .. image:: ../images/a-nbsegments2.png
189         :align: center
190
191
192 **Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the nodedistribution as blue crosses.
193
194 .. image:: ../images/distributionwithanalyticdensity.png
195         :align: center
196
197
198 .. _analyticdensity_anchor:
199
200 Analytic Density
201 ================
202
203 The node distribution is computed so that to have the density function integral on the range between two nodes equal for all segments.
204
205 .. image:: ../images/analyticdensity.png
206         :align: center
207
208 **Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for :ref:`analyticdensity_anchor`. You can select the **Conversion mode** from **Exponent** and **Cut negative**.
209
210 .. image:: ../images/distributionwithtabledensity.png
211         :align: center
212
213
214 **See Also** a sample TUI Script of a :ref:`tui_deflection_1d` hypothesis operation.
215
216 .. The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module).
217
218 .. _start_and_end_length_anchor:
219
220 Start and End Length hypothesis
221 ###############################
222
223 **Start and End Length** hypothesis allows to divide a geometrical edge into segments so that the first and the last segments have a specified length. The length of medium segments changes with automatically chosen geometric progression.
224
225 The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges, for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser.
226
227 :ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter.
228
229
230 .. image:: ../images/a-startendlength.png
231         :align: center
232
233 .. image:: ../images/b-art_end_length.png 
234         :align: center
235
236 .. centered::
237          "The lengths of the first and the last segment are strictly defined"
238
239 **See Also** a sample TUI Script of a :ref:`tui_start_and_end_length` hypothesis operation.
240
241
242 .. _automatic_length_anchor:
243
244 Automatic Length
245 ################
246
247 The dialog box prompts you to define the quality of the future mesh by only one parameter, which is **Fineness**, ranging from 0 (coarse mesh, low number of segments) to 1 (extremely fine mesh, great number of segments). 
248
249 .. image:: ../images/automaticlength.png
250         :align: center
251
252 Compare one and the same object (sphere) meshed with minimum and maximum value of this parameter.
253
254 .. image:: ../images/image147.gif
255         :align: center
256  
257 .. centered::
258         "Example of a rough mesh at Automatic Length Fineness of 0."
259
260 .. image:: ../images/image148.gif
261         :align: center
262  
263 .. centered::
264         "Example of a fine mesh at Automatic Length Fineness of 1."
265
266 .. _fixed_points_1d_anchor:
267
268 Fixed Points hypothesis
269 #######################
270
271 **Fixed Points** hypothesis allows splitting edges through a set of points parametrized on the edge (from 1 to 0) and a number of segments for each interval limited by the points.
272
273 .. image:: ../images/hypo_fixedpnt_dlg.png
274         :align: center
275
276 It is possible to check in **Same Nb. Segments for all intervals** option and to define one value for all intervals.
277
278 The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposite to their orientation. This list box is enabled only if the geometrical object is selected for meshing. In this case it is possible to select the edges to be reversed either directly picking them in the 3D viewer or selecting the edges or groups of edges in the Object Browser.
279
280 :ref:`reversed_edges_helper_anchor`  group assists in defining **Reversed Edges** parameter.
281
282
283 .. image:: ../images/mesh_fixedpnt.png 
284         :align: center
285
286 .. centered::
287         "Example of a sub-mesh on the edge built using Fixed Points hypothesis"
288
289 **See Also** a sample TUI Script of a :ref:`tui_fixed_points` hypothesis operation.
290
291
292 .. _reversed_edges_helper_anchor:
293
294 Reversed Edges Helper
295 #####################
296
297 .. image:: ../images/rev_edges_helper_dlg.png
298         :align: center
299
300 **Helper** group assists in defining **Reversed Edges** parameter of the hypotheses depending on edge direction.
301
302 **Show whole geometry** check-box allows seeing the whole geometrical model in the 3D Viewer, which can help to understand the location of a set of edges within the model.
303
304 **Propagation chains** group allows defining **Reversed Edges** for splitting opposite edges of quadrilateral faces in a logically uniform direction. When this group is activated, the list is filled with propagation chains found within the shape on which a hypothesis is assigned. When a chain is selected in the list its edges are shown in the Viewer with arrows, which enables choosing a common direction for all chain edges. **Reverse** button inverts the common direction of chain edges. **Add** button is active if some edges of a chain have a different direction, so you can click **Add** button to add them to **Reversed Edges** list.
305
306 .. image:: ../images/propagation_chain.png 
307         :align: center
308
309 .. centered::
310         "The whole geometry and a propagation chain"
311
312 .. note::
313         Alternatively, uniform direction of edges of one propagation chain can be achieved by :ref:`constructing_submeshes_page` on one edge of the chain and assigning a :ref:`propagation_anchor` additional hypothesis. Orientation of this edge (and hence of all the rest edges of the chain) can be controlled by using **Reversed Edges** field.
314
315