23352: [CEA] Order and naming of meshing algorithms

This commit is contained in:
eap 2016-10-03 17:53:47 +03:00
parent d498ff64b2
commit dd0d39d752
39 changed files with 591 additions and 259 deletions

View File

@ -10,7 +10,7 @@ geompy = geomBuilder.New(salome.myStudy)
# The requirement is to have a surface mesh on the cube comprised of # The requirement is to have a surface mesh on the cube comprised of
# triangles of exactly the same size arranged in a grid pattern. # triangles of exactly the same size arranged in a grid pattern.
# #
# To fulfill this requirement we mesh the box using Quadrangle (Mapping) # To fulfill this requirement we mesh the box using Quadrangle: Mapping
# meshing algorithm, split quadrangles into triangles and then generate # meshing algorithm, split quadrangles into triangles and then generate
# tetrahedrons. # tetrahedrons.

View File

@ -1,4 +1,4 @@
# Arithmetic 1D and Geometric Progression # Arithmetic Progression and Geometric Progression
import salome import salome
salome.salome_init() salome.salome_init()

View File

@ -1,4 +1,4 @@
# Deflection 1D and Number of Segments # Deflection and Number of Segments
import salome import salome
salome.salome_init() salome.salome_init()

View File

@ -1,4 +1,4 @@
# Radial Quadrangle 1D2D example # Radial Quadrangle 1D-2D example
import salome import salome
salome.salome_init() salome.salome_init()

View File

@ -1,4 +1,4 @@
# Usage of 3D Extrusion meshing algorithm # Usage of Extrusion 3D meshing algorithm
import salome import salome
salome.salome_init() salome.salome_init()

BIN
doc/salome/gui/SMESH/images/pref21.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -14,25 +14,25 @@ Basic 1D hypothesis specifies:
<ul> <ul>
<li>\ref average_length_anchor "Local Length"</li> <li>\ref average_length_anchor "Local Length"</li>
<li>\ref max_length_anchor "Max Size"</li> <li>\ref max_length_anchor "Max Size"</li>
<li>\ref number_of_segments_anchor "Number of segments" with Equidistant distribution</li> <li>\ref number_of_segments_anchor "Number of Segments" with Equidistant distribution</li>
<li>\ref automatic_length_anchor "Automatic Length"</li> <li>\ref automatic_length_anchor "Automatic Length"</li>
</ul></li> </ul></li>
<li>Constantly increasing or decreasing length of segments: <li>Constantly increasing or decreasing length of segments:
<ul> <ul>
<li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li> <li>\ref arithmetic_1d_anchor "Arithmetic Progression"</li>
<li>\ref geometric_1d_anchor "Geometric Progression"</li> <li>\ref geometric_1d_anchor "Geometric Progression"</li>
<li>\ref start_and_end_length_anchor "Start and end length"</li> <li>\ref start_and_end_length_anchor "Start and end length"</li>
<li>\ref number_of_segments_anchor "Number of segments" with Scale distribution</li> <li>\ref number_of_segments_anchor "Number of Segments" with Scale distribution</li>
</ul></li> </ul></li>
<li>Distribution depending on curvature: <li>Distribution depending on curvature:
<ul> <ul>
<li>\ref adaptive_1d_anchor "Adaptive"</li> <li>\ref adaptive_1d_anchor "Adaptive"</li>
<li>\ref deflection_1d_anchor "Deflection 1D"</li> <li>\ref deflection_1d_anchor "Deflection"</li>
</ul></li> </ul></li>
<li>Arbitrary distribution: <li>Arbitrary distribution:
<ul> <ul>
<li>\ref fixed_points_1d_anchor "Fixed points 1D"</li> <li>\ref fixed_points_1d_anchor "Fixed Points"</li>
<li>\ref number_of_segments_anchor "Number of segments" with <li>\ref number_of_segments_anchor "Number of Segments" with
\ref analyticdensity_anchor "Analytic Density Distribution" or Table Density Distribution</li> \ref analyticdensity_anchor "Analytic Density Distribution" or Table Density Distribution</li>
</ul></li> </ul></li>
</ul> </ul>
@ -54,15 +54,15 @@ creation of narrow 2D elements.
- <b>Max size</b> parameter defines the length of segments on straight edges. - <b>Max size</b> parameter defines the length of segments on straight edges.
- \b Deflection parameter gives maximal distance of a segment from a curved edge. - \b Deflection parameter gives maximal distance of a segment from a curved edge.
\image html adaptive1d_sample_mesh.png "Adaptive hypothesis and Netgen 2D algorithm - the size of mesh segments reflects the size of geometrical features" \image html adaptive1d_sample_mesh.png "Adaptive hypothesis and NETGEN 2D algorithm - the size of mesh segments reflects the size of geometrical features"
<b>See Also</b> a \ref tui_1d_adaptive "sample TUI Script" that uses Adaptive hypothesis. <b>See Also</b> a \ref tui_1d_adaptive "sample TUI Script" that uses Adaptive hypothesis.
<br> <br>
\anchor arithmetic_1d_anchor \anchor arithmetic_1d_anchor
<h2>Arithmetic 1D hypothesis</h2> <h2>Arithmetic Progression hypothesis</h2>
<b>Arithmetic 1D</b> hypothesis allows to split edges into segments with a <b>Arithmetic Progression</b> hypothesis allows to split edges into segments with a
length that changes in arithmetic progression (Lk = Lk-1 + d) length that changes in arithmetic progression (Lk = Lk-1 + d)
beginning from a given starting length and up to a given end length. beginning from a given starting length and up to a given end length.
@ -82,10 +82,10 @@ defining <b>Reversed Edges</b> parameter.
\image html a-arithmetic1d.png \image html a-arithmetic1d.png
\image html b-ithmetic1d.png "Arithmetic 1D hypothesis - the size of mesh elements gradually increases" \image html b-ithmetic1d.png "Arithmetic Progression hypothesis - the size of mesh elements gradually increases"
<b>See Also</b> a sample TUI Script of a <b>See Also</b> a sample TUI Script of a
\ref tui_1d_arithmetic "Defining Arithmetic 1D and Geometric Progression hypothesis" operation. \ref tui_1d_arithmetic "Defining Arithmetic Progression and Geometric Progression hypothesis" operation.
<br> <br>
\anchor geometric_1d_anchor \anchor geometric_1d_anchor
@ -112,13 +112,13 @@ defining <b>Reversed Edges</b> parameter.
\image html a-geometric1d.png \image html a-geometric1d.png
<b>See Also</b> a sample TUI Script of a <b>See Also</b> a sample TUI Script of a
\ref tui_1d_arithmetic "Defining Arithmetic 1D and Geometric Progression hypothesis" operation. \ref tui_1d_arithmetic "Defining Arithmetic Progression and Geometric Progression hypothesis" operation.
<br> <br>
\anchor deflection_1d_anchor \anchor deflection_1d_anchor
<h2>Deflection 1D hypothesis</h2> <h2>Deflection hypothesis</h2>
<b>Deflection 1D</b> hypothesis can be applied for meshing curvilinear edges <b>Deflection</b> hypothesis can be applied for meshing curvilinear edges
composing your geometrical object. It defines only one parameter: the composing your geometrical object. It defines only one parameter: the
value of deflection (or chord error). value of deflection (or chord error).
@ -130,10 +130,10 @@ two nodes should not exceed the value of deflection.
\image html a-deflection1d.png \image html a-deflection1d.png
\image html b-flection1d.png "Deflection 1D hypothesis - useful for meshing curvilinear edges" \image html b-flection1d.png "Deflection hypothesis - useful for meshing curvilinear edges"
<b>See Also</b> a sample TUI Script of a <b>See Also</b> a sample TUI Script of a
\ref tui_deflection_1d "Defining Deflection 1D hypothesis" operation. \ref tui_deflection_1d "Defining Deflection hypothesis" operation.
<br> <br>
\anchor average_length_anchor \anchor average_length_anchor
@ -174,7 +174,7 @@ consists of setting the maximal allowed \b length of segments.
<b>Use preestimated length</b> check box lets you use \b length <b>Use preestimated length</b> check box lets you use \b length
automatically calculated basing on size of your geometrical object, automatically calculated basing on size of your geometrical object,
namely as diagonal of bounding box divided by ten. The divider can be namely as diagonal of bounding box divided by ten. The divider can be
changed via "Ratio Bounding Box Diagonal / Max Size" changed via \ref diagonal_size_ratio_pref "Ratio Bounding Box Diagonal / Max Size"
preference parameter. preference parameter.
<b>Use preestimated length</b> check box is enabled only if the <b>Use preestimated length</b> check box is enabled only if the
geometrical object has been selected before hypothesis definition. geometrical object has been selected before hypothesis definition.
@ -183,11 +183,14 @@ geometrical object has been selected before hypothesis definition.
<br> <br>
\anchor number_of_segments_anchor \anchor number_of_segments_anchor
<h2>Number of segments hypothesis</h2> <h2>Number of Segments hypothesis</h2>
<b>Number of segments</b> hypothesis can be applied for approximating <b>Number of Segments</b> hypothesis can be applied for approximating
edges by a definite number of mesh segments with length depending on edges by a definite number of mesh segments with length depending on
the selected type of distribution of nodes. the selected type of distribution of nodes. The default number of
segments can be set via
\ref nb_segments_pref "Automatic Parameters / Default Number of Segments"
preference parameter.
The direction of the splitting is defined by the orientation of the The direction of the splitting is defined by the orientation of the
underlying geometrical edge. <b>Reverse Edges</b> list box allows to underlying geometrical edge. <b>Reverse Edges</b> list box allows to
@ -302,9 +305,9 @@ minimum and maximum value of this parameter.
<br> <br>
\anchor fixed_points_1d_anchor \anchor fixed_points_1d_anchor
<h2>Fixed points 1D hypothesis</h2> <h2>Fixed Points hypothesis</h2>
<b>Fixed points 1D</b> hypothesis allows splitting edges through a <b>Fixed Points</b> hypothesis allows splitting edges through a
set of points parametrized on the edge (from 1 to 0) and a number of set of points parametrized on the edge (from 1 to 0) and a number of
segments for each interval limited by the points. segments for each interval limited by the points.
@ -326,7 +329,7 @@ Object Browser.
defining <b>Reversed Edges</b> parameter. defining <b>Reversed Edges</b> parameter.
\image html mesh_fixedpnt.png "Example of a sub-mesh on the edge built using Fixed points 1D hypothesis" \image html mesh_fixedpnt.png "Example of a sub-mesh on the edge built using Fixed Points hypothesis"
<b>See Also</b> a sample TUI Script of a <b>See Also</b> a sample TUI Script of a
\ref tui_fixed_points "Defining Fixed Points" hypothesis operation. \ref tui_fixed_points "Defining Fixed Points" hypothesis operation.

View File

@ -75,7 +75,7 @@ algorithms are available:
\image html reduce_three_to_one.png "The fastest transition pattern: 3 to 1" \image html reduce_three_to_one.png "The fastest transition pattern: 3 to 1"
<b>Base vertex</b> tab allows using Quadrangle (Mapping) <b>Base vertex</b> tab allows using Quadrangle: Mapping
algorithm for meshing of trilateral faces. In this case it is algorithm for meshing of trilateral faces. In this case it is
necessary to select the vertex, which will be used as the forth necessary to select the vertex, which will be used as the forth
degenerated side of quadrangle. degenerated side of quadrangle.

View File

@ -30,16 +30,16 @@ In \b MESH there are the following Basic Hypotheses:
<li>\subpage a1d_meshing_hypo_page "1D Hypotheses" (for meshing of <li>\subpage a1d_meshing_hypo_page "1D Hypotheses" (for meshing of
<b>edges</b>):</li> <b>edges</b>):</li>
<ul> <ul>
<li>\ref number_of_segments_anchor "Number of segments"</li> <li>\ref number_of_segments_anchor "Number of Segments"</li>
<li>\ref average_length_anchor "Local Length"</li> <li>\ref average_length_anchor "Local Length"</li>
<li>\ref max_length_anchor "Max Size"</li> <li>\ref max_length_anchor "Max Size"</li>
<li>\ref adaptive_1d_anchor "Adaptive"</li> <li>\ref adaptive_1d_anchor "Adaptive"</li>
<li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li> <li>\ref arithmetic_1d_anchor "Arithmetic Progression"</li>
<li>\ref geometric_1d_anchor "Geometric Progression"</li> <li>\ref geometric_1d_anchor "Geometric Progression"</li>
<li>\ref start_and_end_length_anchor "Start and end length"</li> <li>\ref start_and_end_length_anchor "Start and end length"</li>
<li>\ref deflection_1d_anchor "Deflection 1D"</li> <li>\ref deflection_1d_anchor "Deflection"</li>
<li>\ref automatic_length_anchor "Automatic Length"</li> <li>\ref automatic_length_anchor "Automatic Length"</li>
<li>\ref fixed_points_1d_anchor "Fixed points 1D"</li> <li>\ref fixed_points_1d_anchor "Fixed points"</li>
</ul> </ul>
<li>\subpage a2d_meshing_hypo_page "2D Hypotheses" (for meshing of <b>faces</b>):</li> <li>\subpage a2d_meshing_hypo_page "2D Hypotheses" (for meshing of <b>faces</b>):</li>
<ul> <ul>

