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 Mesh</b> - can be set to <em>None</em>, <em>Global size</em>
17 or <em>Local size</em>
19 - if set to <em>Global size</em>, only the <b>User size</b>,
20 <b>Max Size</b> and <b>Min Size</b> fields are taken into account.
22 - if set to <em>Local size</em>, behaves like <em>Custom</em> mode and takes into
23 account the "Gradation" parameter and the custom elements sizes given in the
26 - <b>Geometrical mesh</b> - can be set to <em>None</em>, <em>Global size</em>
28 - if set to <em>Global size</em>, allows user input in <b>Mesh angle</b>,
29 <b>Mesh distance</b> and <b>Gradation</b> fields. These fields control
30 computation of the element size, so called <i>geometrical size</i>, conform
31 to the surface geometry considering local curvatures. If both the <b>User size</b>
32 and the <i>geometrical parameters</i> are defined, the eventual element size
33 corresponds to the least of the two.
35 - <b>User size</b> - defines the size of the generated mesh elements. If "Relative value"
36 is checked, the value is relative to the diagonal of the shape.
38 - <b>Max Size</b> - defines the upper limit of mesh element size. If "Relative value"
39 is checked, the value is relative to the diagonal of the shape.
41 - <b>Min Size</b> - defines the lower limit of mesh element size. If "Relative value"
42 is checked, the value is relative to the diagonal of the shape.
44 - <b>Gradation</b> - maximum ratio between the lengths of two adjacent edges.
46 - <b>Quadratic mesh</b> - if checked, quadratic elements will be generated.
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>Anisotropic</b> - if checked, this parameter defines the maximum anisotropic ratio of the metric governing the anisotropic meshing process.
55 The default value (0) means that the metric (and thus the generated elements) can be arbitrarily stretched.
57 - <b>Remove tiny edges</b> - if checked, the tiny (nano) edges are removed from the generated mesh.
58 The tiny edge value defines the minimal length under which an edge is considered to be a tiny one.
60 - <b>Remove bad elements</b> - if checked, the bad elements (slivers) are removed from the generated mesh.
61 The bad element value defines the aspect ratio triggering the "bad element” classification.
63 - <b>Mesh optimisation</b> - if checked, the mesh will be optimized in order to get better shaped elements.
65 - <b>Allow Quadrangles</b> - if checked, allows the creation of quadrilateral elements.
67 \ref blsurf_top "Back to top"
69 \section blsurf_advanced_parameters Advanced parameters
71 The notion of <i>diag</i> used in the descriptions means the diagonal of the bounding box of the geometrical object to mesh.
73 \image html blsurf_parameters_advanced.png
75 - <b>PreCAD options</b> -if checked, the PreCAD module will be used. This module has
78 - Complete missing or inadequate CAD descriptions.
80 - Perform topology reconstruction and specific geometry
81 enhancement for mesh generation.
83 \n This module requires a specific licence. The following PreCAD
84 options are the most significant and important ones:
86 - <b>Merge Edges</b> - allows PreCAD to optimize the geometry by merging some
87 edges. This option is checked by default.
89 - <b>Process 3D topology</b> - allows PreCAD to perform the cleanup processing.
90 This option is checked by default.
92 - <b>Discard input topology</b> - computes the CAD topology from scratch,
93 without considering the topological information contained in the original CAD
94 (useful for iges files). This option is unchecked by default.
96 - <b>Verbosity level</b> - defines the percentage of "verbosity" of
97 MeshGems-CADSurf and MeshGems-PreCAD [0-10].
99 - <b>ExportGMF</b> - saves the computed mesh into a GMF file (.mesh or .meshb).
101 - <b>Add option</b> - provides the choice of multiple PreCAD and MG-CADSurf
102 advanced options, which appear, if selected, in a table where it is
103 possible to input the value of the option and edit it later.
105 - <b>Clear option</b> - removes the option selected in the table.
107 The following advanced MG-CADSurf options can be used:
109 - \b volume_gradation (real) - Controls the mesh volume gradation, which can improve the shape quality of a
110 volume mesh built afterward, specially in thin volume areas.
111 The volume gradation parameter must be greater than 1, and should be greater or equal to the value of the classic
112 surface gradation (at the risk of increasing the time of convergence of the gradation process).
113 The closer it is to 1, the smoother the final volume mesh you will build should be.
115 - \b correct_surface_intersections (bool) - If this option is deactivated, MeshGems-CADSurf will not correct
116 surface intersections. This particularly useful if you don't want volume filling in a later stage, or if you want to fix the
117 intersections in an other way (using MeshGems Cleaner for instance).
118 By default this option is 1.
120 - \b surface_intersections_processing_max_cost (real) - If correct_surface_intersections = 1, this
121 parameter gives the time the user is ready to spend in the intersection prevention process. For example,
122 if set to 3, MeshGems-CADSurf will not spend more time in the intersection removal process than
123 3 times the time required to mesh without processing the intersections.
125 - \b create_tag_on_collision (bool) - If this option is activated, MeshGems-CADSurf will create new tags to
126 describe tag collisions (when it locally changes the topology, depending on the patch independent
127 options). When this option is not activated, only one tag is preserved while the other one is dropped.
128 By default this option is 1.
130 - \b debug (bool) - If debug = 1, MeshGems-CADSurf will be very verbose and will output some intermediate files
131 in the working directory. This option is meant to communicate with Distene support mainly.
132 By default this option is 0.
134 - \b enforce_cad_edge_sizes (bool) - Relaxes the given sizemap constraint around CAD edges to allow a better
135 element quality and a better geometric approximation. It is only useful in combination with the gradation option.
136 By default this option is 0.
138 - \b rectify_jacobian (bool) - The quadratic elements generation is a processing of the MeshGems-CADSurf
139 meshing process which inserts the extra nodes on the CAD. This parameter determines whether
140 MeshGems-CADSurf will try to correct or not all the elements of the surface mesh with negative
141 Jacobians by moving the internal nodes of the mesh.
142 By default this option is 1.
144 - \b jacobian_rectification_respect_geometry (bool) - This parameter determines whether or not the geometry accuracy
145 is more important than the negative Jacobian correction. When this parameter is set to 0,
146 MeshGems-CADSurf is allowed to lose the CAD-mesh associativity in order to correct the last negative Jacobians.
147 By default this option is 1.
149 - \b respect_geometry (bool) - This patch independent option can be deactivated to allow MeshGems-CADSurf
150 to lower the geometry accuracy in its patch independent process.
151 By default this option is 1.
153 - \b optimise_tiny_edges (bool) - This patch-independent correction option can be activated to remove the tiny
154 edges (defined by the option tiny edge optimisation length) from the generated mesh when it improves
155 the local mesh quality, without taking into account the tags (attributes) specifications.
156 By default this option is 0.
158 - \b remove_duplicate_cad_faces (bool) - Defines the behavior of MeshGems-PreCAD regarding the duplicate
159 CAD faces. By default, MG-PreCAD merges the duplicate CAD faces. This behavior can be deactivated by using this option.
160 By default this option is 1.
162 - \b tiny_edge_avoid_surface_intersections (bool) - This option defines the priority between the tiny feature
163 suppression and the surface intersection prevention. By default, MeshGems-CADSurf gives the priority
164 to the surface intersection prevention rather than to tiny edge or bad surface element removal. These
165 mesh features are then removed only if it does not lead to surface intersections. This behaviour can be
166 deactivated by setting this parameter to 0, giving priority to the tiny edge or bad surface element
168 By default this option is 1.
170 - \b tiny_edge_optimisation_length (double) - This parameter defines the minimal length under which an edge is
171 considered to be a tiny one to be optimised out by the optimise tiny edges option.
172 By default this option is \f$\mathrm{diag} \times 10^{-6}\f$.
174 - \b tiny_edge_respect_geometry (bool) - This option defines the behaviour of the tiny edge removal algorithm
175 regarding volume collapse. By default, all tiny edges will be removed, regardless of any potential
176 volume collapse. When this option is activated, it will prevent volume from being collapsed during the
177 tiny edge removal process.
178 By default this option is 0.
180 - \b max_number_of_points_per_patch (int) - This parameter controls the maximum amount of points MeshGems-CADSurf
181 is allowed to generate on a single CAD patch. For an automatic gestion of the memory, one can set this parameter to ”0”.
182 By default this option is 100000.
184 - \b periodic_tolerance (double) - This parameter defines the maximum size difference between two periodic edges
185 and also the maximum distance error between two periodic entities.
186 By default this option is diag/100.
188 - \b required_entities (char) - The required entities control the correction operations. Accepted values for this parameter are:
190 - respect : MeshGems-CADSurf is not allowed to alter any required entity, even for correction purposes,
191 - ignore : MeshGems-CADSurf will ignore the required entities in its processing,
192 - clear : MeshGems-CADSurf will clear any required status for the entities. There will not be any entity marked as required in the generated mesh.
194 \n By default this option is "respect".
196 - \b tags (char) - The tag (attribute) system controls the optimisation process. Accepted values for this parameter are:
198 - respect : the CAD tags will be preserved and unaltered by the optimisation operations,
199 - ignore : the CAD tags will be ignored by the optimisation operations but they will still be present inthe output mesh,
200 - clear : MeshGems-CADSurf will clear any tag on any entity and optimise accordingly. There will not be any tag in the generated mesh.
202 \n By default this option is "respect".
205 \b Remark: To set boolean options, you have to type 0 or 1.
209 The following MG-CADSurf options are deprecated (since MeshGems 1.3) and will be removed in the next version of Salome:
219 The following PreCAD options are commonly usable.
221 - \b closed_geometry (boolean) - describes whether the working geometry
222 should be closed or not. When activated, this option helps PreCAD to process
223 the dirtiest geometries. By default this option is 0.
225 - \b create_tag_collision (boolean) - creates new tags from original ones in case
226 of collision (entity merge or association for example). By default
229 - \b debug (bool) - If debug = 1 PreCAD will be very verbose and will output
230 some intermediate files in the working directory. By default this
233 - \b manifold_geometry (int) - describes whether the working geometry should be manifold or not.
234 When activated, this option helps PreCAD to process the dirtiest
235 geometries. By default this option is 0.
237 - \b periodic_tolerance (real) - defines the maximum distance error accepted between
238 two sets of periodic entities. By default this option is \f$\mathrm{diag} \times 10^{-5}\f$.
240 - \b remove_tiny_edges (boolean) -optimize the geometry by removing the nano edges whenever possible.
241 By default this option is 0.
243 - \b required_entities (char) -controls the correction operations. Possible values are:
245 - "respect" - PreCAD is not allowed to correct or optimize a required edge.
247 - "ignore" - PreCAD is allowed to correct a required edge.
249 - "clear" - PreCAD will erase "required" status of each required entities, and will thus
250 be allowed to correct a required edge.
252 \n By default this option is "respect".
254 - \b sewing_tolerance (real) - tolerance of the assembly. It rarely requires to be tuned.
255 By default this option is \f$\mathrm{diag} \times 5 \cdot 10^{-4}\f$.
257 - \b tags (char) -controls the optimisation process. Possible values are:
259 - "respect" - PreCAD is not allowed to cross the CAD attributes boundaries for optimisation purpose.
261 - "ignore" - PreCAD is allowed to cross the CAD attributes boundaries for optimisation.
263 - "clear" - PreCAD will erase each tgas of each entities, and will thus
264 be allowed to cross the CAD attributes boundaries in its optimisation purpose.
266 \n By default this option is "respect".
268 - \b tiny_edge_length (real) - the length below which en edge is considered as nano for the topology processing.
269 By default this option is \f$10^{-5}\f$.
271 \note Moreover, user can choose "<Other option>" item in these two pop-up menus
272 (MG-CADSurf and PreCAD) to be able to specify both the option name and the option value.
274 \ref blsurf_top "Back to top"
276 \section blsurf_local_size Local size
278 Local sizes can be defined on faces, edges or vertices:
280 - The faces, edges and vertices can belong to the meshed geometrical
281 object or to its sub-shapes (created using <b>Explode</b> command).
283 - Groups of faces, edges and vertices are also handled.
285 - It is possible to attribute the same size to several geometries using multi-selection.
287 - The sizes are constant values or python functions.
289 - In case of a python function, the following rules must be respected:
291 - The name of the function is f.
293 - If geometry is a face or a group of faces, the function is f(u,v).
295 - If geometry is an edge or a group of edges, the function is f(t).
297 - If geometry is a vertex or a group of vertices, the function is f().
299 - The function must return a double.
301 3 different types of size maps can be defined:
303 -# \ref blsurf_sizemap_computation "Computation of the physical size"
304 -# \ref blsurf_attractor "Advanced maps"
305 -# \ref blsurf_attractor_computation "Computation of attractors"
307 \ref blsurf_top "Back to top"
309 \subsection blsurf_sizemap_computation Computation of the physical size
311 \image html blsurf_parameters_sizemap1.png
313 The physical size is obtained by querying sizemap functions associated
314 to the input CAD object for surfaces, curves and points.
315 Each function can either return a value h (which is then trimmed
316 between the two bounds hphymin and hphymax), or "no answer" (by not
317 assigning a value to h), thus providing great flexibility in the
318 specification of the sizes. The computation depends on whether point P
319 is internal to a surface, internal to a curve, or at the end of
322 - If point P is internal to a surface, the CAD surface size function
323 is queried. If no answer is returned, one interpolates with the values
324 at the vertices of the discretized interface curves.
326 - If point P is internal to a curve, the CAD curve size function is
327 queried first. If no answer is returned, the surface size function is
328 queried for every adjacent surface and the mean value of the returned
329 values is computed. If no answer is returned, sizes h1 and h2 at both
330 ends of the curve are considered (see next item) and the interpolated
333 - If point P is at the extremity of several curves, the CAD point size
334 function is queried first. If no answer is returned, the curve size
335 function is queried for every adjacent curve and the mean value of the
336 returned values is computed. If no answer is returned, the surface
337 size function is queried for every adjacent surface and the mean value
338 of the returned values is computed. If there is still no answer
339 returned, the default value hphydef is kept.
341 In order to compute the mean of several values, the arithmetic mean is
342 used by default, but this can be modified by the parameter
343 \ref blsurf_hmean_flag "hmean flag". In the same way, in order to
344 interpolate two values, a linear interpolation is used by default, but
345 this can be modified by \ref blsurf_hinterpol_flag "hinterpol flag".
347 \ref blsurf_local_size "Back to \"Local size\""\n
348 \ref blsurf_top "Back to top"
350 \subsection blsurf_attractor Advanced maps
352 \image html blsurf_parameters_sizemap2.png
354 More specific size maps can be defined on faces.
356 - <i> Attractors </i> allow to define the size of the mesh elements
357 on a face so that the mesh is the finest on the attractor shape and
358 becomes coarser when getting far from this shape.
360 - The selected attractor can be a Vertex, an Edge, a Wire or a
361 Compound mixing several entities of those types.
363 - The attractor doesn't have to be a sub-shape of the shape to mesh.
365 - The size will grow exponentially (see the formula below) but is
366 bounded by gradation, \n so if you want the formula to be strictly
367 respected, you should set the <i>gradation</i>
368 to its maximum (2.5) in the <i>arguments</i> tab.
370 - Furthermore you can choose to <i> keep the size constant </i>
371 until a certain distance from a shape. This option can be combined or
372 not with an <i>attractor</i> size map described above.
374 - If the two options are combined the size will remain constant
375 until the distance specified in "constant over" and grow then as
376 prescribed by the attractor function.
378 - Else the growing is only controled by the standard arguments of
379 MG-CADSurf (gradation ...).
381 \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"
383 \note The validation of the hypothesis might take a few seconds if
384 attractors are defined or the "constant size" option is used because a
385 map of distances has to be built on the whole surface for each face
386 where such a hypothesis has been defined.
388 \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including size map.
390 \ref blsurf_local_size "Back to \"Local size\""\n
391 \ref blsurf_top "Back to top"
393 \subsection blsurf_attractor_computation Computation of attractors
395 The size grows exponentially following the equation :
396 \f$h(d) = \mathrm{User Size} + (\mathrm{h\_start} - \mathrm{User Size}) \times e ^ { - \left( \frac{d}{R} \right) ^ {2} }\f$
400 - h_start is the desired size on the given attractor shape
402 - d is the distance of the current point from the attractor
403 shape. The distance is the geodesic distance (i.e. calculated by following the surface to be meshed)
405 - R is called the distance of influence and allows controlling the growth rate of the mesh
407 \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"
409 \ref blsurf_local_size "Back to \"Local size\""\n
410 \ref blsurf_top "Back to top"
412 \section blsurf_enforced_elements Enforced vertices
414 \image html blsurf_parameters_enforced_vertices.png
416 It is possible to define some enforced vertices to MG-CADSurf algorithm.
417 An enforced vertex is defined on a Face or a Compound by
419 - selecting an existing Vertex or Compound,
421 - or creating a new vertex given its coordinates.
423 The enforced vertex is the projection of a point defined by its
424 (x,y,z) coordinates on the selected face.
426 - It is possible to define several enforced vertices on a face or a group of faces.
428 - If the projected point is on the boundary or outside of the face, it will be ignored.
430 - 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.
432 All the internal vertices of the faces can be considered as enforced vertices if the corresponding checkbox is checked.
433 A group can optionnaly be defined on those enforced vertices.
435 \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including enforced vertices.
437 \ref blsurf_top "Back to top"
440 \section blsurf_periodicity Periodicity
442 \subsection periodicity_introduction Introduction
444 Periodicity is used to have the same discretization on two faces (in 3D) or two edges (in 2D).
445 This is useful for instance for a Representative Volume Element so that the translated meshes share the same nodes on the common faces.
447 In GUI, periodicity association uses PreCAD (optional MG-CADSurf add-on). You must have a PreCAD license to be able to use it.
449 In TUI, advanced users can use CADSurf periodicity via \ref periodicity_tui_basic_api_usage "the basic API" or \ref periodicity_tui_advanced_api_usage "the advanced API". It requires to disable PreCAD. We strongly advise to use PreCAD periodicity instead.
451 \image html blsurf_periodicity_translation.png "Two periodic faces (translation)"
453 \image html blsurf_periodicity_reflexion.png "Two periodic faces (reflexion)"
455 \image html blsurf_periodicity_2D.png "Associations of edges in 2D (both red edges are associated with each other)"
457 \subsection periodicity_gui_usage GUI usage
459 \image html blsurf_parameters_periodicity.png
461 The periodicity association can be defined:
463 - on 2 groups of faces (in 3D)
464 - on 2 groups of edges (in 2D)
466 If the transformation is a translation, PreCAD makes the periodicity association with only this information.
468 Otherwise, for instance a rotation, the user has to define 3 non-colinear vertices and their image by the transformation.
470 \subsection periodicity_tui_precad_usage TUI PreCAD usage
472 The two methods to define periodicity with PreCAD are
473 (the former name of <em>MG-CADSurf</em> is \a BLSURF and names
474 of the corresponding classes and modules still include \a "BLSURF"):
475 - BLSURFPluginBuilder.BLSURF_Algorithm.AddPreCadFacesPeriodicity
476 - BLSURFPluginBuilder.BLSURF_Algorithm.AddPreCadEdgesPeriodicity
478 List of source and target vertices to define a transformation are optional.
480 \sa Sample TUI Script of the definition of MG-CADSurf periodicity \ref tui_blsurf_periodicity_preCAD "using preCAD".
482 \subsection periodicity_tui_basic_api_usage TUI Basic API usage
484 In the CADSurf basic API, only available in TUI, the periodicity must be defined face by face, edge by edge and vertex by vertex.
486 You must disable PreCAD to use it. Hence, shapes with seam edges will not be meshed correctly.
489 - BLSURFPluginBuilder.BLSURF_Algorithm.AddFacePeriodicity
490 - BLSURFPluginBuilder.BLSURF_Algorithm.AddEdgePeriodicity
491 - BLSURFPluginBuilder.BLSURF_Algorithm.AddEdgePeriodicityWithoutFaces
492 - BLSURFPluginBuilder.BLSURF_Algorithm.AddVertexPeriodicity
494 Sample TUI Script of the definition of MG-CADSurf periodicity \ref tui_blsurf_periodicity_basic "using basic API (without preCAD)".
496 \subsection periodicity_tui_advanced_api_usage TUI Advanced API usage
498 To ease the periodicity description, the basic API methods can be called through two advanced methods, given two geom groups and a python geom transformation:
500 - BLSURFPluginBuilder.BLSURF_Algorithm.AddAdvancedFacesPeriodicity (in 3D)
501 - BLSURFPluginBuilder.BLSURF_Algorithm.AddAdvancedEdgesPeriodicity (in 2D)
503 Sample TUI Script of the definition of MG-CADSurf periodicity \ref tui_blsurf_periodicity_advanced "using advanced API (without preCAD)".
505 \ref blsurf_top "Back to top"
507 For more information on MeshGems-CADSurf, you can read its documentation at $MESHGEMS_ROOT_DIR/Docs/mg-cadsurf_user_manual.pdf