3 \page blsurf_hypo_page MG-CADSurf Parameters hypothesis
9 \section blsurf_general_parameters General parameters
11 \image html blsurf_parameters.png
13 - <b>Name</b> - allows defining the name of the hypothesis (MG-CADSurf
14 Parameters_n by default).
16 - <b>Physical Size</b> group defines a \a physical sizemap.
18 - \b Type of the physical sizemap can be set to <em>None</em>, <em>Global size</em>
19 or <em>Local size</em>
21 - if set to <em>Global size</em>, only the <b>User size</b>,
22 <b>Max Size</b> and <b>Min Size</b> fields are taken into account.
24 - if set to <em>Local size</em>, behaves like <em>Custom</em> mode and takes into
25 account the "Gradation" parameter and the custom elements sizes given in the
28 - <b>Geometrical Size</b> group defines a \a geometrical sizemap.
30 - \b Type of the geometrical sizemap can be set to <em>None</em>, <em>Global size</em>
32 - if set to <em>Global size</em>, allows user input in <b>Mesh angle</b>,
33 <b>Mesh distance</b> and <b>Gradation</b> fields. These fields control
34 computation of the element size, so called <i>geometrical size</i>, conform
35 to the surface geometry considering local curvatures. If both the <b>User size</b>
36 and the <i>geometrical parameters</i> are defined, the eventual element size
37 corresponds to the least of the two.
39 - <b>User size</b> - defines the size of the generated mesh elements. If "Relative value"
40 is checked, the value is relative to the diagonal of the shape.
42 - <b>Max Size</b> - defines the upper limit of mesh element size. If "Relative value"
43 is checked, the value is relative to the diagonal of the shape.
45 - <b>Min Size</b> - defines the lower limit of mesh element size. If "Relative value"
46 is checked, the value is relative to the diagonal of the shape.
48 - <b>Mesh angle</b> - Limiting angle (in degree) between the plane of a triangle of the mesh and each of the tangent planes at the three vertices.
49 The smaller this angle is, the closer the mesh is to the exact surface, and the denser the resulting mesh is.
51 - <b>Mesh distance</b> - Maximum desired distance between a triangle and its supporting CAD surface.
52 The smaller this distance is, the closer the mesh is to the exact surface (only available in isotropic meshing).
54 - <b>Quadratic mesh</b> - if checked, quadratic elements will be generated.
56 - <b>Gradation</b> - maximum ratio between the lengths of two adjacent edges.
58 - <b>Mesh optimisation</b> - if checked, the mesh will be optimized in order to get better shaped elements.
60 - <b>Elements type</b> - Type of the elements to generate the mesh with:
62 - Triangles: generate a mesh with only triangles.
64 - Quadrangle dominant: generate a mesh with a majority of quadrangles and a few triangles.
66 - Quadrangles: generate a mesh with only quadrangles.
68 - <b>Surface proximity</b> - activates surface proximity based refinement.
70 - <b>Number of layers</b> - number of surface element layers to be generated.
72 - <b>Ratio</b> - a multiplicative coefficient which will be used to scale the size computed by
73 the surface proximity detection.
75 - <b>Volume proximity</b> - activates volume proximity based refinement.
77 - <b>Number of layers</b> - number of surface element layers to be generated.
79 - <b>Ratio</b> - a multiplicative coefficient which will be used to scale the size computed by
80 the volume proximity detection.
82 - <b>Anisotropic</b> - if checked, this parameter defines the maximum anisotropic ratio of the metric governing the anisotropic meshing process.
83 The default value (0) means that the metric (and thus the generated elements) can be arbitrarily stretched.
85 - <b>Optimize tiny edges</b> - if checked, the tiny (nano) edges are
86 removed from the generated mesh during local mesh optimization. The
87 tiny edge will be removed only if the local quality is improved by
88 the deletion. The tiny edge value defines the minimal length under
89 which an edge is considered to be a tiny one.
91 - <b>Remove tiny edges</b> - if checked, the tiny (nano) edges are
92 removed from the generated mesh \a without taking into account the
93 local quality around the edge. The tiny edge value defines the
94 minimal length under which an edge is considered to be a tiny one.
96 - <b>Remove bad elements</b> - if checked, the bad elements (slivers) are removed from the generated mesh.
97 The bad element value defines the aspect ratio triggering the "bad element” classification.
99 - <b>Correct surface intersections</b> - if checked, the mesher will try to prevent all surface intersections, which is useful for future volume mesh generation. The value defines the time that will be spent in the intersection prevention process. For example, the value 3 means that the time of the intersection removal process won't be more than 3 times the time required to mesh without processing the intersections.
101 - <b>Volume Gradation</b> - maximum ratio between the lengths of two adjacent edges affecting quality of a future volume mesh, specially in thin volume areas. The volume gradation parameter must be greater than 1, and should be greater or equal to the value of the classic
102 surface gradation (at the risk of increasing the time of convergence of the gradation process).
103 The closer it is to 1, the smoother the final volume mesh you will build should be.
107 \ref blsurf_top "Back to top"
109 \section blsurf_advanced_parameters Advanced parameters
111 The notion of <i>diag</i> used in the descriptions means the diagonal of the bounding box of the geometrical object to mesh.
113 \image html blsurf_parameters_advanced.png
115 \b Advanced page tab expose mostly useful advanced options. Initially, default values of the options are displayed and they are not modifiable. If an option is activated using a check-box, its value becomes modifiable.
119 - <b>Independent patches</b> - This parameter can be used to activate the more complete patch independent meshing, by generating the mesh on global user-defined hyperpatches.
121 - <b>Enforce CAD edge sizes</b> - Relaxes the given sizemap constraint around CAD edges to allow a better
122 element quality and a better geometric approximation. It is only useful in combination with the
125 - <b>Priority of geometry over Jacobian</b> - This parameter determines whether or not the geometry accuracy
126 is more important than the negative Jacobian correction. When this parameter is set to 0,
127 MeshGems-CADSurf is allowed to lose the CAD-mesh associativity in order to correct the last negative Jacobians.
129 - <b>Maximal number of points per patch</b> - This parameter controls the maximum amount of points MeshGems-CADSurf
130 is allowed to generate on a single CAD patch. For an automatic gestion of the memory, you can set this parameter to ”0”.
132 - <b>Rectify Jacobian</b> - The quadratic elements generation is a processing of the MeshGems-CADSurf
133 meshing process which inserts the extra nodes on the CAD. This parameter determines whether
134 MeshGems-CADSurf will try to correct or not all the elements of the surface mesh with negative
135 Jacobians by moving the internal nodes of the mesh.
137 - <b>Respect geometry</b> - This patch independent option can be deactivated to allow MeshGems-CADSurf
138 to lower the geometry accuracy in its patch independent process.
140 - <b>Tiny edges avoid surface intersections</b> - This option defines the priority between the tiny feature
141 suppression and the surface intersection prevention. By default, MeshGems-CADSurf gives the priority
142 to the surface intersection prevention rather than to tiny edge or bad surface element removal. These
143 mesh features are then removed only if it does not lead to surface intersections. This behaviour can be
144 deactivated by setting this parameter to 0, giving priority to the tiny edge or bad surface element
147 - <b>use deprecated patch mesher</b> - This option reproduces the mesher behaviour of previous MG-CADSurf versions
148 (MeshGems before 2.3, i.e. before SALOME 8.2). This has proved useful on some particular cases such as very small
149 local size on a vertex situated on a border curve.
151 - <b>CAD preprocessor</b> options. The CAD preprocessor (formerly known as PreCAD) has two main goals:
153 - Complete missing or inadequate CAD descriptions.
155 - Perform topology reconstruction and specific geometry
156 enhancement for mesh generation.
158 \n All options are unchecked by default. No cleanup is made by default so that the mesh matches the shape. If the user has a bad shape (e.g. imported shape), he can activate some options to improve the mesh.
160 - <b>Compute ridges</b> - If this option is deactivated,
161 MeshGems-CADSurf will not try to preserve lines defined by a sharp
162 angle in the input discrete geometry. Only input ridges, free edges,
163 non manifold edges and separation betwen zones with different
164 attributes will be respected (if tags is set to respect).
166 - <b>Closed geometry</b> - describes whether the working geometry should be closed or not.
167 When activated, this option helps PreCAD to process the dirtiest geometries.
169 - \b Debug - If debug = yes PreCAD will be very verbose and will output some intermediate files in the working directory.
171 - <b>Discard input topology</b> - compute the CAD topology from scratch,
172 without considering the topological information contained in the original CAD
173 (useful for iges files). This option is unchecked by default.
175 - <b>Merge Edges</b> - optimize the geometry by merging some
178 - <b>Periodic tolerance</b> - This parameter defines the maximum size difference between two periodic edges and also the maximum distance error between two periodic entities.
180 - <b>Remove duplicate CAD faces</b> - optimize the geometry by merging the
181 duplicate CAD faces. This option is unchecked by default.
183 - <b>Required entities</b> - The required entities control the correction operations. Accepted values for this parameter are:
184 - respect : MeshGems-CADSurf is not allowed to alter any required entity, even for correction purposes,
185 - ignore : MeshGems-CADSurf will ignore the required entities in its processing,
186 - clear : MeshGems-CADSurf will clear any required status for the entities. There will not be any entity marked as required in the generated mesh.
188 - <b>Sewing tolerance</b> - tolerance of the assembly. It rarely requires to be tuned.
190 - \b Tags - controls the optimisation process. Possible values are:
191 - "respect" - PreCAD is not allowed to cross the CAD attributes boundaries for optimisation purpose.
192 - "ignore" - PreCAD is allowed to cross the CAD attributes boundaries for optimisation.
193 - "clear" - PreCAD will erase each tgas of each entities, and will thus be allowed to cross the CAD attributes boundaries in its optimisation purpose.
196 - <b>Add option</b> - adds a new line in <b>Other options</b> section where you can type an option name and value. The following advanced MG-CADSurf options can be used:
198 - \b create_tag_on_collision (bool) - If this option is activated, MeshGems-CADSurf will create new tags to
199 describe tag collisions (when it locally changes the topology, depending on the patch independent
200 options). When this option is not activated, only one tag is preserved while the other one is dropped.
201 By default this option is 1.
203 - \b tiny_edge_respect_geometry (bool) - This option defines the behaviour of the tiny edge removal algorithm
204 regarding volume collapse. By default, all tiny edges will be removed, regardless of any potential
205 volume collapse. When this option is activated, it will prevent volume from being collapsed during the tiny edge removal process.
206 By default this option is 0.
208 - \b manifold_geometry (int) - describes whether the working geometry should be manifold or not.
209 When activated, this option helps PreCAD to process the dirtiest
210 geometries. By default this option is 0.
214 - <b>Verbosity level</b> - defines the percentage of "verbosity" of
215 MeshGems-CADSurf [0-10].
217 - <b>ExportGMF</b> - saves the computed mesh into a GMF file (.mesh or .meshb).
221 \ref blsurf_top "Back to top"
223 \section blsurf_local_size Local size
225 Local sizes can be defined on faces, edges or vertices:
227 - The faces, edges and vertices should belong to the meshed geometrical
228 object or to its sub-shapes (created using <b>Explode</b> command).
230 - Groups of faces, edges and vertices are also handled.
232 - It is possible to attribute the same size to several geometries using multi-selection.
234 - The sizes are constant values or python functions.
236 - In case of a python function, the following rules must be respected:
238 - The name of the function is f.
240 - If geometry is a face or a group of faces, the function is f(u,v).
242 - If geometry is an edge or a group of edges, the function is f(t).
244 - If geometry is a vertex or a group of vertices, the function is f().
246 - The function must return a double.
248 3 different types of size maps can be defined:
250 -# \ref blsurf_sizemap_computation "Computation of the physical size"
251 -# \ref blsurf_attractor "Advanced maps"
252 -# \ref blsurf_attractor_computation "Computation of attractors"
254 \ref blsurf_top "Back to top"
256 \subsection blsurf_sizemap_computation Computation of the physical size
258 \image html blsurf_parameters_sizemap1.png
260 The physical size is obtained by querying sizemap functions associated
261 to the input CAD object for surfaces, curves and points.
262 Each function can either return a value h (which is then trimmed
263 between the two bounds hphymin and hphymax), or "no answer" (by not
264 assigning a value to h), thus providing great flexibility in the
265 specification of the sizes. The computation depends on whether point P
266 is internal to a surface, internal to a curve, or at the end of
269 - If point P is internal to a surface, the CAD surface size function
270 is queried. If no answer is returned, one interpolates with the values
271 at the vertices of the discretized interface curves.
273 - If point P is internal to a curve, the CAD curve size function is
274 queried first. If no answer is returned, the surface size function is
275 queried for every adjacent surface and the mean value of the returned
276 values is computed. If no answer is returned, sizes h1 and h2 at both
277 ends of the curve are considered (see next item) and the interpolated
280 - If point P is at the extremity of several curves, the CAD point size
281 function is queried first. If no answer is returned, the curve size
282 function is queried for every adjacent curve and the mean value of the
283 returned values is computed. If no answer is returned, the surface
284 size function is queried for every adjacent surface and the mean value
285 of the returned values is computed. If there is still no answer
286 returned, the default value hphydef is kept.
288 In order to compute the mean of several values, the arithmetic mean is
289 used by default, but this can be modified by the parameter
290 \ref blsurf_hmean_flag "hmean flag". In the same way, in order to
291 interpolate two values, a linear interpolation is used by default, but
292 this can be modified by \ref blsurf_hinterpol_flag "hinterpol flag".
294 <b>Note:</b> on some particular configurations, the mesher behaviour is
295 not the same as before (SALOME versions before 8.2 i.e. MeshGems before 2.3).
296 For a small local size defined on a point situated on a border curve,
297 the previous mesher behaviour may be prefered:
298 see "use deprecated patch mesher"
302 \ref blsurf_local_size "Back to \"Local size\""\n
303 \ref blsurf_top "Back to top"
305 \subsection blsurf_attractor Advanced maps
307 \image html blsurf_parameters_sizemap2.png
309 More specific size maps can be defined on faces.
311 - <i> Attractors </i> allow to define the size of the mesh elements
312 on a face so that the mesh is the finest on the attractor shape and
313 becomes coarser when getting far from this shape.
315 - The selected attractor can be a Vertex, an Edge, a Wire or a
316 Compound mixing several entities of those types.
318 - The attractor doesn't have to be a sub-shape of the shape to mesh.
320 - The size will grow exponentially (see the formula below) but is
321 bounded by gradation, \n so if you want the formula to be strictly
322 respected, you should set the <i>gradation</i>
323 to its maximum (2.5) in the <i>arguments</i> tab.
325 - Furthermore you can choose to <i> keep the size constant </i>
326 until a certain distance from a shape. This option can be combined or
327 not with an <i>attractor</i> size map described above.
329 - If the two options are combined the size will remain constant
330 until the distance specified in "constant over" and grow then as
331 prescribed by the attractor function.
333 - Else the growing is only controled by the standard arguments of
334 MG-CADSurf (gradation ...).
336 \image html blsurf_const_size_near_shape2.png "Example of size map with constant size option, the size is kept constant on the left side of the surface until a certain distance"
338 \note The validation of the hypothesis might take a few seconds if
339 attractors are defined or the "constant size" option is used because a
340 map of distances has to be built on the whole surface for each face
341 where such a hypothesis has been defined.
343 \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including size map.
345 \ref blsurf_local_size "Back to \"Local size\""\n
346 \ref blsurf_top "Back to top"
348 \subsection blsurf_attractor_computation Computation of attractors
350 The size grows exponentially following the equation :
351 \f$h(d) = \mathrm{User Size} + (\mathrm{h\_start} - \mathrm{User Size}) \times e ^ { - \left( \frac{d}{R} \right) ^ {2} }\f$
355 - h_start is the desired size on the given attractor shape
357 - d is the distance of the current point from the attractor
358 shape. The distance is the geodesic distance (i.e. calculated by following the surface to be meshed)
360 - R is called the distance of influence and allows controlling the growth rate of the mesh
362 \image html blsurf_attractors2.png "Example of mesh created using attractors, the attractors here are the side edges and the size grows from the side of the surface towards the apex"
364 \ref blsurf_local_size "Back to \"Local size\""\n
365 \ref blsurf_top "Back to top"
367 \section blsurf_enforced_elements Enforced vertices
369 \image html blsurf_parameters_enforced_vertices.png
371 It is possible to define some enforced vertices to MG-CADSurf algorithm.
372 An enforced vertex is defined by
374 - selecting an existing Vertex or Compound,
376 - or by its coordinates.
378 The enforced vertex is the projection of a point defined by its
379 (x,y,z) coordinates on the closest face found by the application.
381 - It is possible to define several enforced vertices.
383 - If the projected point is on the boundary or outside of the face, it will be ignored.
385 - If a group name is specified : if the group exists, the enforced nodes will be added in the existing group, if the group does not exist it will be created.
387 All the internal vertices of faces can be considered as enforced vertices if the corresponding checkbox is checked.
388 A group can optionnaly be defined on those enforced vertices.
390 \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including enforced vertices.
392 \ref blsurf_top "Back to top"
395 \section blsurf_enforced_meshes Enforced Meshes
397 \image html blsurf_enforced_meshes.png
399 MG-CADSurf algorithm can be forced by other 1D meshes, sub-meshes or
400 groups. 1D meshes are allowed to pass over face boundaries and to
401 intersect other enforced meshes.
402 If a group name is given, the enforced 1D elements will be added to the group.
403 If the group does not exist, it is created.
405 \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including enforced meshes.
407 \ref blsurf_top "Back to top"
410 \section blsurf_periodicity Periodicity
412 \subsection periodicity_introduction Introduction
414 Periodicity is used to have the same discretization on two faces (in 3D) or two edges (in 2D).
415 This is useful for instance for a Representative Volume Element so that the translated meshes share the same nodes on the common faces.
417 Periodicity association uses PreCAD (MG-CADSurf preprocessor). You don't need an extra PreCAD license. It is included in MG-CADSurf since MeshGems V2.2.
419 \image html blsurf_periodicity_translation.png "Two periodic faces (translation)"
421 \image html blsurf_periodicity_reflexion.png "Two periodic faces (reflexion)"
423 \image html blsurf_periodicity_2D.png "Associations of edges in 2D (both red edges are associated with each other)"
425 \subsection periodicity_gui_usage GUI usage
427 \image html blsurf_parameters_periodicity.png
429 The periodicity association can be defined:
431 - on 2 groups of faces (in 3D)
432 - on 2 groups of edges (in 2D)
434 If the transformation is a translation, PreCAD makes the periodicity association with only this information.
436 Otherwise, for instance a rotation, the user has to define 3 non-colinear vertices and their image by the transformation.
438 \subsection periodicity_tui_precad_usage TUI PreCAD usage
440 The two methods to define periodicity with PreCAD are
441 (the former name of <em>MG-CADSurf</em> is \a BLSURF and names
442 of the corresponding classes and modules still include \a "BLSURF"):
443 - BLSURFPluginBuilder.BLSURF_Algorithm.AddPreCadFacesPeriodicity
444 - BLSURFPluginBuilder.BLSURF_Algorithm.AddPreCadEdgesPeriodicity
446 List of source and target vertices to define a transformation are optional.
448 \sa Sample TUI Script of the definition of MG-CADSurf periodicity \ref tui_blsurf_periodicity_preCAD "using preCAD".
450 \section blsurf_hyperpatch Hyper-patch
452 \image html blsurf_parameters_hyperpatch.png
454 Hyper-patch tab page allows defining faces that will be meshes together as
455 part of a global hyper-patch.
457 - <b>Hyper-patch IDs</b> table - shows IDs of faces of defined hyper-patches.
459 - <b>Face selection</b> - activates selection of faces in the VTK Viewer.
461 - <b>Group selection</b> - activates selection of faces and groups of
462 faces in the Object Browser.
464 - \b IDs - allows typing IDs of faces composing a hyper-patch and
465 shows IDs of faces selected in the Viewer or the Object Browser.
467 - \b Add - adds a new row to the table and moves \b IDs there.
469 - \b Remove - removes selected hyper-patches from the table.
471 \ref blsurf_top "Back to top"
473 For more information on MeshGems-CADSurf, you can read its documentation at $MESHGEMS_ROOT_DIR/Docs/mg-cadsurf_user_manual.pdf