View File

@ -170,10 +170,10 @@ for more information about quadratic meshes.
This additional hypothesis can be used together with 2D triangulation algorithms. This additional hypothesis can be used together with 2D triangulation algorithms.
It allows 2D triangulation algorithms to build quadrangular meshes. It allows 2D triangulation algorithms to build quadrangular meshes.
Usage of this hypothesis with "Quadrangle (Mapping)" meshing algorithm Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm
is obsolete since introducing is obsolete since introducing
\ref hypo_quad_params_anchor "Quadrangle parameters" hypothesis. \ref hypo_quad_params_anchor "Quadrangle parameters" hypothesis.
Usage of this hypothesis with "Quadrangle (Mapping)" meshing algorithm Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm
corresponds to specifying "Quadrangle Preference" transition type of corresponds to specifying "Quadrangle Preference" transition type of
\ref hypo_quad_params_anchor "Quadrangle parameters" hypothesis. \ref hypo_quad_params_anchor "Quadrangle parameters" hypothesis.
\note "Quadrangle Preference" transition type can be used only if the \note "Quadrangle Preference" transition type can be used only if the

View File

@ -26,9 +26,9 @@ number of mesh segments following an 1D hypothesis.
<li>For meshing of 2D entities (<b>faces</b>):</li> <li>For meshing of 2D entities (<b>faces</b>):</li>
<ul> <ul>
<li><b>Triangle (Mefisto)</b> meshing algorithm - splits faces <li><b>Triangle: Mefisto</b> meshing algorithm - splits faces
into triangular elements.</li> into triangular elements.</li>
<li>\subpage quad_ijk_algo_page "Quadrangle (Mapping)" meshing <li>\subpage quad_ijk_algo_page "Quadrangle: Mapping" meshing
algorithm - splits faces into quadrangular elements.</li> algorithm - splits faces into quadrangular elements.</li>
</ul> </ul>
@ -65,19 +65,17 @@ objects.
There is also a number of more specific algorithms: There is also a number of more specific algorithms:
<ul> <ul>
<li>\subpage prism_3d_algo_page "for meshing prismatic 3D shapes with hexahedra and prisms"</li> <li>\subpage prism_3d_algo_page "Extrusion 3D" - for meshing prismatic 3D shapes with hexahedra and prisms.</li>
<li>\subpage quad_from_ma_algo_page "for quadrangle meshing of faces with sinuous borders and rings"</li> <li>\subpage quad_from_ma_algo_page "Quadrangle: Medial Axis Projection" - for quadrangle meshing of faces with sinuous borders and rings.</li>
<li> <b>Polygon per Face</b> meshing algorithm - generates one mesh <li> <b>Polygon per Face</b> meshing algorithm - generates one mesh
face (either a triangle, a quadrangle or a polygon) per a geometrical face (either a triangle, a quadrangle or a polygon) per a geometrical
face using all nodes from the face boundary.</li> face using all nodes from the face boundary.</li>
<li>\subpage projection_algos_page "for meshing by projection of another mesh"</li> <li>\subpage projection_algos_page "Projection algorithms" - for meshing by projection of another mesh.</li>
<li>\subpage import_algos_page "for meshing by importing elements from another mesh"</li> <li>\subpage import_algos_page "Import algorithms" - for meshing by importing elements from another mesh.</li>
<li>\subpage radial_prism_algo_page "for meshing 3D geometrical objects with cavities with hexahedra and prisms"</li> <li>\subpage radial_prism_algo_page "Radial Prism" - for meshing 3D geometrical objects with cavities with hexahedra and prisms.</li>
<li>\subpage radial_quadrangle_1D2D_algo_page "for quadrangle meshing of disks and parts of disks"</li> <li>\subpage radial_quadrangle_1D2D_algo_page "Radial Quadrangle 1D-2D" - for quadrangle meshing of disks and parts of disks.</li>
<li>\subpage use_existing_page "Use Edges to be Created Manually" and <li>\subpage use_existing_page "Use Faces/Edges to be Created Manually" - to create a 1D or a 2D mesh in a python script.</li>
\ref use_existing_page "Use Faces to be Created Manually" algorithms can be <li>\subpage segments_around_vertex_algo_page "Segments around Vertex" - for defining the length of mesh segments around certain vertices.</li>
used to create a 1D or a 2D mesh in a python script.</li>
<li>\subpage segments_around_vertex_algo_page "for defining the length of mesh segments around certain vertices"</li>
</ul> </ul>
\ref constructing_meshes_page "Constructing meshes" page describes in \ref constructing_meshes_page "Constructing meshes" page describes in

View File

@ -316,24 +316,24 @@ There is an example of sub-mesh order modifications taking a Mesh created on a B
shape. The main Mesh object: shape. The main Mesh object:
<ul> <ul>
<li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=20</li> <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=20</li>
<li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis<b>Max Element Area</b> <li><i>2D</i> <b>Triangle: Mefisto</b> with Hypothesis<b>Max Element Area</b>
</li> </li>
</ul> </ul>
The first sub-mesh <b>Submesh_1</b> created on <b>Face_1</b> is: The first sub-mesh <b>Submesh_1</b> created on <b>Face_1</b> is:
<ul> <ul>
<li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=4</li> <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=4</li>
<li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis <b>MaxElementArea</b>=1200</li> <li><i>2D</i> <b>Triangle: Mefisto</b> with Hypothesis <b>MaxElementArea</b>=1200</li>
</ul> </ul>
The second sub-mesh <b>Submesh_2</b> created on <b>Face_2</b> is: The second sub-mesh <b>Submesh_2</b> created on <b>Face_2</b> is:
<ul> <ul>
<li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=8</li> <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=8</li>
<li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis <b>MaxElementArea</b>=1200</li> <li><i>2D</i> <b>Triangle: Mefisto</b> with Hypothesis <b>MaxElementArea</b>=1200</li>
</ul> </ul>
And the last sub-mesh <b>Submesh_3</b> created on <b>Face_3</b> is: And the last sub-mesh <b>Submesh_3</b> created on <b>Face_3</b> is:
<ul> <ul>
<li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=12</li> <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=12</li>
<li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis <b>MaxElementArea</b>=1200</li> <li><i>2D</i> <b>Triangle: Mefisto</b> with Hypothesis <b>MaxElementArea</b>=1200</li>
</ul> </ul>
The sub-meshes become concurrent if they share sub-shapes that can be The sub-meshes become concurrent if they share sub-shapes that can be
@ -404,6 +404,7 @@ re-computed and the Mesh Computation information box will be shown
with the same contents. (To fully re-compute the mesh, invoke with the same contents. (To fully re-compute the mesh, invoke
\ref clear_mesh_anchor "Clear Mesh Data" command before). \ref clear_mesh_anchor "Clear Mesh Data" command before).
\anchor meshing_result_anchor
If the mesh computation has been a success, the box shows information If the mesh computation has been a success, the box shows information
on the number of entities of different types in the mesh. on the number of entities of different types in the mesh.
@ -448,7 +449,7 @@ to facilitate their analysis.
</center> </center>
\note Mesh Computation Information box does not appear if you set \note Mesh Computation Information box does not appear if you set
"Mesh computation/Show a computation result notification" preference \ref show_comp_result_pref "Mesh computation/Show a computation result notification" preference
to the "Never" value. This option gives the possibility to control mesh to the "Never" value. This option gives the possibility to control mesh
computation reporting. There are the following possibilities: always computation reporting. There are the following possibilities: always
show the information box, show only if an error occurs or never. show the information box, show only if an error occurs or never.

View File

@ -2,8 +2,8 @@
\page display_mode_page Display Mode \page display_mode_page Display Mode
\n By default your objects are represented as set in \n By default your objects are represented as defined in
\ref mesh_preferences_page "Preferences". \ref mesh_tab_preferences "Preferences".
\n However, right-clicking on the mesh in the <b>Object Browser</b>, \n However, right-clicking on the mesh in the <b>Object Browser</b>,
and selecting <b>Display Mode</b>, you can display your mesh as: and selecting <b>Display Mode</b>, you can display your mesh as:

View File

@ -4,8 +4,9 @@
This mesh quality control highlights the nodes which are coincident This mesh quality control highlights the nodes which are coincident
with other nodes (within a given tolerance). Distance at which two with other nodes (within a given tolerance). Distance at which two
nodes are considered coincident is defined by "Quality Controls/Double nodes are considered coincident is defined by
nodes tolerance" preference. \ref dbl_nodes_tol_pref "Quality Controls/Double nodes tolerance"
preference.
\image html double_nodes.png \image html double_nodes.png

View File

@ -25,6 +25,13 @@ The <b>Mesh Information</b> dialog box provides three tab pages:
overall quality information about the selected mesh, sub-mesh or group overall quality information about the selected mesh, sub-mesh or group
object. object.
\anchor dump_mesh_infos
The button \b Dump allows printing the information displayed in the
dialog box to a .txt file. The dialog for choosing a file also allows
to select which tab pages to dump via four check-boxes. The default state
of the check-boxes can be changed via \ref mesh_information_pref "Mesh information"
preferences.
\anchor advanced_mesh_infos_anchor \anchor advanced_mesh_infos_anchor
<h2>Base Information</h2> <h2>Base Information</h2>
@ -72,10 +79,11 @@ analyze directly in the dialog box or select the node(s) or element(s) in
the 3D viewer. the 3D viewer.
\note The information about the groups, to which the node or element belongs, \note The information about the groups, to which the node or element belongs,
can be shown in a short or in a detailed form. By default, for performance can be shown in a short or in a detailed form. By default, for performance
reasons, this information is shown in a short form (group names reasons, this information is shown in a short form (group names
only). The detailed information on groups can be switched on via the user only). The detailed information on groups can be switched on via
preferences, see \ref mesh_preferences_page. \ref group_detail_info_pref "Show details on groups in element information tab"
option of \ref mesh_preferences_page.
\anchor mesh_addition_info_anchor \anchor mesh_addition_info_anchor
<h2>Additional Information</h2> <h2>Additional Information</h2>
@ -105,6 +113,7 @@ For a sub-mesh object, the following information is shown:
<em>"Additional Info" page, sub-mesh information</em></center> <em>"Additional Info" page, sub-mesh information</em></center>
<br> <br>
\anchor mesh_addition_info_group_anchor
For a group object, the following information is shown: For a group object, the following information is shown:
- Name - Name
- Parent mesh - Parent mesh
@ -122,8 +131,8 @@ For a group object, the following information is shown:
computed only by demand. For this, the user should press the "Compute" computed only by demand. For this, the user should press the "Compute"
button (see picture). Also, the number of underlying nodes is button (see picture). Also, the number of underlying nodes is
automatically calculated if the size of the group does not exceed automatically calculated if the size of the group does not exceed
the "Automatic nodes compute limit" set via the "Mesh information" the \ref nb_nodes_limit_pref "Automatic nodes compute limit"
preferences (zero value means no limit). preference value (zero value means no limit).
\anchor mesh_quality_info_anchor \anchor mesh_quality_info_anchor
<h2>Quality Information</h2> <h2>Quality Information</h2>
@ -148,19 +157,22 @@ The <b>Quality Info</b> tab provides overall information about mesh quality cont
<center>\image html ctrlinfo.png <center>\image html ctrlinfo.png
<em>"Quality Info" page</em></center> <em>"Quality Info" page</em></center>
\note It is possible to set "Double nodes tolerance" in the dialog for a local change \note It is possible to change <b>Double nodes tolerance</b>, which
or via the "Quality controls" in Mesh preferences. will be used upon consequent pressing \a Compute button. The default value
of the tolerance can be set via the
\ref dbl_nodes_tol_pref "Quality controls" preferences.
\note For performance reasons, all quality control values for big meshes are \note For performance reasons, all quality control values for big
computed only by demand. For this, press the "compute" meshes are computed only by demand. For this, press the \a Compute
button. Also, values are automatically computed if the number of button. Also, values are automatically computed if the number of nodes
nodes / elements does not exceed the "Automatic controls compute limit" set / elements does not exceed the
via the "Mesh information" preferences (zero value means that there is no limit). \ref auto_control_limit_pref "Automatic controls compute limit" set
via the \ref mesh_information_pref "Mesh information" preferences
(zero value means that there is no limit).
\note The plot functionality is available only if the GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module). \note The plot functionality is available only if the GUI module is
built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when
The button \b "Dump" allows printing the information displayed in the building GUI module).
dialog box to a .txt file.
See the \ref tui_viewing_mesh_infos "TUI Example". See the \ref tui_viewing_mesh_infos "TUI Example".

View File

@ -9,6 +9,7 @@ or in later sessions with this module according to the preferences.
\image html pref21.png \image html pref21.png
\anchor automatic_update_pref
- <b>Automatic Update</b> - <b>Automatic Update</b>
- <b>Automatic Update</b> - if activated, the mesh in your - <b>Automatic Update</b> - if activated, the mesh in your
viewer will be automatically updated after it's computation, depending on viewer will be automatically updated after it's computation, depending on
@ -27,20 +28,7 @@ or in later sessions with this module according to the preferences.
number of elements does not exceed the size limit, the entities of number of elements does not exceed the size limit, the entities of
this type are shown, otherwise the user is warned that some entities are not shown. this type are shown, otherwise the user is warned that some entities are not shown.
- <b>Quality Controls</b> \anchor display_mode_pref
- <b>Display entity</b> - if activated, only currently
\ref quality_page "controlled" entities are displayed in the
viewer and other entities are temporarily hidden. For example if you
activate \ref length_page "Length" quality control, which controls
the length of mesh segments, then only mesh segments are
displayed and faces and volumes are hidden.
- <b>Use precision</b> - if activated, all quality controls
will be computed at precision defined by <b>Number of digits after
point</b> - as integers by default.
- <b>Double nodes tolerance</b> - defines the maximal distance between two
mesh nodes, at which they are considered coincident by
\ref double_nodes_control_page "Double nodes" quality control.
- <b>Display mode</b> - <b>Display mode</b>
- <b>Default display mode</b> - allows to set Wireframe, Shading, Nodes or Shrink - <b>Default display mode</b> - allows to set Wireframe, Shading, Nodes or Shrink
\ref display_mode_page "presentation mode" as default. \ref display_mode_page "presentation mode" as default.
@ -54,6 +42,23 @@ or in later sessions with this module according to the preferences.
- <b>Maximum Angle</b> - maximum deviation angle used by the - <b>Maximum Angle</b> - maximum deviation angle used by the
application to build arcs. application to build arcs.
- <b>Quality Controls</b>
- <b>Display entity</b> - if activated, only currently
\ref quality_page "controlled" entities are displayed in the
viewer and other entities are temporarily hidden. For example if you
activate \ref length_page "Length" quality control, which controls
the length of mesh segments, then only mesh segments are
displayed and faces and volumes are hidden.
- <b>Use precision</b> - if activated, all quality controls
will be computed at precision defined by <b>Number of digits after
point</b> - as integers by default.
\anchor dbl_nodes_tol_pref
- <b>Double nodes tolerance</b> - defines the maximal distance between two
mesh nodes, at which they are considered coincident by
\ref double_nodes_control_page "Double nodes" quality control.
This value is also used in \ref mesh_quality_info_anchor "Quality Info"
tab page of \ref mesh_infos_page dialog.
- <b>Mesh export</b> - <b>Mesh export</b>
\anchor export_auto_groups_pref \anchor export_auto_groups_pref
- <b>Automatically create groups for MED export</b> - defines a - <b>Automatically create groups for MED export</b> - defines a
@ -63,56 +68,70 @@ or in later sessions with this module according to the preferences.
- <b>Show warning when exporting group</b> - if activated, a warning is - <b>Show warning when exporting group</b> - if activated, a warning is
displayed when exporting a group. displayed when exporting a group.
\anchor show_comp_result_pref
- <b>Mesh computation</b> - <b>Mesh computation</b>
- <b>Show a computation result notification</b> combo-box allows to - <b>Show a computation result notification</b> - allows to
select the notification mode about a mesh computation result. select the notification mode about a \ref compute_anchor "mesh computation" result.
There are 3 possible modes: There are 3 possible modes:
- <b>Never</b> - do not show the result dialog at all; - <b>Never</b> - not to show the \ref meshing_result_anchor "result dialog" at all;
- <b>Errors only</b> - the result dialog will be shown if there were - <b>Errors only</b> - the result dialog will be shown if there were
some errors during a mesh computation; some errors during a mesh computation;
- <b>Always</b> - show the result dialog after each mesh - <b>Always</b> - show the result dialog after each mesh
computation. This is a default mode. computation. This is a default mode.
\anchor mesh_information_pref
- <b>Mesh information</b> - <b>Mesh information</b>
- <b>Mesh element information</b> - change the way mesh element - <b>Mesh element information</b> - allows changing the way
information is shown: \ref mesh_element_info_anchor "mesh element information" is shown:
- <b>Simple</b> - as a plain text - <b>Simple</b> - as a plain text
- <b>Tree</b> - in a tree-like form - <b>Tree</b> - in a tree-like form
\anchor nb_nodes_limit_pref
- <b>Automatic nodes compute limit</b> - allows defining the size limit for the - <b>Automatic nodes compute limit</b> - allows defining the size limit for the
mesh groups for which the number of underlying nodes is calculated \ref mesh_addition_info_group_anchor "mesh groups" for which
the number of underlying nodes is calculated
automatically. If the group size exceeds the value set in the preferences, automatically. If the group size exceeds the value set in the preferences,
the user will have to press \em Compute button explicitly. Zero value the user will have to press \em Compute button explicitly. Zero value
means "no limit". By default the value is set to 100 000 mesh elements. means "no limit". By default the value is set to 100 000 mesh elements.
- <b>Automatic controls compute limit</b> - allows defining the size limit for the \anchor auto_control_limit_pref
mesh elements for which the Aspect Ratio histogram is calculated - <b>Automatic controls compute limit</b> - allows defining a
automatically. If the mesh elements size exceeds the value set in the preferences, maximal number of mesh elements for which the quality controls
it is possible to press \b Compute button explicitly to calculate the histogram . Zero value in the \ref mesh_quality_info_anchor "Quality Information"
means "no limit". By default the value is set to 3 000 mesh elements. tab page are calculated automatically. If the number of mesh elements
exceeds the value set in the preferences, it is necessary to press
\b Compute button explicitly to calculate a quality measure. Zero value
means "no limit". By default the value is set to 3 000 mesh
elements.
\anchor group_detail_info_pref
- <b>Show details on groups in element information tab</b> - when - <b>Show details on groups in element information tab</b> - when
this option is switched off (default), only the names of groups, to which the node this option is switched off (default), only the names of groups, to which the node
or element belongs, are shown in the \ref mesh_element_info_anchor "Info Tab" or element belongs, are shown in the \ref mesh_element_info_anchor "Element Info"
tab of "Mesh Information" dialog box. If this option is tab of "Mesh Information" dialog box. If this option is
switched on, the detailed information on groups is shown. switched on, the detailed information on groups is shown.
- <b>Dump base information</b> - allows dumping base mesh information to the - <b>Dump base information</b> - allows dumping base mesh information to the
file, see \ref mesh_infos_page. file, see \ref dump_mesh_infos "Mesh Information".
- <b>Dump element information</b> - allows dumping element information to the - <b>Dump element information</b> - allows dumping element information to the
file, see \ref mesh_infos_page. file, see \ref dump_mesh_infos "Mesh Information".
- <b>Dump additional information</b> - allows dumping additional mesh - <b>Dump additional information</b> - allows dumping additional mesh
information to the file, see \ref mesh_infos_page. information to the file, see \ref dump_mesh_infos "Mesh Information".
- <b>Dump controls information</b> - allows dumping quality mesh - <b>Dump controls information</b> - allows dumping quality mesh
information to the file, see \ref mesh_infos_page. information to the file, see \ref dump_mesh_infos "Mesh Information".
- <b>Automatic Parameters</b> - <b>Automatic Parameters</b>
- <b>Ratio Bounding Box Diagonal / Max Size</b> - this parameter is \anchor diagonal_size_ratio_pref
used for automatic meshing. This is the ratio between the bounding box of the - <b>Ratio Bounding Box Diagonal / Max Size</b> - defines the ratio
meshed object and the Max Size of segments. between the bounding box of the meshed object and the Max Size of
- <b>Default Number of Segments</b> - defines the default segments. It is used as a default value of \ref a1d_meshing_hypo_page
number of segments on each edge. defining length of segments, especially by
\ref max_length_anchor "Max Size" hypothesis.
\anchor nb_segments_pref
- <b>Default Number of Segments</b> - defines the default number of
segments in \ref number_of_segments_anchor "Number of Segments"
hypothesis.
- <b>Mesh loading</b> - <b>Mesh loading</b>
- If <b>No mesh loading from study file at hypothesis modification</b> - <b>No mesh loading from study file at hypothesis modification</b> - if
check-box is on, the mesh data will not be loaded from the study file activated, the mesh data will not be loaded from the study file
when a hypothesis is modified. This allows saving time by omitting when a hypothesis is modified. This allows saving time by omitting
loading data of a large mesh that is planned to be recomputed with other parameters. loading data of a large mesh that is planned to be recomputed with other parameters.
- <b>Input fields precision</b> - <b>Input fields precision</b>
@ -126,10 +145,11 @@ or in later sessions with this module according to the preferences.
- <b>Preview</b> - <b>Preview</b>
- <b>Sub-shapes preview chunk size</b> - allows to limit the number - <b>Sub-shapes preview chunk size</b> - allows to limit the number
of previewed sub-shapes shown in the hypotheses creation dialog boxes, of previewed sub-shapes shown in the hypotheses creation dialog boxes,
for example "Reverse Edges" parameter of \ref number_of_segments_anchor "Number of segments" hypothesis. for example "Reverse Edges" parameter of
\ref number_of_segments_anchor "Number of segments" hypothesis.
- <b>Python Dump</b> - <b>Python Dump</b>
- <b>Historical python dump</b> checkbox allows switching between - <b>Historical python dump</b> - allows switching between
\a Historical and \a Snapshot dump mode: \a Historical and \a Snapshot dump mode:
- In \a Historical mode, Python Dump script includes all commands - In \a Historical mode, Python Dump script includes all commands
performed by SMESH engine. performed by SMESH engine.
@ -137,23 +157,28 @@ or in later sessions with this module according to the preferences.
from the Study as well as the commands not influencing the from the Study as well as the commands not influencing the
current state of meshes are excluded from the script. current state of meshes are excluded from the script.
\anchor mesh_tab_preferences
<h2>Mesh Preferences</h2> <h2>Mesh Preferences</h2>
\b Mesh tab page contains parameters defining the way the mesh is
displayed in the 3D Viewer.
\image html pref22.png \image html pref22.png
- <b>Nodes</b> allows to define default parameters for nodes, which will be applied - <b>Nodes</b> - allows to define default parameters for nodes, which will be applied
for a newly created mesh only. Existing meshes can be customized using for a newly created mesh only. Existing meshes can be customized using
\ref colors_size_page "Properties dialog box" available from the context menu of a mesh. \ref colors_size_page "Properties dialog box" available from the context menu of a mesh.
- <b>Color</b> - allows to select the color of nodes. Click on the - <b>Color</b> - allows to select the color of nodes. Click on the
colored line to access to the <b>Select Color</b> dialog box. downward arrow near the colored line to access to the <b>Select Color</b> dialog box.
- <b>Type of marker</b> - allows to define the shape of nodes. - <b>Type of marker</b> - allows to define the shape of nodes.
- <b>Scale of marker</b> - allows to define the size of nodes. - <b>Scale of marker</b> - allows to define the size of nodes.
- <b>Elements</b> allows to define default parameters for different elements, which will be applied - <b>Elements</b> - allows to define default parameters for different
for a newly created mesh only. Existing meshes can be customized using elements, which will be applied to a newly created mesh
only. Existing meshes can be customized using
\ref colors_size_page "Properties dialog box" available from the context menu of a mesh. \ref colors_size_page "Properties dialog box" available from the context menu of a mesh.
- <b>Surface color</b> - allows to select the surface color of 2D elements - <b>Surface color</b> - allows to select the surface color of 2D elements
(seen in Shading mode). Click on the colored line to access to the (seen in Shading mode). Click on the downward arrow near the colored line to access to the
<b>Select Color</b> dialog box. <b>Select Color</b> dialog box.
- <b>Back surface color</b> - allows to select the back surface color - <b>Back surface color</b> - allows to select the back surface color
of 2D elements. This is useful to differ 2d elements with of 2D elements. This is useful to differ 2d elements with
@ -166,40 +191,42 @@ or in later sessions with this module according to the preferences.
the <b>Volume color</b> by changing its brightness and saturation. the <b>Volume color</b> by changing its brightness and saturation.
- <b>0D element color</b> - allows to choose color of 0D mesh elements. - <b>0D element color</b> - allows to choose color of 0D mesh elements.
- <b>Ball color</b> - allows to choose color of discrete mesh elements (balls). - <b>Ball color</b> - allows to choose color of discrete mesh elements (balls).
- <b>Outline color</b> - allows to select the color of element - <b>Outline color</b> - allows to select the color of element borders.
borders.
- <b>Wireframe color</b> - allows to select the color of borders of - <b>Wireframe color</b> - allows to select the color of borders of
elements in the wireframe mode. elements in the wireframe mode.
- <b>Preview color</b> - allows to select the preview color of the elements. - <b>Preview color</b> - allows to select the preview color of the
elements, which is used while
\ref adding_nodes_and_elements_page "manual creation of elements".
- <b>Size of 0D elements</b> - specifies default size of 0D elements. - <b>Size of 0D elements</b> - specifies default size of 0D elements.
- <b>Size of ball elements</b> - specifies default size of discrete - <b>Size of ball elements</b> - specifies default size of discrete
elements (balls). elements (balls).
- <b>Scale factor of ball elements</b> - specifies default scale factor of discrete - <b>Scale factor of ball elements</b> - specifies default scale
elements (balls). factor of discrete elements (balls) allowing to adjust their size in the Viewer.
- <b>Line width</b> - allows to define the width of 1D elements (edges). - <b>Line width</b> - allows to define the width of 1D elements (segments).
- <b>Outline width</b> - allows to define the width of borders of - <b>Outline width</b> - allows to define the width of borders of
2D and 3D elements (shown in the Shading mode). 2D and 3D elements (shown in the Shading mode).
- <b>Shrink coef.</b> - allows to define relative space of elements - <b>Shrink coef.</b> - allows to define relative size of a shrunk
compared to gaps between them in shrink mode. element compared a non-shrunk element in percents in the shrink mode.
- <b>Groups</b> - <b>Groups</b>
- <b>Names color</b> - specifies color of group names to be used in - <b>Names color</b> - specifies color of group names to be used in
3D viewer. the 3D viewer.
- <b>Default color</b> - specifies the default group color, which is used - <b>Default color</b> - specifies the default group color, which is used
to create a new mesh group (see \ref creating_groups_page "Create Group dialog box"). to create a new mesh group (see \ref creating_groups_page "Create Group dialog box").
- <b>Numbering</b> allows to define properties of numbering functionality: - <b>Numbering</b> allows to define properties of numbering functionality:
- <b>Nodes</b> - specifies text properties of nodes numbering - <b>Nodes</b> - specifies text properties of nodes numbering
(font family, size, attributes, color). (font family, size, attributes, color).
- <b>Elements</b> - same for elements. - <b>Elements</b> - same for elements.
- <b>Orientation of Faces</b> - allows to define default properties of orientation vectors. - <b>Orientation of Faces</b> - allows to define default properties of
These preferences will be applied to the newly created meshes only; properties of existing meshes orientation vectors. These preferences will be applied to the newly
can be customized using \ref colors_size_page "Properties dialog box" created meshes only; properties of existing meshes can be customized
available from the context menu of a mesh. using \ref colors_size_page "Properties dialog box" available from
the context menu of a mesh.
- \b Color - allows to define the color of orientation vectors; - \b Color - allows to define the color of orientation vectors;
- \b Scale - allows to define the size of orientation vectors; - \b Scale - allows to define the size of orientation vectors;
- <b>3D Vector</b> check-box allows to choose between 2D planar - <b>3D Vector</b> - allows to choose between 2D planar
and 3D vectors. and 3D vectors.
<br><h2>Selection Preferences</h2> <br><h2>Selection Preferences</h2>
@ -209,7 +236,7 @@ or in later sessions with this module according to the preferences.
- <b>Selection</b> - performed with mouse-indexing (preselection) - <b>Selection</b> - performed with mouse-indexing (preselection)
and left-clicking on an object, whose appearance changes as defined in and left-clicking on an object, whose appearance changes as defined in
the <b>Preferences</b>. the <b>Preferences</b>.
- <b>Object color</b> - allows to select the color of mesh (edges and - <b>Object color</b> - allows to select the color of mesh (edges and
borders of meshes) of the selected entity. Click on the colored line borders of meshes) of the selected entity. Click on the colored line
to access to the <b>Select Color</b> dialog box. to access to the <b>Select Color</b> dialog box.
- <b>Element color</b> - allows to select the color of surface of selected - <b>Element color</b> - allows to select the color of surface of selected
@ -218,8 +245,8 @@ or in later sessions with this module according to the preferences.
- <b>Preselection</b> - performed with mouse-indexing on an object, - <b>Preselection</b> - performed with mouse-indexing on an object,
whose appearance changes as defined in the <b>Preferences</b>. whose appearance changes as defined in the <b>Preferences</b>.
- <b>Highlight color</b> - allows to select the color of mesh (edges and - <b>Highlight color</b> - allows to select the color of mesh (edges and
borders of meshes) of the entity . Click on the colored line to access borders of meshes) of the entity. Click on the colored line to access
to the <b>Select Color</b> dialog box. to the <b>Select Color</b> dialog box.
- <b>Precision</b> - in this menu you can set the value of precision - <b>Precision</b> - in this menu you can set the value of precision
@ -229,32 +256,31 @@ or in later sessions with this module according to the preferences.
\image html pref24.png \image html pref24.png
\note The following settings are default and will be applied for \note The following settings are default and will be applied to
a newly created mesh only. Existing meshes a newly created mesh only. Existing meshes can be customized using
can be customized using local \ref scalar_bar_dlg "Scalar Bar Properties dialog box" local \ref scalar_bar_dlg "Scalar Bar Properties dialog box" available
available from the context menu of a mesh. from the context menu of a mesh.
- <b>Font</b> - in this menu you can set type, face and color for - <b>Font</b> - in this menu you can set type, face and color of
the font of <b>Title</b> and <b>Labels</b>. the font of <b>Title</b> and <b>Labels</b>.
- <b>Colors & Labels</b> - in this menu you can set the <b>number of - <b>Colors & Labels</b> - in this menu you can set the <b>number of
colors</b> and the <b>number of labels</b> in use. colors</b> and the <b>number of labels</b> in use.
- <b>Orientation</b> - here you can choose between vertical and - <b>Orientation</b> - here you can choose between vertical and
horizontal orientation of the <b>Scalar Bar</b> horizontal orientation of the <b>Scalar Bar</b>.
- <b>Origin & Size Vertical & Horizontal</b> - allows to define - <b>Origin & Size Vertical & Horizontal</b> - allows to define
placement (<b>X</b> and <b>Y</b>) and lookout (<b>Width</b> and placement (<b>X</b> and <b>Y</b>) and lookout (<b>Width</b> and
<b>Height</b>) of Scalar Bars. <b>Height</b>) of Scalar Bars.
- <b>X</b>: abscissa of the point of origin (from the left - <b>X</b> - abscissa of the point of origin (from the left side).
side) - <b>Y</b> - ordinate of the origin of the bar (from the bottom).
- <b>Y</b>: ordinate of the origin of the bar (from the bottom)
- <b>Distribution</b> in this menu you can Show/Hide distribution - <b>Distribution</b> in this menu you can Show/Hide distribution
histogram of the values of the <b>Scalar Bar</b> and specify the histogram of the values of the <b>Scalar Bar</b> and specify the
<b>Coloring Type</b> of the histogram: <b>Coloring Type</b> of the histogram:
- <b>Multicolor</b> the histogram is colored as <b>Scalar Bar</b> - <b>Multicolor</b> - the histogram is colored as <b>Scalar Bar</b>.
- <b>Monocolor</b> the histogram is colored as selected with - <b>Monocolor</b> - the histogram is colored as selected with
<b>Distribution color</b> selector <b>Distribution color</b> selector.
*/ */

View File

@ -1,8 +1,8 @@
/*! /*!
\page prism_3d_algo_page 3D extrusion meshing algorithm \page prism_3d_algo_page Extrusion 3D meshing algorithm
3D extrusion algorithm can be used for meshing prisms, i.e. 3D shapes Extrusion 3D algorithm can be used for meshing prisms, i.e. 3D shapes
defined by two opposing faces having the same number of vertices and defined by two opposing faces having the same number of vertices and
edges. These two faces should be connected by quadrangle "side" faces. edges. These two faces should be connected by quadrangle "side" faces.
@ -28,7 +28,7 @@ This picture shows four neighboring prism stacks, each comprising two prisms.
The shown sub-mesh is used by the algorithm to mesh The shown sub-mesh is used by the algorithm to mesh
all eight prisms in the stacks. all eight prisms in the stacks.
To use <em>3D extrusion</em> algorithm you need to assign algorithms To use <em>Extrusion 3D</em> algorithm you need to assign algorithms
and hypotheses of lower dimensions as follows. and hypotheses of lower dimensions as follows.
(A sample picture below shows algorithms and hypotheses used to (A sample picture below shows algorithms and hypotheses used to
mesh a cylinder with prismatic volumes). mesh a cylinder with prismatic volumes).
@ -41,7 +41,7 @@ The \b Global algorithms and hypotheses to be chosen at
<li> 1D algorithm and hypothesis that will be applied for meshing <li> 1D algorithm and hypothesis that will be applied for meshing
(logically) vertical edges of the prism (which connect the top and the (logically) vertical edges of the prism (which connect the top and the
base faces of the prism). In the sample picture above these are base faces of the prism). In the sample picture above these are
"Regular_1D" algorithm and "Nb. Segments" hypothesis named "Vertical "Regular_1D" algorithm and "Number of Segments" hypothesis named "Vertical
Nb. Segments".</li> Nb. Segments".</li>
</ul> </ul>
@ -66,21 +66,21 @@ The \b Local algorithms and hypotheses to be chosen at
Scale Factor=3 is assigned to the highlighted edge. Scale Factor=3 is assigned to the highlighted edge.
</li></ul> </li></ul>
If <em>3D extrusion</em> algorithm is assigned to a sub-mesh in a mesh If <em>Extrusion 3D</em> algorithm is assigned to a sub-mesh in a mesh
with multiple sub-meshes, the described above approach may not work as with multiple sub-meshes, the described above approach may not work as
expected. For example the bottom face may be meshed by other algorithm expected. For example the bottom face may be meshed by other algorithm
before <em>3D extrusion</em> have a chance to project a mesh from the before <em>Extrusion 3D</em> have a chance to project a mesh from the
base face. This thing can happen with vertical edges as well. All base face. This thing can happen with vertical edges as well. All
these can lead to either a meshing failure or to an incorrect meshing. these can lead to either a meshing failure or to an incorrect meshing.
In such a case, it's necessary to explicitly define algorithms In such a case, it's necessary to explicitly define algorithms
that <em>3D extrusion</em> implicitly applies in a simple case: that <em>Extrusion 3D</em> implicitly applies in a simple case:
- assign \ref projection_1D2D algorithm to the top face and - assign \ref projection_1D2D algorithm to the top face and
- assign a 1D algorithm to a group of all vertical edges. - assign a 1D algorithm to a group of all vertical edges.
\image html image157.gif "Prism with 3D extrusion meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned." \image html image157.gif "Prism with Extrusion 3D meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned."
\sa a sample TUI Script of \sa a sample TUI Script of
\ref tui_prism_3d_algo "Use 3D extrusion meshing algorithm". \ref tui_prism_3d_algo "Use Extrusion 3D meshing algorithm".
*/ */

View File

@ -1,8 +1,8 @@
/*! /*!
\page quad_ijk_algo_page Quadrangle (Mapping) meshing algorithm \page quad_ijk_algo_page Quadrangle: Mapping meshing algorithm
<b>Quadrangle (Mapping)</b> meshing algorithm is intended for creating <b>Quadrangle: Mapping</b> meshing algorithm is intended for creating
all-quadrangle and quad-dominant meshes on faces without holes and all-quadrangle and quad-dominant meshes on faces without holes and
bound by at least three edges. bound by at least three edges.

View File

@ -10,7 +10,9 @@ shell. The meshes of the shells can consist both of triangles and
quadrangles. quadrangles.
The Radial Prism algorithm would fill the space between the two shells The Radial Prism algorithm would fill the space between the two shells
with meshes. with prisms.
\image html radial_prism_mesh.png "Cut-view of a hollow sphere meshed by Radial Prism algorithm"
This algorithm also needs the information concerning the number and This algorithm also needs the information concerning the number and
distribution of mesh layers between the inner and the outer shapes. distribution of mesh layers between the inner and the outer shapes.
@ -21,4 +23,4 @@ Distribution of layers can be set with any of 1D Hypotheses.
\image html distribution_of_layers.png \image html distribution_of_layers.png
*/ */

View File

@ -1,6 +1,6 @@
/*! /*!
\page radial_quadrangle_1D2D_algo_page Radial Quadrangle 1D2D \page radial_quadrangle_1D2D_algo_page Radial Quadrangle 1D-2D
\n This algorithm applies to the meshing of 2D shapes under the \n This algorithm applies to the meshing of 2D shapes under the
following conditions: the face must be a full ellipse or a part of ellipse following conditions: the face must be a full ellipse or a part of ellipse
@ -21,8 +21,9 @@ end lying on the elliptic curve.
If no own hypothesis of the algorithm is assigned, any local or global If no own hypothesis of the algorithm is assigned, any local or global
hypothesis is used by the algorithm to discretize edges. hypothesis is used by the algorithm to discretize edges.
If no 1D hypothesis is assigned to an edge, "Default Number of If no 1D hypothesis is assigned to an edge,
Segments" preferences parameter is used to discretize the edge. \ref nb_segments_pref "Default Number of Segments" preferences
parameter is used to discretize the edge.
\image html hypo_radquad_dlg.png \image html hypo_radquad_dlg.png

View File

@ -8,31 +8,31 @@ This page provides example codes of \ref tui_defining_meshing_algos
<li>Wire discretisation 1D algorithm <li>Wire discretisation 1D algorithm
<ul> <ul>
<li>\ref tui_1d_adaptive "Adaptive 1D" hypothesis</li> <li>\ref tui_1d_adaptive "Adaptive 1D" hypothesis</li>
<li>\ref tui_1d_arithmetic "Arithmetic 1D" hypothesis</li> <li>\ref tui_1d_arithmetic "Arithmetic Progression" hypothesis</li>
<li>\ref tui_1d_arithmetic "Geometric Progression" hypothesis</li> <li>\ref tui_1d_arithmetic "Geometric Progression" hypothesis</li>
<li>\ref tui_deflection_1d "Deflection 1D and Number of Segments" hypotheses</li> <li>\ref tui_deflection_1d "Deflection and Number of Segments" hypotheses</li>
<li>\ref tui_start_and_end_length "Start and End Length" hypotheses</li> <li>\ref tui_start_and_end_length "Start and End Length" hypotheses</li>
<li>\ref tui_average_length "Local Length"</li> <li>\ref tui_average_length "Local Length"</li>
<li>\ref tui_propagation "Propagation" additional hypothesis </li> <li>\ref tui_propagation "Propagation" additional hypothesis </li>
<li>\ref tui_fixed_points "Fixed Points 1D" hypothesis</li> <li>\ref tui_fixed_points "Fixed Points 1D" hypothesis</li>
</ul> </ul>
</li> </li>
<li>Triangle (Mefisto) 2D algorithm <li>Triangle: Mefisto 2D algorithm
<ul> <ul>
<li>\ref tui_max_element_area "Max Element Area" hypothesis </li> <li>\ref tui_max_element_area "Max Element Area" hypothesis </li>
<li>\ref tui_length_from_edges "Length from Edges" <li>\ref tui_length_from_edges "Length from Edges"
hypothesis </li> hypothesis </li>
</ul> </ul>
</li> </li>
<li>Tetrahedron (Netgen) 3D algorithm <li>NETGEN 3D algorithm
<ul> <ul>
<li> \ref tui_max_element_volume "Max. Element Volume"hypothesis </li> <li> \ref tui_max_element_volume "Max. Element Volume"hypothesis </li>
<li> \ref tui_viscous_layers "Viscous layers"</li> <li> \ref tui_viscous_layers "Viscous layers"</li>
</ul> </ul>
</li> </li>
<li>\ref tui_projection "Projection Algorithms"</li> <li>\ref tui_projection "Projection Algorithms"</li>
<li>\ref tui_radial_quadrangle "Radial Quadrangle 1D2D" algorithm</li> <li>\ref tui_radial_quadrangle "Radial Quadrangle 1D-2D" algorithm</li>
<li>Quadrangle (Mapping) 2D algorithm <li>Quadrangle: Mapping 2D algorithm
<ul> <ul>
<li> \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis </li> <li> \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis </li>
</ul> </ul>
@ -45,7 +45,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
<br> <br>
\anchor tui_1d_arithmetic \anchor tui_1d_arithmetic
<h3>Arithmetic 1D and Geometric Progression</h3> <h3>Arithmetic Progression and Geometric Progression</h3>
\tui_script{defining_hypotheses_ex01.py} \tui_script{defining_hypotheses_ex01.py}
<br> <br>
@ -55,7 +55,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
<br> <br>
\anchor tui_deflection_1d \anchor tui_deflection_1d
<h3>Deflection 1D and Number of Segments</h3> <h3>Deflection and Number of Segments</h3>
\tui_script{defining_hypotheses_ex02.py} \tui_script{defining_hypotheses_ex02.py}
<br> <br>
@ -113,7 +113,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
\tui_script{defining_hypotheses_ex12.py} \tui_script{defining_hypotheses_ex12.py}
\anchor tui_radial_quadrangle \anchor tui_radial_quadrangle
<h2> Radial Quadrangle 1D2D example </h2> <h2> Radial Quadrangle 1D-2D example </h2>
\tui_script{defining_hypotheses_ex13.py} \tui_script{defining_hypotheses_ex13.py}
\anchor tui_quadrangle_parameters \anchor tui_quadrangle_parameters

View File

@ -1,6 +1,6 @@
/*! /*!
\page tui_prism_3d_algo Use 3D extrusion meshing algorithm \page tui_prism_3d_algo Use Extrusion 3D meshing algorithm
\tui_script{prism_3d_algo.py} \tui_script{prism_3d_algo.py}
The result geometry and mesh is shown below The result geometry and mesh is shown below

View File

@ -2,14 +2,23 @@
\page viewing_meshes_overview_page Viewing meshes \page viewing_meshes_overview_page Viewing meshes
\n After definition of algorithms and hypotheses a new mesh is listed By default a just \ref compute_anchor "computed" mesh will be
in the Object Browser. Right-click on it and select \b Compute - the automatically displayed in the <b>VTK 3D Viewer</b>. (You can switch
mesh will be automatically displayed in the <b>VTK 3D Viewer</b>. off \ref automatic_update_pref "Automatic Update" preference parameter
Alternatively click <b>Display only</b> to hide all other objects at to prevent this.)
the same time. Click <b>Display only</b> to hide all other objects at the same time.
<b>VTK 3D Viewer</b> is described in detail in the documentation on <b>GUI module</b>. <b>VTK 3D Viewer</b> is described in detail in the documentation on <b>GUI module</b>.
\n After the mesh has appeared in the Viewer, you can select it with
Use the following \ref mesh_preferences_page "preference parameters"
to adjust how the mesh is displayed by default:
- \ref automatic_update_pref "Automatic Update"
- \ref display_mode_pref "Default display mode"
- \ref quadratic_2d_mode_pref "Representation of the 2D quadratic elements"
- All parameters of \ref mesh_tab_preferences "Mesh" tab page of the
Preferences dialog.
After the mesh has appeared in the Viewer, you can select it with
left mouse click and get information about it, change its left mouse click and get information about it, change its
presentation parameters and access to other useful options by presentation parameters and access to other useful options by
right-clicking on the selected mesh. right-clicking on the selected mesh.
@ -20,21 +29,21 @@ right-clicking on the selected mesh.
<li><b>Rename</b> - allows to rename the object in the Object browser.</li> <li><b>Rename</b> - allows to rename the object in the Object browser.</li>
<li><b>Hide all</b> - allows to hide all objects in the viewer.</li> <li><b>Hide all</b> - allows to hide all objects in the viewer.</li>
<li><b>Update</b> - refreshes the presentation of your mesh in the <li><b>Update</b> - refreshes the presentation of your mesh in the
Object Browser, applying all recent changes. </li> Object Browser, applying all recent changes. </li>
<li>\subpage mesh_infos_page "Mesh Information" - provides <li>\subpage mesh_infos_page "Mesh Information" - provides
information about the mesh.</li> information about the mesh.</li>
<li>\subpage find_element_by_point_page "Find Element by Point" - <li>\subpage find_element_by_point_page "Find Element by Point" -
allows to find all mesh elements, to which belongs a point with the allows to find all mesh elements, to which belongs a point with the
given coordinates.</li> given coordinates.</li>
<li><b>Auto Color</b> - switch on / off auto-assigning colors for the <li><b>Auto Color</b> - switch on / off auto-assigning colors for the
groups. If switched on, a default color of a new group in groups. If switched on, a default color of a new group in
\ref creating_groups_page "Create Group" dialog is chosen \ref creating_groups_page "Create Group" dialog is chosen
randomly. </li> randomly. </li>
<li>\subpage numbering_page "Numbering" - allows to display the ID <li>\subpage numbering_page "Numbering" - allows to display the ID
numbers of all meshing elements or nodes composing your mesh in the numbers of all meshing elements or nodes composing your mesh in the
viewer.</li> viewer.</li>
<li>\subpage display_mode_page "Display Mode" - allows to select between <li>\subpage display_mode_page "Display Mode" - allows to select between
Wireframe, Shading and Nodes presentation.</li> Wireframe, Shading and Nodes presentation.</li>
<li>\subpage display_entity_page "Display Entity" - allows to display <li>\subpage display_entity_page "Display Entity" - allows to display
entities by types (Faces, Edges, Volumes etc.).</li> entities by types (Faces, Edges, Volumes etc.).</li>
\anchor quadratic_2d_mode \anchor quadratic_2d_mode
@ -44,24 +53,29 @@ Wireframe, Shading and Nodes presentation.</li>
Arc representation applies to 1D and 2D elements only. Arc representation applies to 1D and 2D elements only.
</li> </li>
<li><b>Orientation of faces</b> - shows vectors of orientation of <li><b>Orientation of faces</b> - shows vectors of orientation of
faces of the selected mesh. The orientation vector is shown for each 2D mesh element faces of the selected mesh. The orientation vector is shown for each
and for each free face of a 3D mesh element. the vector direction is calculated by 2D mesh element and for each free facet of a 3D mesh element. The
the first three nodes of the face produced by vectors n1-n2 and n1-n3.</li> vector direction is calculated by the first three nodes of the face
<li>\subpage colors_size_page "Properties" - allows to define several properties, including color of elements, shrink size, ....</li> produced by vectors n1-n2 and n1-n3.</li>
<li>\subpage colors_size_page "Properties" - allows to define several
visual properties, including color of elements, shrink size, ...</li>
<li>\subpage transparency_page "Transparency" - allows to change the <li>\subpage transparency_page "Transparency" - allows to change the
transparency of mesh elements.</li> transparency of mesh elements.</li>
<li>\ref quality_page "Controls" - graphically <li>\ref quality_page "Controls" - graphically presents various
presents various information about meshes.</li> information about the mesh.</li>
<li><b>Hide</b> - allows to hide the selected mesh from the viewer.</li> <li><b>Hide</b> - allows to hide the selected mesh from the viewer.</li>
<li><b>Show Only</b> -allows to display only the selected mesh, hiding all other from the viewer.</li> <li><b>Show Only</b> - allows to display only the selected mesh,
<li>\subpage clipping_page "Clipping" - allows to create cross-sections of the selected objects.</li> hiding all others from the viewer.</li>
<li><b>Dump view</b> - exports an object from the viewer in bmp, png, jpg or jpeg image format.</li> <li>\subpage clipping_page "Clipping" - allows to create
cross-sections of the displayed objects.</li>
<li><b>Dump view</b> - exports an object from the viewer in bmp, png
or jpeg image format.</li>
<li><b>Change background</b> - allows to redefine the background <li><b>Change background</b> - allows to redefine the background
color. By default it is black.</li> color. By default it is black.</li>
<li><b>View Operations</b> checkbox - allows to show/hide the <li><b>View Operations</b> - allows to show/hide the
visualization toolbar in the viewer window.</li> visualization toolbar in the Viewer window.</li>
<li><b>Recording Operations</b> - allows to show/hide the recording <li><b>Recording Operations</b> - allows to show/hide the recording
toolbar in the viewer window.</li> toolbar in the Viewer window.</li>
</ul> </ul>
*/ */

View File

@ -28,11 +28,11 @@
<meshers> <meshers>
<meshers-group name="Standard Meshers" <meshers-group name ="Standard Meshers"
resources="StdMeshers" resources ="StdMeshers"
idl-module="StdMeshers" idl-module="StdMeshers"
server-lib="StdMeshersEngine" server-lib="StdMeshersEngine"
gui-lib="StdMeshersGUI"> gui-lib ="StdMeshersGUI">
<hypotheses> <hypotheses>
<hypothesis type ="SegmentLengthAroundVertex" <hypothesis type ="SegmentLengthAroundVertex"
@ -43,46 +43,64 @@
<hypothesis type ="LocalLength" <hypothesis type ="LocalLength"
label-id ="Local Length" label-id ="Local Length"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="0"
priority ="20"
dim ="1"/> dim ="1"/>
<hypothesis type ="MaxLength" <hypothesis type ="MaxLength"
label-id ="Max Size" label-id ="Max Size"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="2"
priority ="50"
dim ="1"/> dim ="1"/>
<hypothesis type ="Arithmetic1D" <hypothesis type ="Arithmetic1D"
label-id ="Arithmetic 1D" label-id ="Arithmetic Progression"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="1"
priority ="10"
dim ="1"/> dim ="1"/>
<hypothesis type ="GeometricProgression" <hypothesis type ="GeometricProgression"
label-id ="Geometric Progression" label-id ="Geometric Progression"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="1"
priority ="20"
dim ="1"/> dim ="1"/>
<hypothesis type ="FixedPoints1D" <hypothesis type ="FixedPoints1D"
label-id ="Fixed Points 1D" label-id ="Fixed Points"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="2"
priority ="10"
dim ="1"/> dim ="1"/>
<hypothesis type ="StartEndLength" <hypothesis type ="StartEndLength"
label-id ="Start and End Length" label-id ="Start and End Length"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="1"
priority ="30"
dim ="1"/> dim ="1"/>
<hypothesis type ="NumberOfSegments" <hypothesis type ="NumberOfSegments"
label-id ="Nb. Segments" label-id ="Number of Segments"
icon-id ="mesh_hypo_segment.png" icon-id ="mesh_hypo_segment.png"
group-id ="0"
priority ="10"
dim ="1"/> dim ="1"/>
<hypothesis type ="Deflection1D" <hypothesis type ="Deflection1D"
label-id ="Deflection 1D" label-id ="Deflection"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="2"
priority ="20"
dim ="1"/> dim ="1"/>
<hypothesis type ="Adaptive1D" <hypothesis type ="Adaptive1D"
label-id ="Adaptive" label-id ="Adaptive"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="2"
priority ="30"
dim ="1"/> dim ="1"/>
<hypothesis type ="Propagation" <hypothesis type ="Propagation"
@ -102,6 +120,8 @@
<hypothesis type ="AutomaticLength" <hypothesis type ="AutomaticLength"
label-id ="Automatic Length" label-id ="Automatic Length"
icon-id ="mesh_hypo_length.png" icon-id ="mesh_hypo_length.png"
group-id ="2"
priority ="40"
dim ="1"/> dim ="1"/>
<hypothesis type ="LengthFromEdges" <hypothesis type ="LengthFromEdges"
@ -222,6 +242,8 @@
<algorithm type ="Regular_1D" <algorithm type ="Regular_1D"
label-id ="Wire Discretisation" label-id ="Wire Discretisation"
icon-id ="mesh_algo_regular.png" icon-id ="mesh_algo_regular.png"
group-id ="0"
priority ="10"
hypos ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,GeometricProgression,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D" hypos ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,GeometricProgression,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
opt-hypos="Propagation,PropagOfDistribution,QuadraticMesh" opt-hypos="Propagation,PropagOfDistribution,QuadraticMesh"
input ="VERTEX" input ="VERTEX"
@ -248,6 +270,8 @@
<algorithm type ="CompositeSegment_1D" <algorithm type ="CompositeSegment_1D"
label-id ="Composite Side Discretisation" label-id ="Composite Side Discretisation"
icon-id ="mesh_algo_regular.png" icon-id ="mesh_algo_regular.png"
group-id ="0"
priority ="20"
hypos ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,GeometricProgression,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D" hypos ="Adaptive1D,LocalLength,MaxLength,Arithmetic1D,GeometricProgression,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
opt-hypos="Propagation,PropagOfDistribution,QuadraticMesh" opt-hypos="Propagation,PropagOfDistribution,QuadraticMesh"
input ="VERTEX" input ="VERTEX"
@ -281,8 +305,10 @@
</algorithm> </algorithm>
<algorithm type ="@MEFISTO2D_NAME@" <algorithm type ="@MEFISTO2D_NAME@"
label-id ="Triangle (Mefisto)" label-id ="Triangle: Mefisto"
icon-id ="mesh_algo_mefisto.png" icon-id ="mesh_algo_mefisto.png"
group-id ="1"
priority ="40"
hypos ="LengthFromEdges,MaxElementArea" hypos ="LengthFromEdges,MaxElementArea"
opt-hypos ="ViscousLayers2D" opt-hypos ="ViscousLayers2D"
input ="EDGE" input ="EDGE"
@ -297,8 +323,10 @@
</algorithm> </algorithm>
<algorithm type ="Quadrangle_2D" <algorithm type ="Quadrangle_2D"
label-id ="Quadrangle (Mapping)" label-id ="Quadrangle: Mapping"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
group-id ="0"
priority ="10"
hypos ="QuadrangleParams" hypos ="QuadrangleParams"
opt-hypos="ViscousLayers2D" opt-hypos="ViscousLayers2D"
input ="EDGE" input ="EDGE"
@ -312,8 +340,10 @@
</algorithm> </algorithm>
<algorithm type ="QuadFromMedialAxis_1D2D" <algorithm type ="QuadFromMedialAxis_1D2D"
label-id ="Quadrangle (Medial Axis Projection)" label-id ="Quadrangle: Medial Axis Projection"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
group-id ="0"
priority ="20"
hypos ="NumberOfLayers2D, LayerDistribution2D" hypos ="NumberOfLayers2D, LayerDistribution2D"
opt-hypos="ViscousLayers2D" opt-hypos="ViscousLayers2D"
input ="EDGE" input ="EDGE"
@ -329,6 +359,8 @@
<algorithm type ="PolygonPerFace_2D" <algorithm type ="PolygonPerFace_2D"
label-id ="Polygon per Face" label-id ="Polygon per Face"
icon-id ="mesh_algo_polygon.png" icon-id ="mesh_algo_polygon.png"
group-id ="2"
priority ="40"
opt-hypos="ViscousLayers2D" opt-hypos="ViscousLayers2D"
input ="EDGE" input ="EDGE"
output ="POLYGON,QUAD,TRIA" output ="POLYGON,QUAD,TRIA"
@ -342,6 +374,8 @@
<algorithm type ="Hexa_3D" <algorithm type ="Hexa_3D"
label-id ="Hexahedron (i,j,k)" label-id ="Hexahedron (i,j,k)"
icon-id ="mesh_algo_hexa.png" icon-id ="mesh_algo_hexa.png"
group-id ="0"
priority ="10"
input ="QUAD" input ="QUAD"
output ="HEXA,PENTA" output ="HEXA,PENTA"
need-geom="false" need-geom="false"
@ -356,6 +390,8 @@
<algorithm type ="Projection_1D" <algorithm type ="Projection_1D"
label-id="Projection 1D" label-id="Projection 1D"
icon-id ="mesh_algo_regular.png" icon-id ="mesh_algo_regular.png"
group-id="1"
priority="10"
hypos ="ProjectionSource1D" hypos ="ProjectionSource1D"
output ="EDGE" output ="EDGE"
need-hyp="true" need-hyp="true"
@ -369,6 +405,8 @@
<algorithm type ="Projection_2D" <algorithm type ="Projection_2D"
label-id="Projection 2D" label-id="Projection 2D"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
group-id="2"
priority="30"
input ="EDGE" input ="EDGE"
hypos ="ProjectionSource2D" hypos ="ProjectionSource2D"
output ="QUAD,TRIA" output ="QUAD,TRIA"
@ -383,6 +421,8 @@
<algorithm type ="Projection_1D2D" <algorithm type ="Projection_1D2D"
label-id="Projection 1D-2D" label-id="Projection 1D-2D"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
group-id="2"
priority="20"
hypos ="ProjectionSource2D" hypos ="ProjectionSource2D"
output ="QUAD,TRIA" output ="QUAD,TRIA"
need-hyp="true" need-hyp="true"
@ -396,6 +436,8 @@
<algorithm type ="Projection_3D" <algorithm type ="Projection_3D"
label-id="Projection 3D" label-id="Projection 3D"
icon-id ="mesh_algo_hexa.png" icon-id ="mesh_algo_hexa.png"
group-id="2"
priority="20"
hypos ="ProjectionSource3D" hypos ="ProjectionSource3D"
input ="QUAD,TRIA" input ="QUAD,TRIA"
need-hyp="true" need-hyp="true"
@ -409,6 +451,8 @@
<algorithm type ="Import_1D" <algorithm type ="Import_1D"
label-id="Import 1D Elements from Another Mesh" label-id="Import 1D Elements from Another Mesh"
icon-id ="mesh_algo_regular.png" icon-id ="mesh_algo_regular.png"
group-id="1"
priority="20"
hypos ="ImportSource1D" hypos ="ImportSource1D"
output ="EDGE" output ="EDGE"
need-hyp="true" need-hyp="true"
@ -422,6 +466,8 @@
<algorithm type ="Import_1D2D" <algorithm type ="Import_1D2D"
label-id ="Import 1D-2D Elements from Another Mesh" label-id ="Import 1D-2D Elements from Another Mesh"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
group-id ="2"
priority ="50"
hypos ="ImportSource2D" hypos ="ImportSource2D"
output ="QUAD,TRIA" output ="QUAD,TRIA"
support-submeshes="false" support-submeshes="false"
@ -434,8 +480,10 @@
</algorithm> </algorithm>
<algorithm type ="Prism_3D" <algorithm type ="Prism_3D"
label-id="3D Extrusion" label-id="Extrusion 3D"
icon-id ="mesh_algo_hexa.png" icon-id ="mesh_algo_hexa.png"
group-id="2"
priority="10"
input ="QUAD,TRIA" input ="QUAD,TRIA"
output ="HEXA,PENTA,OCTA,POLYHEDRON" output ="HEXA,PENTA,OCTA,POLYHEDRON"
dim ="3"> dim ="3">
@ -445,8 +493,10 @@
</algorithm> </algorithm>
<algorithm type ="RadialPrism_3D" <algorithm type ="RadialPrism_3D"
label-id="Radial Prism 3D" label-id="Radial Prism"
icon-id ="mesh_algo_hexa.png" icon-id ="mesh_algo_hexa.png"
group-id="2"
priority="30"
hypos ="NumberOfLayers, LayerDistribution" hypos ="NumberOfLayers, LayerDistribution"
input ="QUAD,TRIA" input ="QUAD,TRIA"
output ="HEXA,PENTA,OCTA,POLYHEDRON" output ="HEXA,PENTA,OCTA,POLYHEDRON"
@ -461,6 +511,8 @@
<algorithm type ="UseExisting_1D" <algorithm type ="UseExisting_1D"
label-id="Use Edges to be Created Manually" label-id="Use Edges to be Created Manually"
icon-id ="mesh_algo_regular.png" icon-id ="mesh_algo_regular.png"
group-id="1"
priority="30"
input ="VERTEX" input ="VERTEX"
output ="EDGE" output ="EDGE"
dim ="1"> dim ="1">
@ -472,6 +524,8 @@
<algorithm type ="UseExisting_2D" <algorithm type ="UseExisting_2D"
label-id="Use Faces to be Created Manually" label-id="Use Faces to be Created Manually"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
group-id="2"
priority="60"
input ="EDGE" input ="EDGE"
output ="QUAD,TRIA" output ="QUAD,TRIA"
dim ="2"> dim ="2">
@ -481,8 +535,10 @@
</algorithm> </algorithm>
<algorithm type ="RadialQuadrangle_1D2D" <algorithm type ="RadialQuadrangle_1D2D"
label-id="Radial Quadrangle 1D2D" label-id="Radial Quadrangle 1D-2D"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
group-id="2"
priority="10"
hypos ="NumberOfLayers2D, LayerDistribution2D" hypos ="NumberOfLayers2D, LayerDistribution2D"
input ="EDGE" input ="EDGE"
output ="QUAD" output ="QUAD"
@ -496,6 +552,8 @@
<algorithm type ="Cartesian_3D" <algorithm type ="Cartesian_3D"
label-id ="Body Fitting" label-id ="Body Fitting"
icon-id ="mesh_algo_hexa.png" icon-id ="mesh_algo_hexa.png"
group-id ="0"
priority ="20"
hypos ="CartesianParameters3D" hypos ="CartesianParameters3D"
support-submeshes="false" support-submeshes="false"
output ="HEXA" output ="HEXA"

View File

@ -162,6 +162,17 @@ SMDS_Mesh::SMDS_Mesh():
points->Delete(); points->Delete();
myGrid->BuildLinks(); myGrid->BuildLinks();
this->Modified(); this->Modified();
// initialize static maps in SMDS_MeshCell, to be thread-safe
if ( myMeshId == 0 )
{
SMDS_MeshCell::toVtkType( SMDSEntity_Node );
SMDS_MeshCell::toVtkOrder( SMDSEntity_Node );
SMDS_MeshCell::reverseSmdsOrder( SMDSEntity_Node );
SMDS_MeshCell::interlacedSmdsOrder( SMDSEntity_Node );
SMDS_MeshCell::toSmdsType( VTK_VERTEX );
SMDS_MeshCell::fromVtkOrder( SMDSEntity_Node );
}
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -33,7 +33,7 @@ public:
virtual ~SMDS_MeshCell(); virtual ~SMDS_MeshCell();
virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)= 0; virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes)= 0;
virtual bool vtkOrder(const SMDS_MeshNode* nodes[], const int nbNodes) {return true; } virtual bool vtkOrder(const SMDS_MeshNode* nodes[], const int nbNodes) { return true; }
static VTKCellType toVtkType (SMDSAbs_EntityType vtkType); static VTKCellType toVtkType (SMDSAbs_EntityType vtkType);
static SMDSAbs_EntityType toSmdsType(VTKCellType vtkType); static SMDSAbs_EntityType toSmdsType(VTKCellType vtkType);

View File

@ -1374,7 +1374,7 @@ const TopoDS_Shape& SMESHDS_Mesh::IndexToShape(int ShapeIndex) const
if ( ShapeIndex > 0 ) if ( ShapeIndex > 0 )
return myIndexToShape.FindKey(ShapeIndex); return myIndexToShape.FindKey(ShapeIndex);
} }
catch ( Standard_OutOfRange ) catch ( ... )
{ {
} }
static TopoDS_Shape nullShape; static TopoDS_Shape nullShape;

View File

@ -5001,19 +5001,6 @@ void SMESHGUI::createPreferences()
setPreferenceProperty( lim, "special", tr( "PREF_UPDATE_LIMIT_NOLIMIT" ) ); setPreferenceProperty( lim, "special", tr( "PREF_UPDATE_LIMIT_NOLIMIT" ) );
addPreference( tr( "PREF_INCREMENTAL_LIMIT" ), autoUpdate, LightApp_Preferences::Bool, "SMESH", "incremental_limit" ); addPreference( tr( "PREF_INCREMENTAL_LIMIT" ), autoUpdate, LightApp_Preferences::Bool, "SMESH", "incremental_limit" );
int qaGroup = addPreference( tr( "PREF_GROUP_QUALITY" ), genTab );
setPreferenceProperty( qaGroup, "columns", 2 );
addPreference( tr( "PREF_DISPLAY_ENTITY" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "display_entity" );
addPreference( tr( "PREF_PRECISION_USE" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "use_precision" );
int prec = addPreference( tr( "PREF_PRECISION_VALUE" ), qaGroup, LightApp_Preferences::IntSpin, "SMESH", "controls_precision" );
setPreferenceProperty( prec, "min", 0 );
setPreferenceProperty( prec, "max", 100 );
int doubleNodesTol = addPreference( tr( "PREF_EQUAL_NODES_TOL" ), qaGroup, LightApp_Preferences::DblSpin, "SMESH", "equal_nodes_tolerance" );
setPreferenceProperty( doubleNodesTol, "precision", 10 );
setPreferenceProperty( doubleNodesTol, "min", 0.0000000001 );
setPreferenceProperty( doubleNodesTol, "max", 1000000.0 );
setPreferenceProperty( doubleNodesTol, "step", 0.0000001 );
int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE_GROUP" ), genTab ); int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE_GROUP" ), genTab );
setPreferenceProperty( dispgroup, "columns", 2 ); setPreferenceProperty( dispgroup, "columns", 2 );
int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" ); int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" );
@ -5047,6 +5034,18 @@ void SMESHGUI::createPreferences()
setPreferenceProperty( maxAngle, "min", 1 ); setPreferenceProperty( maxAngle, "min", 1 );
setPreferenceProperty( maxAngle, "max", 90 ); setPreferenceProperty( maxAngle, "max", 90 );
int qaGroup = addPreference( tr( "PREF_GROUP_QUALITY" ), genTab );
setPreferenceProperty( qaGroup, "columns", 2 );
addPreference( tr( "PREF_DISPLAY_ENTITY" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "display_entity" );
addPreference( tr( "PREF_PRECISION_USE" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "use_precision" );
int prec = addPreference( tr( "PREF_PRECISION_VALUE" ), qaGroup, LightApp_Preferences::IntSpin, "SMESH", "controls_precision" );
setPreferenceProperty( prec, "min", 0 );
setPreferenceProperty( prec, "max", 100 );
int doubleNodesTol = addPreference( tr( "PREF_EQUAL_NODES_TOL" ), qaGroup, LightApp_Preferences::DblSpin, "SMESH", "equal_nodes_tolerance" );
setPreferenceProperty( doubleNodesTol, "precision", 10 );
setPreferenceProperty( doubleNodesTol, "min", 0.0000000001 );
setPreferenceProperty( doubleNodesTol, "max", 1000000.0 );
setPreferenceProperty( doubleNodesTol, "step", 0.0000001 );
int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab ); int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab );

View File

@ -749,6 +749,8 @@ HypothesisData::HypothesisData( const QString& theTypeName,
const QString& theLabel, const QString& theLabel,
const QString& theIconId, const QString& theIconId,
const QString& theContext, const QString& theContext,
const int theGroupID,
const int thePriority,
const QList<int>& theDim, const QList<int>& theDim,
const bool theIsAuxOrNeedHyp, const bool theIsAuxOrNeedHyp,
const QStringList& theBasicHypos, const QStringList& theBasicHypos,
@ -764,6 +766,8 @@ HypothesisData::HypothesisData( const QString& theTypeName,
Label( theLabel ), Label( theLabel ),
IconId( theIconId ), IconId( theIconId ),
Context( theContext ), Context( theContext ),
GroupID( theGroupID ),
Priority( thePriority ),
Dim( theDim ), Dim( theDim ),
IsAuxOrNeedHyp( theIsAuxOrNeedHyp ), IsAuxOrNeedHyp( theIsAuxOrNeedHyp ),
IsNeedGeometry( theIsNeedGeometry ), IsNeedGeometry( theIsNeedGeometry ),

View File

@ -173,7 +173,8 @@ struct HypothesisData
{ {
HypothesisData( const QString&, const QString&, const QString&, HypothesisData( const QString&, const QString&, const QString&,
const QString&, const QString&, const QString&, const QString&, const QString&, const QString&,
const QString&, const QList<int>&, const bool, const QString&, const int, const int,
const QList<int>&, const bool,
const QStringList&, const QStringList&, const QStringList&, const QStringList&,
const QStringList&, const QStringList&, const QStringList&, const QStringList&,
const bool=true, const bool supportSub=false ); const bool=true, const bool supportSub=false );
@ -185,11 +186,13 @@ struct HypothesisData
QString Label; //!< label QString Label; //!< label
QString IconId; //!< icon identifier QString IconId; //!< icon identifier
QString Context; //!< ["GLOBAL","LOCAL","ANY"(default)] QString Context; //!< ["GLOBAL","LOCAL","ANY"(default)]
int GroupID; //!< group ID (staring from zero)
int Priority; //!< integer, priority within the group
QList<int> Dim; //!< list of supported dimensions (see SMESH::Dimension enumeration) QList<int> Dim; //!< list of supported dimensions (see SMESH::Dimension enumeration)
bool IsAuxOrNeedHyp; //!< TRUE if given hypothesis is auxiliary one, FALSE otherwise bool IsAuxOrNeedHyp; //!< TRUE if given HYPOTHESIS is auxiliary one, FALSE otherwise
//!< TRUE if given algorithm can't work w/o hypotheses //!< TRUE if given ALGORITHM can't work w/o hypotheses
bool IsNeedGeometry; //!< TRUE if the algorithm works with shapes only, FALSE otherwise bool IsNeedGeometry; //!< TRUE if the algorithm works with shapes only, FALSE otherwise
bool IsSupportSubmeshes; //!< TRUE if the algo building all-dim elems supports submeshes bool IsSupportSubmeshes; //!< TRUE if the algorithm building all-dim elems supports sub-meshes
// for algorithm only: dependencies algo <-> algo and algo -> hypos // for algorithm only: dependencies algo <-> algo and algo -> hypos
QStringList BasicHypos; //!< list of basic hypotheses QStringList BasicHypos; //!< list of basic hypotheses

View File

@ -49,9 +49,7 @@
#include <string> #include <string>
// Qt includes // Qt includes
#include <QMap>
#include <QDir> #include <QDir>
//#include <QList>
// Other includes // Other includes
@ -180,7 +178,8 @@ namespace SMESH
void InitAvailableHypotheses() void InitAvailableHypotheses()
{ {
SUIT_OverrideCursor wc; SUIT_OverrideCursor wc;
if (myHypothesesMap.empty() && myAlgorithmsMap.empty()) { if ( myHypothesesMap.empty() && myAlgorithmsMap.empty() )
{
// Resource manager // Resource manager
SUIT_ResourceMgr* resMgr = SMESHGUI::resourceMgr(); SUIT_ResourceMgr* resMgr = SMESHGUI::resourceMgr();
if (!resMgr) return; if (!resMgr) return;
@ -369,6 +368,90 @@ namespace SMESH
return aHypData; return aHypData;
} }
//================================================================================
/*!
* \brief Return the HypothesisData holding a name of a group of hypotheses
* a given hypothesis belongs to
*/
//================================================================================
HypothesisData* GetGroupTitle( const HypothesisData* hyp, const bool isAlgo )
{
static std::vector< std::vector< HypothesisData > > theGroups;
if ( theGroups.empty() )
{
theGroups.resize(14); // 14: isAlgo * 10 + dim
QString dummyS("GROUP");
QList<int> dummyIL; dummyIL << 1;
QStringList dummySL;
HypothesisData group( dummyS,dummyS,dummyS,dummyS,dummyS,dummyS,dummyS,-1,-1,
dummyIL, 0, dummySL,dummySL,dummySL,dummySL );
// no group
int key = 0;
theGroups[ key ].push_back( group );
// 1D algo
key = 11;
// 0: Basic
group.Label = "GROUP:" + QObject::tr( "SMESH_1D_ALGO_GROUP_BASIC" );
theGroups[ key ].push_back( group );
// 1: Advanced
group.Label = "GROUP:" + QObject::tr( "SMESH_1D_ALGO_GROUP_ADVANCED" );
theGroups[ key ].push_back( group );
// 1D hypotheses
key = 01;
// 0: Basic
group.Label = "GROUP:" + QObject::tr( "SMESH_1D_HYP_GROUP_BASIC" );
theGroups[ key ].push_back( group );
// 1: Progression
group.Label = "GROUP:" + QObject::tr( "SMESH_1D_HYP_GROUP_PROGRESSION" );
theGroups[ key ].push_back( group );
// 2: Advanced
group.Label = "GROUP:" + QObject::tr( "SMESH_1D_HYP_GROUP_ADVANCED" );
theGroups[ key ].push_back( group );
// 2D algo
key = 12;
// 0: Regular
group.Label = "GROUP:" + QObject::tr( "SMESH_2D_ALGO_GROUP_REGULAR" );
theGroups[ key ].push_back( group );
// 1: Free
group.Label = "GROUP:" + QObject::tr( "SMESH_2D_ALGO_GROUP_FREE" );
theGroups[ key ].push_back( group );
// 2: Advanced
group.Label = "GROUP:" + QObject::tr( "SMESH_2D_ALGO_GROUP_ADVANCED" );
theGroups[ key ].push_back( group );
// 3D algo
key = 13;
// 0: Regular
group.Label = "GROUP:" + QObject::tr( "SMESH_3D_ALGO_GROUP_REGULAR" );
theGroups[ key ].push_back( group );
// 1: Free
group.Label = "GROUP:" + QObject::tr( "SMESH_3D_ALGO_GROUP_FREE" );
theGroups[ key ].push_back( group );
// 2: Advanced
group.Label = "GROUP:" + QObject::tr( "SMESH_3D_ALGO_GROUP_ADVANCED" );
theGroups[ key ].push_back( group );
}
size_t key = 0, groupID = 0;
if ( hyp && !hyp->Dim.isEmpty() )
{
key = hyp->Dim[0] + isAlgo * 10;
groupID = hyp->GroupID;
}
if ( key < theGroups.size() && !theGroups[ key ].empty() )
{
std::vector< HypothesisData > & group = theGroups[ key ];
return & ( groupID < group.size() ? group[ groupID ] : group.back() );
}
return & theGroups[ 0 ][ 0 ];
}
bool IsAvailableHypothesis(const HypothesisData* algoData, bool IsAvailableHypothesis(const HypothesisData* algoData,
const QString& hypType, const QString& hypType,
bool& isAuxiliary) bool& isAuxiliary)

View File

@ -78,6 +78,9 @@ namespace SMESH
SMESHGUI_EXPORT SMESHGUI_EXPORT
HypothesisData* GetHypothesisData( const QString& ); HypothesisData* GetHypothesisData( const QString& );
SMESHGUI_EXPORT
HypothesisData* GetGroupTitle( const HypothesisData* hyp, const bool isAlgo );
SMESHGUI_EXPORT SMESHGUI_EXPORT
bool IsAvailableHypothesis( const HypothesisData*, bool IsAvailableHypothesis( const HypothesisData*,
const QString&, const QString&,

View File

@ -30,6 +30,7 @@
// SALOME GUI includes // SALOME GUI includes
#include <SUIT_Session.h> #include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h> #include <SUIT_ResourceMgr.h>
#include <QtxMenu.h>
// Qt includes // Qt includes
#include <QComboBox> #include <QComboBox>
@ -163,19 +164,33 @@ SMESHGUI_MeshTab::~SMESHGUI_MeshTab()
* \param [in] txt - item text * \param [in] txt - item text
* \param [in] type - HypType * \param [in] type - HypType
* \param [in] index - index of item in a list of items * \param [in] index - index of item in a list of items
* \param [in] isGroup - is the item a group title
*/ */
//================================================================================ //================================================================================
void SMESHGUI_MeshTab::addItem( const QString& txt, const int type, const int index ) void SMESHGUI_MeshTab::addItem( const QString& txt,
const int type,
const int index,
const bool isGroup )
{ {
const char* prefix = " ";
if ( type <= AddHyp ) if ( type <= AddHyp )
{ {
myHypCombo[ type ]->addItem( txt, QVariant( index )); if ( isGroup )
myHypCombo[ type ]->setMaxVisibleItems( qMax( 10, myHypCombo[ type ]->count() ) ); {
int idx = myHypCombo[ type ]->count();
myHypCombo[ type ]->addItem( txt.mid( 6 ), QVariant( index ));
myHypCombo[ type ]->setItemData( idx, "separator", Qt::AccessibleDescriptionRole );
}
else
{
myHypCombo[ type ]->addItem( prefix + txt, QVariant( index ));
}
//myHypCombo[ type ]->setMaxVisibleItems( qMax( 10, myHypCombo[ type ]->count() ) );
} }
else else
{ {
QListWidgetItem* item = new QListWidgetItem( txt, myAddHypList ); QListWidgetItem* item = new QListWidgetItem( prefix + txt, myAddHypList );
item->setData( Qt::UserRole, QVariant( index )); item->setData( Qt::UserRole, QVariant( index ));
} }
} }
@ -222,7 +237,7 @@ void SMESHGUI_MeshTab::setAvailableHyps( const int theId, const QStringList& the
{ {
addItem( tr( "NONE"), Algo, 0 ); addItem( tr( "NONE"), Algo, 0 );
for ( int i = 0, nbHyp = theHyps.count(); i < nbHyp; ++i ) for ( int i = 0, nbHyp = theHyps.count(); i < nbHyp; ++i )
addItem( theHyps[i], Algo, i+1 ); addItem( theHyps[i], Algo, i+1, theHyps[i].startsWith( "GROUP:" ));
myHypCombo[ Algo ]->setCurrentIndex( 0 ); myHypCombo[ Algo ]->setCurrentIndex( 0 );
} }
} }
@ -400,15 +415,25 @@ void SMESHGUI_MeshTab::onCreateHyp()
{ {
bool isMainHyp = ( sender() == myCreateHypBtn[ MainHyp ]); bool isMainHyp = ( sender() == myCreateHypBtn[ MainHyp ]);
QMenu aPopup( this ); QtxMenu aPopup( this );
QStringList aHypNames = isMainHyp ? QStringList aHypNames = isMainHyp ?
myAvailableHypTypes[ MainHyp ] : myAvailableHypTypes[ AddHyp ]; myAvailableHypTypes[ MainHyp ] : myAvailableHypTypes[ AddHyp ];
QList<QAction*> actions; QList<QAction*> actions;
for ( int i = 0, n = aHypNames.count(); i < n; i++ ) for ( int i = 0, n = aHypNames.count(); i < n; i++ )
actions.append( aPopup.addAction( aHypNames[ i ] ) ); {
QAction* a = 0;
if ( aHypNames[ i ].startsWith( "GROUP:" ))
{
aPopup.appendGroupTitle( aHypNames[ i ].mid( 6 ));
}
else
{
a = aPopup.addAction( aHypNames[ i ] );
}
actions.append( a );
}
QAction* a = aPopup.exec( QCursor::pos() ); QAction* a = aPopup.exec( QCursor::pos() );
if ( a ) if ( a )
emit createHyp( isMainHyp ? MainHyp : AddHyp, actions.indexOf( a ) ); emit createHyp( isMainHyp ? MainHyp : AddHyp, actions.indexOf( a ) );
@ -444,7 +469,18 @@ void SMESHGUI_MeshTab::onEditHyp()
//================================================================================ //================================================================================
void SMESHGUI_MeshTab::onHyp( int theIndex ) void SMESHGUI_MeshTab::onHyp( int theIndex )
{ {
const QObject* aSender = sender(); QObject* aSender = sender();
if ( QComboBox* cb = qobject_cast< QComboBox* >( aSender ))
{
// don't allow selecting a group title
if ( cb->itemData( theIndex, Qt::AccessibleDescriptionRole ) == "separator" )
{
cb->setCurrentIndex( theIndex+1 );
return;
}
}
if ( aSender == myHypCombo[ Algo ] ) if ( aSender == myHypCombo[ Algo ] )
{ {
emit selectAlgo( theIndex - 1 ); // - 1 because there is NONE on the top emit selectAlgo( theIndex - 1 ); // - 1 because there is NONE on the top

View File

@ -150,7 +150,7 @@ private slots:
private: private:
void addItem( const QString& txt, const int type, const int index ); void addItem( const QString& txt, const int type, const int index, const bool isGroup=false );
int getCurrentIndex( const int type, const bool curByType=false) const; int getCurrentIndex( const int type, const bool curByType=false) const;
QMap<int, QStringList> myAvailableHypTypes; QMap<int, QStringList> myAvailableHypTypes;

View File

@ -943,7 +943,6 @@ void SMESHGUI_MeshOp::availableHyps( const int theDim,
bool isAux = ( theHypType >= AddHyp ); bool isAux = ( theHypType >= AddHyp );
QStringList aHypTypeNameList = SMESH::GetAvailableHypotheses( isAlgo, theDim, isAux, myIsOnGeometry, !myIsMesh ); QStringList aHypTypeNameList = SMESH::GetAvailableHypotheses( isAlgo, theDim, isAux, myIsOnGeometry, !myIsMesh );
QStringList::const_iterator anIter;
GEOM::GEOM_Object_var aGeomVar; GEOM::GEOM_Object_var aGeomVar;
QString aCurrentGeomToSelect; QString aCurrentGeomToSelect;
if ( !theMeshType.isEmpty() ) { if ( !theMeshType.isEmpty() ) {
@ -955,23 +954,50 @@ void SMESHGUI_MeshOp::availableHyps( const int theDim,
myHypMapIsApplicable.clear(); myHypMapIsApplicable.clear();
} }
std::multimap< double, HypothesisData* > sortedHyps;
QStringList::const_iterator anIter;
for ( anIter = aHypTypeNameList.begin(); anIter != aHypTypeNameList.end(); ++anIter ) for ( anIter = aHypTypeNameList.begin(); anIter != aHypTypeNameList.end(); ++anIter )
{ {
HypothesisData* aData = SMESH::GetHypothesisData( *anIter ); HypothesisData* aData = SMESH::GetHypothesisData( *anIter );
if ( ( isCompatible ( thePrevAlgoData, aData, theHypType ) && if ( ( isCompatible ( thePrevAlgoData, aData, theHypType ) &&
isCompatible ( theNextAlgoData, aData, theHypType ) ) || isCompatible ( theNextAlgoData, aData, theHypType ) ) ||
( theMeshType == "ANY" && aData->InputTypes.isEmpty())) { ( theMeshType == "ANY" && aData->InputTypes.isEmpty()))
if ( !theMeshType.isEmpty() && theDim >= SMESH::DIM_2D && {
if ( ( !theMeshType.isEmpty() ) &&
( theDim >= SMESH::DIM_2D ) &&
( ( theMeshType != "ANY" && !isCompatibleToMeshType( aData, theMeshType )) || ( ( theMeshType != "ANY" && !isCompatibleToMeshType( aData, theMeshType )) ||
!isCompatibleToGeometry( aData, aCurrentGeomToSelect, aGeomVar ))) !isCompatibleToGeometry( aData, aCurrentGeomToSelect, aGeomVar )))
continue; continue;
int groupID = aData->GroupID;
int priority = aData->Priority;
if ( groupID < 0 || groupID > 9 ) groupID = 9;
if ( priority < 0 || priority > 999 ) priority = 999;
sortedHyps.insert( std::make_pair( groupID + priority * 1e-3, aData ));
}
}
if ( !sortedHyps.empty() )
{
HypothesisData* aPrevGroup = SMESH::GetGroupTitle( sortedHyps.rbegin()->second, isAlgo );
std::multimap< double, HypothesisData* >::iterator key_hyp = sortedHyps.begin();
for ( ; key_hyp != sortedHyps.end(); ++key_hyp )
{
HypothesisData* aData = key_hyp->second;
HypothesisData* aGroup = SMESH::GetGroupTitle( aData, isAlgo );
if ( aPrevGroup != aGroup )
{
theDataList.append( aGroup );
theHyps.append( aGroup->Label );
aPrevGroup = aGroup;
}
theDataList.append( aData ); theDataList.append( aData );
theHyps.append( aData->Label ); theHyps.append( aData->Label );
} }
} }
if ( !theMeshType.isEmpty() && !aCurrentGeomToSelect.isEmpty() && if ( !theMeshType.isEmpty() && !aCurrentGeomToSelect.isEmpty() )
myLastGeomToSelect != aCurrentGeomToSelect )
myLastGeomToSelect = aCurrentGeomToSelect; myLastGeomToSelect = aCurrentGeomToSelect;
} }

View File

@ -141,11 +141,18 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
else else
context = context.toUpper(); context = context.toUpper();
bool isOk;
QString groupIDStr = atts.value("group-id");
int groupID = groupIDStr.toUInt( &isOk );
if ( !isOk ) groupID = -1;
QString priorityStr = atts.value("priority");
int priority = priorityStr.toUInt( &isOk );
if ( !isOk ) priority = -1;
QString aDimStr = atts.value("dim"); QString aDimStr = atts.value("dim");
aDimStr = aDimStr.remove( ' ' ); aDimStr = aDimStr.remove( ' ' );
QStringList aDimList = aDimStr.split( ',', QString::SkipEmptyParts ); QStringList aDimList = aDimStr.split( ',', QString::SkipEmptyParts );
QStringList::iterator anIter; QStringList::iterator anIter;
bool isOk;
QList<int> aDim; QList<int> aDim;
for ( anIter = aDimList.begin(); anIter != aDimList.end(); ++anIter ) for ( anIter = aDimList.begin(); anIter != aDimList.end(); ++anIter )
{ {
@ -170,7 +177,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
if ( !aHypAlType.contains( BAD_HYP_FLAG ) ) { if ( !aHypAlType.contains( BAD_HYP_FLAG ) ) {
HypothesisData* aHypData = HypothesisData* aHypData =
new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib, new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
aLabel, anIcon, context, aDim, isAuxOrNeedHyp, aLabel, anIcon, context, groupID, priority, aDim, isAuxOrNeedHyp,
attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ], attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ],
isNeedGeom, isSupportSubmeshes ); isNeedGeom, isSupportSubmeshes );

View File

@ -4389,6 +4389,50 @@ It can&apos;t be deleted </translation>
<source>SMESH_ADVANCED</source> <source>SMESH_ADVANCED</source>
<translation>Advanced</translation> <translation>Advanced</translation>
</message> </message>
<message>
<source>SMESH_1D_ALGO_GROUP_BASIC</source>
<translation>Basic</translation>
</message>
<message>
<source>SMESH_1D_ALGO_GROUP_ADVANCED</source>
<translation>Advanced</translation>
</message>
<message>
<source>SMESH_1D_HYP_GROUP_BASIC</source>
<translation>Basic</translation>
</message>
<message>
<source>SMESH_1D_HYP_GROUP_PROGRESSION</source>
<translation>Progression</translation>
</message>
<message>
<source>SMESH_1D_HYP_GROUP_ADVANCED</source>
<translation>Advanced</translation>
</message>
<message>
<source>SMESH_2D_ALGO_GROUP_REGULAR</source>
<translation>Regular faces</translation>
</message>
<message>
<source>SMESH_2D_ALGO_GROUP_FREE</source>
<translation>Free faces</translation>
</message>
<message>
<source>SMESH_2D_ALGO_GROUP_ADVANCED</source>
<translation>Advanced</translation>
</message>
<message>
<source>SMESH_3D_ALGO_GROUP_REGULAR</source>
<translation>Regular volumes</translation>
</message>
<message>
<source>SMESH_3D_ALGO_GROUP_FREE</source>
<translation>Free volumes</translation>
</message>
<message>
<source>SMESH_3D_ALGO_GROUP_ADVANCED</source>
<translation>Advanced</translation>
</message>
</context> </context>
<context> <context>
<name>SMESHGUI_FieldSelectorWdg</name> <name>SMESHGUI_FieldSelectorWdg</name>

View File

@ -161,7 +161,7 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis
} }
else if (strcmp("TrianglePreference", aHyp->GetName()) == 0){ else if (strcmp("TrianglePreference", aHyp->GetName()) == 0){
isFirstParams = false; isFirstParams = false;
myTrianglePreference = true; myTrianglePreference = true;
} }
else { else {
isFirstParams = false; isFirstParams = false;
@ -174,18 +174,18 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis
if (isFirstParams) { if (isFirstParams) {
if (strcmp("QuadranglePreference", aHyp->GetName()) == 0) { if (strcmp("QuadranglePreference", aHyp->GetName()) == 0) {
myQuadranglePreference = true; myQuadranglePreference = true;
myTrianglePreference = false; myTrianglePreference = false;
myQuadType = QUAD_STANDARD; myQuadType = QUAD_STANDARD;
} }
else if (strcmp("TrianglePreference", aHyp->GetName()) == 0){ else if (strcmp("TrianglePreference", aHyp->GetName()) == 0){
myQuadranglePreference = false; myQuadranglePreference = false;
myTrianglePreference = true; myTrianglePreference = true;
myQuadType = QUAD_STANDARD; myQuadType = QUAD_STANDARD;
} }
} }
else { else if (const StdMeshers_QuadrangleParams* aHyp2 =
const StdMeshers_QuadrangleParams* aHyp2 = dynamic_cast<const StdMeshers_QuadrangleParams*>( aHyp ))
(const StdMeshers_QuadrangleParams*)aHyp; {
myTriaVertexID = aHyp2->GetTriaVertex(); myTriaVertexID = aHyp2->GetTriaVertex();
if (!myQuadranglePreference && !myTrianglePreference) { // priority of hypos if (!myQuadranglePreference && !myTrianglePreference) { // priority of hypos
@ -206,7 +206,7 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis
//============================================================================= //=============================================================================
/*! /*!
* *
*/ */
//============================================================================= //=============================================================================