From: eap Date: Fri, 25 May 2018 17:04:48 +0000 (+0300) Subject: Fix Redesign of SMESH documentation X-Git-Tag: SHAPER_V9_1_0RC1~32 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=67312ab9;p=modules%2Fsmesh.git Fix Redesign of SMESH documentation --- diff --git a/doc/salome/examples/modifying_meshes_split_vol.py b/doc/salome/examples/modifying_meshes_split_vol.py new file mode 100644 index 000000000..113aac36b --- /dev/null +++ b/doc/salome/examples/modifying_meshes_split_vol.py @@ -0,0 +1,19 @@ +# Split volumic elements into tetrahedrons + +import salome +salome.salome_init() + +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + +# mesh a hexahedral mesh +box = geompy.MakeBoxDXDYDZ (1, 1, 1 ) +mesh = smesh.Mesh( box ) +mesh.AutomaticHexahedralization(0) +print("Nb volumes mesh: %s" % mesh.NbHexas()) + +# split each hexahedron into 6 tetrahedra +mesh.SplitVolumesIntoTetra( mesh, smesh.Hex_6Tet ) +print("Nb volumes mesh: %s" % mesh.NbTetras()) diff --git a/doc/salome/examples/radial_prism_3d_algo.py b/doc/salome/examples/radial_prism_3d_algo.py new file mode 100644 index 000000000..39b260723 --- /dev/null +++ b/doc/salome/examples/radial_prism_3d_algo.py @@ -0,0 +1,36 @@ +# Usage of Radial Prism 3D meshing algorithm + +import salome +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) +import SMESH +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + +# Create geometry: hollow sphere + +sphere_1 = geompy.MakeSphereR( 100 ) +sphere_2 = geompy.MakeSphereR( 50 ) + +hollow_sphere = geompy.MakeCut( sphere_1, sphere_2, theName="hollow sphere") + +faces = geompy.ExtractShapes( hollow_sphere, geompy.ShapeType["FACE"] ) + + +# Create mesh + +mesh = smesh.Mesh( hollow_sphere, "Mesh of hollow sphere" ) + +# assign Global Radial Prism algorithm +prism_algo = mesh.Prism() + +# define projection between the inner and outer spheres +mesh.Triangle( smeshBuilder.NETGEN_1D2D, faces[0] ) # NETGEN on faces[0] +mesh.Projection1D2D( faces[1] ).SourceFace( faces[0] ) # projection faces[0] -> faces[1] + +# define distribution of layers using Number of Segments hypothesis in logarithmic mode +prism_algo.NumberOfSegments( 4, 5. ) + +# compute the mesh +mesh.Compute() diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set index 2cf9698d1..1a2dd8105 100644 --- a/doc/salome/examples/tests.set +++ b/doc/salome/examples/tests.set @@ -42,6 +42,7 @@ SET(BAD_TESTS quality_controls_ex21.py quality_controls_ex22.py viewing_meshes_ex01.py + radial_prism_3d_algo.py ) SET(GOOD_TESTS @@ -137,6 +138,7 @@ SET(GOOD_TESTS modifying_meshes_ex23.py modifying_meshes_ex24.py modifying_meshes_ex25.py + modifying_meshes_split_vol.py prism_3d_algo.py quality_controls_ex01.py quality_controls_ex02.py diff --git a/doc/salome/gui/SMESH/collect_mesh_methods.py b/doc/salome/gui/SMESH/collect_mesh_methods.py index 780ced9c7..a76c6164c 100755 --- a/doc/salome/gui/SMESH/collect_mesh_methods.py +++ b/doc/salome/gui/SMESH/collect_mesh_methods.py @@ -134,7 +134,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for output.append( " #" ) output.append( " # If the optional @a geom_shape parameter is not set, this algorithm is global (applied to whole mesh)." ) output.append( " # Otherwise, this algorithm defines a submesh based on @a geom_shape subshape." ) - output.append( " # @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)" ) + output.append( " # @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in" ) output.append( " # @param geom_shape if defined, the subshape to be meshed (GEOM_Object)" ) output.append( " # @return An instance of Mesh_Algorithm sub-class according to the specified @a algo_type, see " ) output.append( " # %s" % ", ".join( [ "%s.%s" % ( plugin_module_name, algo.__name__ ) for algo in methods[ method ] ] ) ) @@ -145,13 +145,13 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for output.append( ' """' ) output.append( ' %s' % docHelper ) output.append( ' ' ) - output.append( ' This method is dynamically added to **Mesh** class by the meshing plug-in(s). ' ) + output.append( ' This method is dynamically added to :class:`Mesh ` class by the meshing plug-in(s). ' ) output.append( ' ' ) output.append( ' If the optional *geom_shape* parameter is not set, this algorithm is global (applied to whole mesh).' ) output.append( ' Otherwise, this algorithm defines a submesh based on *geom_shape* subshape.' ) output.append( ' ' ) output.append( ' Parameters:' ) - output.append( ' algo_type: type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)' ) + output.append( ' algo_type: type of algorithm to be created; allowed values are specified by classes implemented by plug-in' ) output.append( ' geom_shape (GEOM_Object): if defined, the subshape to be meshed' ) output.append( ' ' ) output.append( ' Returns:') diff --git a/doc/salome/gui/SMESH/conf.py.in b/doc/salome/gui/SMESH/conf.py.in index 3f592e436..31257973c 100644 --- a/doc/salome/gui/SMESH/conf.py.in +++ b/doc/salome/gui/SMESH/conf.py.in @@ -23,7 +23,7 @@ import sys, os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', +extensions = ['sphinx.ext.autodoc','sphinx.ext.autosummary', 'sphinxcontrib.napoleon' ] #add pdfbuilder to build a pdf with rst2pdf diff --git a/doc/salome/gui/SMESH/images/smoothing1.png b/doc/salome/gui/SMESH/images/smoothing1.png old mode 100755 new mode 100644 index 763a5300b..567bab5ac Binary files a/doc/salome/gui/SMESH/images/smoothing1.png and b/doc/salome/gui/SMESH/images/smoothing1.png differ diff --git a/doc/salome/gui/SMESH/images/smoothing2.png b/doc/salome/gui/SMESH/images/smoothing2.png old mode 100755 new mode 100644 index bfce45739..45ce704b1 Binary files a/doc/salome/gui/SMESH/images/smoothing2.png and b/doc/salome/gui/SMESH/images/smoothing2.png differ diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst b/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst index 768923c6b..4fc4c2d4e 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst @@ -5,29 +5,29 @@ ********************* Basic 1D hypothesis specifies: - * how a :ref:`a1d_algos_anchor` should divide the edge; - * how a :ref:`a1d_algos_anchor` should divide the group of C1-continuous edges. + * how a :ref:`Wire Discretization ` should divide the edge; + * how a :ref:`Composite Side Discretization ` should divide the group of C1-continuous edges. 1D hypotheses can be categorized by type of nodes distribution as follows: * Uniform distribution: - * :ref:`average_length_anchor` - * :ref:`max_length_anchor` - * :ref:`number_of_segments_anchor` with Equidistant distribution - * :ref:`automatic_length_anchor` + * :ref:`Local Length ` + * :ref:`Max Size ` + * :ref:`Number of Segments ` with Equidistant distribution + * :ref:`Automatic Length ` * Constantly increasing or decreasing length of segments: - * :ref:`arithmetic_1d_anchor` - * :ref:`geometric_1d_anchor` - * :ref:`start_and_end_length_anchor` - * :ref:`number_of_segments_anchor` with Scale distribution + * :ref:`Arithmetic Progression ` + * :ref:`Geometric Progression ` + * :ref:`Start and end length ` + * :ref:`Number of Segments ` with Scale distribution * Distribution depending on curvature: - * :ref:`adaptive_1d_anchor` - * :ref:`deflection_1d_anchor` + * :ref:`Adaptive ` + * :ref:`Deflection ` * Arbitrary distribution: - * :ref:`fixed_points_1d_anchor` - * :ref:`number_of_segments_anchor` "Number of Segments" with :ref:`analyticdensity_anchor` or Table Density Distribution + * :ref:`Fixed Points ` + * :ref:`Number of Segments ` with :ref:`Analytic Density Distribution ` or Table Density Distribution .. _adaptive_1d_anchor: @@ -50,7 +50,7 @@ Adaptive hypothesis .. centered:: Adaptive hypothesis and NETGEN 2D algorithm - the size of mesh segments reflects the size of geometrical features -**See Also** a :ref:`tui_1d_adaptive` that uses Adaptive hypothesis. +**See Also** a :ref:`sample TUI Script ` that uses Adaptive hypothesis. .. _arithmetic_1d_anchor: @@ -62,7 +62,7 @@ Arithmetic Progression hypothesis The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list. -:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. .. image:: ../images/a-arithmetic1d.png @@ -73,9 +73,9 @@ The splitting direction is defined by the orientation of the underlying geometri :align: center .. centered:: - "Arithmetic Progression hypothesis - the size of mesh elements gradually increases" + Arithmetic Progression hypothesis - the size of mesh elements gradually increases -**See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation. +**See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis ` operation. .. _geometric_1d_anchor: @@ -87,13 +87,12 @@ Geometric Progression hypothesis The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list. -:ref:'reversed_edges_helper_anchor' group assists you in -defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. .. image:: ../images/a-geometric1d.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation. +**See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis ` operation. .. _deflection_1d_anchor: @@ -111,9 +110,9 @@ A geometrical edge is divided into segments of length depending on edge curvatur :align: center .. centered:: - "Deflection hypothesis - useful for meshing curvilinear edges" + Deflection hypothesis - useful for meshing curvilinear edges -**See Also** a sample TUI Script of a :ref:`tui_deflection_1d` operation. +**See Also** a sample TUI Script of :ref:`Defining Deflection hypothesis ` operation. .. _average_length_anchor: @@ -141,9 +140,9 @@ If **precision** is more than 0.33(3) then the edge is divided into 4 segments. :align: center .. centered:: - "Local Length hypothesis - all 1D mesh segments are equal" + Local Length hypothesis - all 1D mesh segments are equal -**See Also** a sample TUI Script of a :ref:`tui_average_length` hypothesis +**See Also** a sample TUI Script of :ref:`Defining Local Length ` hypothesis operation. .. _max_length_anchor: @@ -152,7 +151,7 @@ Max Size ######## **Max Size** hypothesis allows splitting geometrical edges into segments not longer than the given length. Definition of this hypothesis consists of setting the maximal allowed **length** of segments. -**Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`diagonal_size_ratio_pref` preference parameter. +**Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`Ratio Bounding Box Diagonal / Max Size ` preference parameter. **Use preestimated length** check box is enabled only if the geometrical object has been selected before hypothesis definition. .. image:: ../images/a-maxsize1d.png @@ -163,13 +162,13 @@ Max Size Number of Segments hypothesis ############################# -**Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`nb_segments_pref` preference parameter. +**Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`Automatic Parameters / Default Number of Segments ` preference parameter. The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. -:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. -You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog bog : +You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog box: .. image:: ../images/a-nbsegments1.png :align: center @@ -178,42 +177,32 @@ You can set the type of node distribution for this hypothesis in the **Hypothesi **Scale Distribution** - length of segments gradually changes depending on the **Scale Factor**, which is a ratio of the first segment length to the last segment length. -Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: A = S**(1/(N-1)). For an edge of length L, length of the first segment is - -:: - - L * (1 - A)/(1 - A**N) - +Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: A = S**(1/(N-1)). For an edge of length L, length of the first segment is L * (1 - A)/(1 - A**N) .. image:: ../images/a-nbsegments2.png :align: center +.. _analyticdensity_anchor: -**Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the nodedistribution as blue crosses. +**Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the node distribution as blue crosses. .. image:: ../images/distributionwithanalyticdensity.png :align: center - -.. _analyticdensity_anchor: - -Analytic Density -================ - The node distribution is computed so that to have the density function integral on the range between two nodes equal for all segments. .. image:: ../images/analyticdensity.png :align: center -**Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for :ref:`analyticdensity_anchor`. You can select the **Conversion mode** from **Exponent** and **Cut negative**. +**Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for :ref:`Distribution with Analytic Density `. You can select the **Conversion mode** from **Exponent** and **Cut negative**. .. image:: ../images/distributionwithtabledensity.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_deflection_1d` hypothesis operation. +**See Also** a sample TUI Script of :ref:`Defining Number of Segments ` hypothesis operation. -.. The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module). +.. note:: The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module). .. _start_and_end_length_anchor: @@ -224,7 +213,7 @@ Start and End Length hypothesis The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges, for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. -:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. .. image:: ../images/a-startendlength.png @@ -234,9 +223,9 @@ The direction of the splitting is defined by the orientation of the underlying g :align: center .. centered:: - "The lengths of the first and the last segment are strictly defined" + The lengths of the first and the last segment are strictly defined -**See Also** a sample TUI Script of a :ref:`tui_start_and_end_length` hypothesis operation. +**See Also** a sample TUI Script of :ref:`Defining Start and End Length ` hypothesis operation. .. _automatic_length_anchor: @@ -255,13 +244,13 @@ Compare one and the same object (sphere) meshed with minimum and maximum value o :align: center .. centered:: - "Example of a rough mesh at Automatic Length Fineness of 0." + Example of a rough mesh at Automatic Length Fineness of 0. .. image:: ../images/image148.gif :align: center .. centered:: - "Example of a fine mesh at Automatic Length Fineness of 1." + Example of a fine mesh at Automatic Length Fineness of 1. .. _fixed_points_1d_anchor: @@ -277,16 +266,16 @@ It is possible to check in **Same Nb. Segments for all intervals** option and to The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposite to their orientation. This list box is enabled only if the geometrical object is selected for meshing. In this case it is possible to select the edges to be reversed either directly picking them in the 3D viewer or selecting the edges or groups of edges in the Object Browser. -:ref:`reversed_edges_helper_anchor` group assists in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists in defining **Reversed Edges** parameter. .. image:: ../images/mesh_fixedpnt.png :align: center .. centered:: - "Example of a sub-mesh on the edge built using Fixed Points hypothesis" + Example of a sub-mesh on the edge built using Fixed Points hypothesis -**See Also** a sample TUI Script of a :ref:`tui_fixed_points` hypothesis operation. +**See Also** a sample TUI Script of a :ref:`Defining Fixed Points ` hypothesis operation. .. _reversed_edges_helper_anchor: @@ -307,9 +296,8 @@ Reversed Edges Helper :align: center .. centered:: - "The whole geometry and a propagation chain" + The whole geometry and a propagation chain -.. note:: - Alternatively, uniform direction of edges of one propagation chain can be achieved by :ref:`constructing_submeshes_page` on one edge of the chain and assigning a :ref:`propagation_anchor` additional hypothesis. Orientation of this edge (and hence of all the rest edges of the chain) can be controlled by using **Reversed Edges** field. +.. note:: Alternatively, uniform direction of edges of one propagation chain can be achieved by :ref:`definition of a sub-mesh ` on one edge of the chain and assigning a :ref:`Propagation ` additional hypothesis. Orientation of this edge (and hence of all the rest edges of the chain) can be controlled by using **Reversed Edges** field. diff --git a/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst b/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst index dbd5472da..0e5f10899 100644 --- a/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst +++ b/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst @@ -24,9 +24,9 @@ Max Element Area :align: center .. centered:: - "In this example, Max. element area is very small compared to the 1D hypothesis" + In this example, Max. element area is very small compared to the 1D hypothesis -**See Also** a sample TUI Script of a :ref:`tui_max_element_area` hypothesis operation. +**See Also** a sample TUI Script of :ref:`tui_max_element_area` hypothesis operation. .. _length_from_edges_anchor: @@ -35,7 +35,7 @@ Length from Edges **Length from edges** hypothesis defines the maximum linear size of mesh faces as an average length of mesh edges approximating the meshed face boundary. -**See Also** a sample TUI Script of a :ref:`tui_length_from_edges` hypothesis operation. +**See Also** a sample TUI Script of :ref:`tui_length_from_edges` hypothesis operation. .. _hypo_quad_params_anchor: @@ -46,7 +46,7 @@ Quadrangle parameters :align: center .. centered:: - "Quadrangle parameters: Transition" + Quadrangle parameters: Transition **Quadrangle parameters** is a hypothesis for :ref:`quad_ijk_algo_page`. @@ -55,13 +55,11 @@ Quadrangle parameters * **Standard** is the default case, when both triangles and quadrangles are possible in the transition area along the finer meshed sides. * **Triangle preference** forces building only triangles in the transition area along the finer meshed sides. - .. note:: - This type corresponds to **Triangle Preference** additional hypothesis, which is obsolete now. + .. note:: This type corresponds to **Triangle Preference** additional hypothesis, which is obsolete now. * **Quadrangle preference** forces building only quadrangles in the transition area along the finer meshed sides. This hypothesis has a restriction: the total quantity of segments on all four face sides must be even (divisible by 2). - .. note:: - This type corresponds to **Quadrangle Preference** additional hypothesis, which is obsolete now. + .. note:: This type corresponds to **Quadrangle Preference** additional hypothesis, which is obsolete now. * **Quadrangle preference (reversed)** works in the same way and with the same restriction as **Quadrangle preference**, but the transition area is located along the coarser meshed sides. * **Reduced** type forces building only quadrangles and the transition between the sides is made gradually, layer by layer. This type has a limitation on the number of segments: one pair of opposite sides must have the same number of segments, the other pair must have an even total number of segments. In addition, the number of rows between sides with different discretization should be enough for the transition. Following the fastest transition pattern, three segments become one (see the image below), hence the least number of face rows needed to reduce from Nmax segments to Nmin segments is log3( Nmax / Nmin ). The number of face rows is equal to the number of segments on each of equally discretized sides. @@ -70,7 +68,7 @@ Quadrangle parameters :align: center .. centered:: - "The fastest transition pattern: 3 to 1" + The fastest transition pattern: 3 to 1 **Base vertex** tab allows using Quadrangle: Mapping algorithm for meshing of trilateral faces. In this case it is necessary to select the vertex, which will be used as the forth degenerated side of quadrangle. @@ -78,19 +76,19 @@ Quadrangle parameters :align: center .. centered:: - "Quadrangle parameters: Base Vertex" + Quadrangle parameters: Base Vertex .. image:: ../images/ hypo_quad_params_1.png :align: center .. centered:: - "A face built from 3 edges" + A face built from 3 edges .. image:: ../images/ hypo_quad_params_res.png :align: center .. centered:: - "The resulting mesh" + The resulting mesh This parameter can be also used to mesh a segment of a circular face. Please, consider that there is a limitation on the selection of the vertex for the faces built with the angle > 180 degrees (see the picture). @@ -98,7 +96,7 @@ This parameter can be also used to mesh a segment of a circular face. Please, co :align: center .. centered:: - "3/4 of a circular face" + 3/4 of a circular face In this case, selection of a wrong vertex for the **Base vertex** parameter will generate a wrong mesh. The picture below shows the good (left) and the bad (right) results of meshing. @@ -106,37 +104,38 @@ In this case, selection of a wrong vertex for the **Base vertex** parameter will :align: center .. centered:: - "The resulting meshes" + The resulting meshes .. image:: ../images/ hypo_quad_params_dialog_enf.png :align: center .. centered:: - "Quadrangle parameters: Enforced nodes" + Quadrangle parameters: Enforced nodes **Enforced nodes** tab allows defining points, where the algorithm should create nodes. There are two ways to define positions of the enforced nodes. - * **Vertices** group allows to set up shapes whose vertices will define positions of the enforced nodes. Only vertices successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. - * **Points** group allows to explicitly define coordinates of points used to create the enforced nodes. Only points successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. +* **Vertices** group allows to set up shapes whose vertices will define positions of the enforced nodes. Only vertices successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. +* **Points** group allows to explicitly define coordinates of points used to create the enforced nodes. Only points successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. .. note:: **Enforced nodes** cannot be created at **Reduced** transition type. Let us see how the algorithm works: - * Initially positions of nodes are computed without taking into account the enforced vertex (yellow point). + +* Initially positions of nodes are computed without taking into account the enforced vertex (yellow point). .. image:: ../images/ hypo_quad_params_enfnodes_algo1.png :align: center .. centered:: - "Initial mesh" + Initial mesh * Then the node closest to the enforced vertex is detected. Extreme nodes of the row and column of the detected node are used to create virtual edges (yellow lines) ending at the enforced vertex. .. image:: ../images/ hypo_quad_params_enfnodes_algo2.png :align: center .. centered:: - "Creation of virtual edges" + Creation of virtual edges * Consequently, the meshed face is divided by the virtual edges into four quadrilateral sub-domains each of which is meshed as usually: the nodes of the row and column of the detected node are moved to the virtual edges and the quadrilateral elements are constructed. @@ -144,10 +143,10 @@ Let us see how the algorithm works: :align: center .. centered:: - "Final mesh" + Final mesh If there are several enforced vertices, the algorithm is applied recursively to the formed sub-domains. -**See Also** a sample TUI Script of a :ref:`tui_quadrangle_parameters` hypothesis. +**See Also** a sample TUI Script of a :ref:`Quadrangle Parameters ` hypothesis. diff --git a/doc/salome/gui/SMESH/input/StdMeshersBuilder.rst b/doc/salome/gui/SMESH/input/StdMeshersBuilder.rst new file mode 100644 index 000000000..a1bf1d4e6 --- /dev/null +++ b/doc/salome/gui/SMESH/input/StdMeshersBuilder.rst @@ -0,0 +1,9 @@ +smesh_algorithm module +====================== +.. automodule:: smesh_algorithm + :members: + +StdMeshersBuilder module +======================== +.. automodule:: StdMeshersBuilder + :members: diff --git a/doc/salome/gui/SMESH/input/about_filters.rst b/doc/salome/gui/SMESH/input/about_filters.rst index 4a41f4e6b..5f3620196 100644 --- a/doc/salome/gui/SMESH/input/about_filters.rst +++ b/doc/salome/gui/SMESH/input/about_filters.rst @@ -4,19 +4,20 @@ About filters ************* - **Filters** allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. +**Filters** allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. Several criteria can be combined together by using logical operators *AND* and *OR*. In addition, a filter criterion can be reverted using logical operator *NOT*. -Some filtering criteria use the functionality of :ref:`quality_page`:"mesh quality controls" to filter mesh nodes / elements by specific characteristic (Area, Length, etc). +Some filtering criteria use the functionality of :ref:`mesh quality controls ` to filter mesh nodes / elements by specific characteristic (Area, Length, etc). The functinality of mesh filters is available in both GUI and TUI modes: -* In GUI, filters are available in some dialog boxes via "Set Filters" button, clicking on which opens the dialog box allowing to specify the list of filter criteria to be applied to the current selection. See :ref:`selection_filter_library_page` page to learn more about selection filters and their usage in GUI. +* In GUI, filters are available in some dialog boxes via "Set Filters" button, clicking on which opens the :ref:`dialog box ` allowing to specify the list of filter criteria to be applied to the current selection. See :ref:`selection_filter_library_page` page to learn more about selection filters and their usage in GUI. -* In Python scripts, filters can be used to choose only some mesh entities (nodes or elements) for the operations, which require the list of entities as input parameter (create/modify group, remove nodes/elements, etc) and for the operations, which accept objects (groups, sub-meshes) as input parameter. The page :ref:`tui_filters_page` provides examples of the filters usage in Python scripts. +* In Python scripts, filters can be used to choose only some mesh nodes or elements for the operations, which require the list of entities as input parameter (create/modify group, remove nodes/elements, etc) and for the operations, which accept objects (groups, sub-meshes) as input parameter. The page :ref:`tui_filters_page` provides examples of the filters usage in Python scripts. .. toctree:: - :maxdepth: 2 + :maxdepth: 2 + :hidden: - selection_filter_library.rst + selection_filter_library.rst diff --git a/doc/salome/gui/SMESH/input/about_hypo.rst b/doc/salome/gui/SMESH/input/about_hypo.rst index 58d845968..df935f3d7 100644 --- a/doc/salome/gui/SMESH/input/about_hypo.rst +++ b/doc/salome/gui/SMESH/input/about_hypo.rst @@ -9,50 +9,23 @@ About Hypotheses The choice of a hypothesis depends on the selected algorithm. Hypotheses are created during creation and edition of -:ref:`constructing_meshes_page`:"meshes" and -:ref:`constructing_submeshes_page`:"sub-meshes". +:ref:`meshes ` and :ref:`sub-meshes `. Once created a hypotheses can be reused during creation and edition of other meshes and sub-meshes. All created hypotheses and algorithms are present in the Object Browser in *Hypotheses* and *Algorithms* folders correspondingly. It is possible to open a dialog to modify the parameters of a hypothesis from its context menu. This menu also provides **Unassign** command that will unassign the hypothesis from all meshes and sub-meshes using it. Modification of any parameter of a hypothesis and its unassignment leads to automatic removal of elements generated using it. -In **MESH** there are the following Basic Hypotheses: +In **MESH** there are: -* :ref:`a1d_meshing_hypo_page` (for meshing of **edges**): - * :ref:`number_of_segments_anchor` - * :ref:`average_length_anchor` - * :ref:`max_length_anchor` - * :ref:`adaptive_1d_anchor` - * :ref:`arithmetic_1d_anchor` - * :ref:`geometric_1d_anchor` - * :ref:`start_and_end_length_anchor` - * :ref:`deflection_1d_anchor` - * :ref:`automatic_length_anchor` - * :ref:`fixed_points_1d_anchor` - -* :ref:`a2d_meshing_hypo_page` (for meshing of **faces**): - - * :ref:`max_element_area_anchor` - * :ref:`length_from_edges_anchor` - * :ref:`hypo_quad_params_anchor` - -* 3D Hypothesis (for meshing of **volumes**): - - * :ref:`max_element_volume_hypo_page` - - - -There also exist :ref:`additional_hypo_page`: - - * :ref:`propagation_anchor` - * :ref:`propagofdistribution_anchor` - * :ref:`viscous_layers_anchor` - * :ref:`quadratic_mesh_anchor` - * :ref:`quadrangle_preference_anchor` +* :ref:`a1d_meshing_hypo_page` for meshing of **edges** +* :ref:`a2d_meshing_hypo_page` for meshing of **faces** +* :ref:`3D Hypothesis ` for meshing of **volumes** +* :ref:`additional_hypo_page` +**Table of Contents** .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - 1d_meshing_hypo.rst - 2d_meshing_hypo.rst - max_element_volume_hypo.rst - additional_hypo.rst + 1d_meshing_hypo.rst + 2d_meshing_hypo.rst + 3D: Max Element Volume hypothesis + additional_hypo.rst diff --git a/doc/salome/gui/SMESH/input/about_meshes.rst b/doc/salome/gui/SMESH/input/about_meshes.rst index 8b80a9ef0..abb80677f 100644 --- a/doc/salome/gui/SMESH/input/about_meshes.rst +++ b/doc/salome/gui/SMESH/input/about_meshes.rst @@ -10,38 +10,38 @@ A SALOME study can contain multiple meshes, but they do not implicitly compose o Mesh module provides several ways to create the mesh: -* The main way is to :ref:`constructing_meshes_page` on the basis of the geometrical shape produced in the Geometry module. This way implies selection of +* The main way is to :ref:`construct the mesh ` on the basis of the geometrical shape produced in the Geometry module. This way implies selection of - * a geometrical object (**main shape**) and - * **meshing parameters** ( :ref:`basic_meshing_algos_page` and characteristics (e.g. element size) of a required mesh encapsulated in :ref:`about_hypo_page` objects). + * a geometrical object (*main shape*) and + * *meshing parameters* (:ref:`meshing algorithms ` and characteristics (e.g. element size) of a required mesh encapsulated in :ref:`hypothesis ` objects). - Construction of :ref:`constructing_submeshes_page` allows to discretize some sub-shapes of the main shape, for example a face, using the meshing parameters that differ from those used for other sub-shapes. - Meshing parameters of meshes and sub-meshes can be :ref:`editing_meshes_page`. (Upon edition only mesh entities generated using changed meshing parameters are removed and will be re-computed). + Construction of :ref:`sub-meshes ` allows to discretize some sub-shapes of the main shape, for example a face, using the meshing parameters that differ from those used for other sub-shapes. + Meshing parameters of meshes and sub-meshes can be :ref:`edited `. (Upon edition only mesh entities generated using changed meshing parameters are removed and will be re-computed). - .. note:: + .. note:: Algorithms and hypotheses used at mesh level are referred to as *global* ones and those used at sub-mesh level are referred to as *local* ones. -* Bottom-up way, using :ref:`modifying_meshes_page` operations, especially :ref:`extrusion_page` and :ref:`revolution_page`. To create an empty mesh not based on geometry, use the same dialog as to :ref:`constructing_meshes_page` but specify neither the geometry nor meshing algorithms. +* Bottom-up way, using :ref:`mesh modification ` operations, especially :ref:`extrusion ` and :ref:`revolution `. To create an empty mesh not based on geometry, use the same dialog as to :ref:`construct the mesh on geometry ` but specify neither the geometry nor meshing algorithms. -* The mesh can be :ref:`importing_exporting_meshes_page` from (and exported to) the file in MED, UNV, STL, CGNS, DAT, GMF and SAUVE formats. +* The mesh can be :ref:`imported ` from (and exported to) the file in MED, UNV, STL, CGNS, DAT, GMF and SAUVE formats. -* The 3D mesh can be generated from the 2D mesh not based on geometry, which was either :ref:`importing_exporting_meshes_page` or created in other way. To setup the meshing parameters of a mesh not based on geometry, just invoke :ref:`editing_meshes_page` command on your 2D mesh. +* The 3D mesh can be generated from the 2D mesh not based on geometry, which was either :ref:`imported ` or created in other way. To setup the meshing parameters of a mesh not based on geometry, just invoke :ref:`Edit mesh / sub-mesh ` command on your 2D mesh. -* Several meshes can be :ref:`building_compounds_page` into a new mesh. +* Several meshes can be :ref:`combined ` into a new mesh. -* The whole mesh or its part (sub-mesh or group) can be :ref:`copy_mesh_page` into a new mesh. +* The whole mesh or its part (sub-mesh or group) can be :ref:`copied ` into a new mesh. -* A new mesh can be created from a transformed, e.g. :ref:`translation_page`, part of the mesh. +* A new mesh can be created from a transformed, e.g. :ref:`translated `, part of the mesh. -Meshes can be edited using the MESH functions destined for :ref:`modifying_meshes_page` of meshes. +Meshes can be edited using the MESH functions destined for :ref:`modification ` of meshes. Attractive meshing capabilities include: -* 3D and 2D :ref:`viscous_layers_anchor` (boundary layers of highly stretched elements beneficial for high quality viscous computations); +* 3D and 2D :ref:`Viscous Layers ` (boundary layers of highly stretched elements beneficial for high quality viscous computations); * automatic conformal transition between tetrahedral and hexahedral sub-meshes. -The **structure** of a SALOME mesh is described by nodes and elements based on these nodes. The geometry of an element is defined by the sequence of nodes constituting it and the :ref:`connectivity_page` (adopted from MED library). Definition of the element basing on the elements of a lower dimension is NOT supported. +The **structure** of a SALOME mesh is described by nodes and elements based on these nodes. The geometry of an element is defined by the sequence of nodes constituting it and the :ref:`connectivity convention ` (adopted from MED library). Definition of the element basing on the elements of a lower dimension is NOT supported. .. _elementary geometrical elements: @@ -50,7 +50,7 @@ The mesh can include the following entities: * **Node** - a mesh entity defining a position in 3D space with coordinates (x, y, z). * **Edge** (or segment) - 1D mesh element linking two nodes. * **Face** - 2D mesh element representing a part of surface bound by links between face nodes. A face can be a triangle, quadrangle or polygon. -* **Volume** - 3D mesh element representing a part of 3D space bound by volume facets. Nodes of a volume describing each facet are defined by the :ref:`connectivity_page`. A volume can be a tetrahedron, hexahedron, pentahedron, pyramid, hexagonal prism or polyhedron. +* **Volume** - 3D mesh element representing a part of 3D space bound by volume facets. Nodes of a volume describing each facet are defined by the :ref:`connectivity convention `. A volume can be a tetrahedron, hexahedron, pentahedron, pyramid, hexagonal prism or polyhedron. * **0D** element - mesh element defined by one node. * **Ball** element - discrete mesh element defined by a node and a diameter. @@ -69,13 +69,17 @@ Quadratic mesh can be obtained in three ways: * Using :ref:`convert_to_from_quadratic_mesh_page` operation. * Using an appropriate option of some meshing algorithms, which generate elements of several dimensions starting from mesh segments. + +**Table of Contents** + .. toctree:: - :maxdepth: 2 - - constructing_meshes.rst - constructing_submeshes.rst - editing_meshes.rst - importing_exporting_meshes.rst - building_compounds.rst - copy_mesh.rst - connectivity.rst + :titlesonly: + :maxdepth: 2 + + constructing_meshes.rst + constructing_submeshes.rst + editing_meshes.rst + importing_exporting_meshes.rst + building_compounds.rst + copy_mesh.rst + connectivity.rst diff --git a/doc/salome/gui/SMESH/input/about_quality_controls.rst b/doc/salome/gui/SMESH/input/about_quality_controls.rst index 0a136211f..63b20dd1b 100644 --- a/doc/salome/gui/SMESH/input/about_quality_controls.rst +++ b/doc/salome/gui/SMESH/input/about_quality_controls.rst @@ -4,8 +4,7 @@ About quality controls ********************** -.. note:: - **Mesh quality control** in MESH is destined for visual control of the generated mesh. +**Mesh quality control** in MESH is destined for visual control of the generated mesh. Application of a definite quality control consists of usage of the corresponding algorithm, which calculates a value of a definite geometric characteristic (Area, Length of edges, etc) for all meshing elements, composing your mesh. Then all meshing elements are colored according the calculated values. The reference between the coloring of the meshing elements and these calculated values is shown with the help of a scalar bar, which is displayed near the presentation of your mesh. @@ -64,11 +63,12 @@ To manage the quality controls call pop-up in the VTK viewer and select "Control * **Edge Controls** provides access to the edge quality controls; * **Face Controls** provides access to the face quality controls; * **Volume Controls** provides access to the volume quality controls; -* **Scalar Bar Properties** allows setting :ref:scalar_bar_dlg; +* **Scalar Bar Properties** allows setting :ref:`scalar_bar_dlg`; * **Distribution -> Export ...** allows saving the distribution of quality control values in the text file; * **Distribution -> Show** Shows/Hides the distribution histogram of the quality control values in the VTK Viewer. * **Distribution -> Plot** Plots the distribution histogram of the quality control values in the Plot 2D Viewer. +**Table of Contents** .. toctree:: :maxdepth: 2 @@ -98,5 +98,3 @@ To manage the quality controls call pop-up in the VTK viewer and select "Control bare_border_volumes.rst over_constrained_volumes.rst scalar_bar.rst - - diff --git a/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst b/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst index e4be7c810..d2df5f230 100644 --- a/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst +++ b/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst @@ -6,23 +6,23 @@ Adding nodes and elements In MESH you can add to your mesh different elements such as: -* :ref:`adding_nodes_anchor` -* :ref:`adding_0delems_anchor` -* :ref:`adding_0delems_on_all_nodes_anchor` -* :ref:`adding_balls_anchor` -* :ref:`adding_edges_anchor` -* :ref:`adding_triangles_anchor` -* :ref:`adding_quadrangles_anchor` -* :ref:`adding_polygons_anchor` -* :ref:`adding_tetrahedrons_anchor` -* :ref:`adding_hexahedrons_anchor` -* :ref:`adding_octahedrons_anchor` -* :ref:`adding_polyhedrons_anchor` +* :ref:`Nodes ` +* :ref:`0D Elements ` +* :ref:`0D elements on Element Nodes ` +* :ref:`Ball Elements ` +* :ref:`Edges ` +* :ref:`Triangles ` +* :ref:`Quadrangles ` +* :ref:`Polygons ` +* :ref:`Tetrahedrons ` +* :ref:`Hexahedrons ` +* :ref:`Hexagonal prism ` +* :ref:`Polyhedrons ` -The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`connectivity_page`. +The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`here `. -**To add a node or an element to your mesh:** +*To add a node or an element to your mesh:* #. Select your mesh in the Object Browser or in the 3D viewer. #. From the **Modification** menu choose the **Add** item, the following associated sub-menu will appear: @@ -30,16 +30,9 @@ The convention of nodal connectivity of elements used in SALOME is the MED libra .. image:: ../images/image152.png :align: center - From this sub-menu select the type of element which you would like to add to your mesh. + From this sub-menu select the type of element which you would like to add to your mesh. - .. note:: - All dialogs for new node or element adding to the mesh provide the possibility to automatically add a node or element to the specified group or to create it anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input new group name. The combo box lists groups of all the - :ref:`grouping_elements_page`: both - :ref:`standalone_group`, - :ref:`group_on_filter`, and - :ref:`group_on_geom`. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. - - If the user rejects conversion operation, it is cancelled and a new node/element is not created! + .. note:: All dialogs for new node or element adding to the mesh provide the possibility to automatically add a node or element to the specified group or to create it anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input new group name. The combo box lists groups of all the :ref:`three types `: both :ref:`standalone groups `, :ref:`groups on filter `, and :ref:`groups on geometry `. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. If the user rejects conversion operation, it is cancelled and a new node/element is not created! **See Also** sample TUI Scripts of :ref:`tui_adding_nodes_and_elements` operations. @@ -91,9 +84,9 @@ In this dialog * **Elements** - this button allows selecting elements in the VTK viewer or typing their IDs in the dialog. * **Nodes** - this button allows selecting nodes to create 0D elements on in the VTK viewer or typing their IDs in the dialog. -* **Set Filter** button allows selecting elements or nodes by filtering mesh elements or nodes with different criteria (see :ref:`filtering_elements`). +* **Set Filter** button allows selecting elements or nodes by filtering mesh elements or nodes with different criteria (see :ref:`Filter usage `). * Activate **Allow duplicate elements** to get several 0D elements on a node. -* Switching on **Add to group** check-box allows specifying the name of the group to which all created or found (existing) 0D elements will be added. You can either select an existing group from a drop-down list, or enter the name of the group to be created. If a selected existing :ref:`grouping_elements_page` is not Standalone (Group On Geometry or Group On Filter) it will be converted to Standalone. +* Switching on **Add to group** check-box allows specifying the name of the group to which all created or found (existing) 0D elements will be added. You can either select an existing group from a drop-down list, or enter the name of the group to be created. If a selected existing :ref:`group ` is not Standalone (Group On Geometry or Group On Filter) it will be converted to Standalone. .. warning:: If **Add to group** is activated it has to be filled in. diff --git a/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst b/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst index f2deb4e2c..2bcba5100 100644 --- a/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst +++ b/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst @@ -11,7 +11,7 @@ Quadratic elements are defined by the same corner nodes as the corresponding lin If a quadratic 2D element has an additional node at the element center, it is a bi-quadratic element (both TRIA7 and QUAD9 elements are supported). If a quadratic hexahedral element has 7 additional nodes: at the element center and at the center of each side, it is a tri-quadratic element (or HEXA27). -The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`connectivity_page`. +The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`here `. There are several ways to create quadratic elements in your mesh: @@ -29,13 +29,7 @@ There are several ways to create quadratic elements in your mesh: :align: center .. note:: - All dialogs for adding quadratic element to the mesh provide the possibility to automatically add an element to the specified group or to create the group anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input a new group name. The combo box lists groups of all the - :ref:`grouping_elements_page` both - :ref:`standalone_group`, - :ref:`group_on_filter`, and - :ref:`group_on_geom`. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. - If the user rejects conversion operation, it is cancelled and a new quadratic element is not created. - + All dialogs for adding quadratic element to the mesh provide the possibility to automatically add an element to the specified group or to create the group anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input a new group name. The combo box lists groups of all the :ref:`three types `: both :ref:`standalone groups `, :ref:`groups on filter `, and :ref:`groups on geometry `. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. If the user rejects conversion operation, it is cancelled and a new node/element is not created! To create any **Quadratic Element** specify the nodes which will form your element by selecting them in the 3D viewer with pressed Shift button and click *Selection* button to the right of **Corner Nodes** label. Their numbers will appear in the dialog box as **Corner Nodes** (alternatively you can just input numbers in this field without selection; note that to use this way the mesh should be selected before invoking this operation). The edges formed by the corner nodes will appear in the table. To define the middle nodes for each edge, double-click on the respective field and input the number of the node (or pick the node in the viewer). For bi-quadratic and tri-quadratic elements, your also need to specify central nodes. As soon as all needed nodes are specified, a preview of a new quadratic element will be displayed in the 3D viewer. Then you will be able to click **Apply** or **Apply and Close** button to add the element to the mesh. diff --git a/doc/salome/gui/SMESH/input/additional_hypo.rst b/doc/salome/gui/SMESH/input/additional_hypo.rst index ec308784f..c6665910d 100644 --- a/doc/salome/gui/SMESH/input/additional_hypo.rst +++ b/doc/salome/gui/SMESH/input/additional_hypo.rst @@ -6,14 +6,14 @@ Additional Hypotheses **Additional Hypotheses** can be applied as a supplement to the main hypotheses, introducing additional concepts to mesh creation. -An **Additional Hypothesis** can be defined in the same way as any main hypothesis in :ref:`create_mesh_anchor` or :ref:`constructing_submeshes_page` dialog. +An **Additional Hypothesis** can be defined in the same way as any main hypothesis in :ref:`Create Mesh ` or :ref:`Create Sub-Mesh ` dialog. The following additional hypothesis are available: * :ref:`propagation_anchor` and :ref:`propagofdistribution_anchor` hypotheses are useful for creation of quadrangle and hexahedral meshes. -* :ref:`viscous_layers_anchor` and :ref:`viscous_layers_anchor` hypotheses allow creation of layers of highly stretched elements near mesh boundary, which is beneficial for high quality viscous computations. +* :ref:`Viscous Layers ` and :ref:`Viscous Layers 2D ` hypotheses allow creation of layers of highly stretched elements near mesh boundary, which is beneficial for high quality viscous computations. * :ref:`quadratic_mesh_anchor` hypothesis allows generation of second order meshes. -* :ref:`quadrangle_preference_anchor` enables generation of quadrangles. +* :ref:`quadrangle_preference_anchor` hypothesis enables generation of quadrangles. @@ -32,10 +32,10 @@ whole geometry, and this propagation stops at an edge with other local meshing parameters. This hypothesis can be taken into account by -:ref:`a1d_algos_anchor` and -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. +:ref:`Wire Discretization ` and +:ref:`Composite Side Discretization ` algorithms. -**See Also** a sample TUI Script of a :ref:`tui_propagation` operation +**See Also** a sample TUI Script of a :ref:`Propagation hypothesis ` operation .. _propagofdistribution_anchor: @@ -50,10 +50,10 @@ relations between segment lengths, unless another hypothesis has been locally defined on the opposite edge. This hypothesis can be taken into account by -:ref:`a1d_algos_anchor` "Wire Discretization" and -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. +:ref:`Wire Discretization ` and +:ref:`Composite Side Discretization ` algorithms. -**See Also** a sample TUI Script of a :ref:`tui_propagation` operation +**See Also** a sample TUI Script of a :ref:`Propagation hypothesis ` operation .. _viscous_layers_anchor: @@ -80,24 +80,25 @@ computations. * **Number of layers** - defines the number of element layers. * **Stretch factor** - defines the growth factor of element height from the mesh boundary inwards. * **Extrusion method** (available in 3D only) - defines how positions of nodes are found during prism construction and how the creation of distorted and intersecting prisms is prevented. -* **Surface offset + smooth** method extrudes nodes along the normal to the underlying geometrical surface. Smoothing of the internal surface of element layers is possible to avoid creation of invalid prisms. -* **Face offset** method extrudes nodes along the average normal of surrounding mesh faces to the intersection with a neighbor mesh face translated along its own normal by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. -* **Node offset** method extrudes nodes along the average normal of surrounding mesh faces by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. + + * **Surface offset + smooth** method extrudes nodes along the normal to the underlying geometrical surface. Smoothing of the internal surface of element layers is possible to avoid creation of invalid prisms. + * **Face offset** method extrudes nodes along the average normal of surrounding mesh faces to the intersection with a neighbor mesh face translated along its own normal by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. + * **Node offset** method extrudes nodes along the average normal of surrounding mesh faces by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. .. image:: ../images/viscous_layers_extrusion_method.png :align: center .. centered:: - "Prisms created by the tree extrusion methods at the same other parameters" + Prisms created by the tree extrusion methods at the same other parameters * **Specified Faces/Edges are** - defines how the shapes specified by the next parameter are used. * **Faces/Edges with/without layers** - defines geometrical faces or edges on which element layers either should be or should not be constructed, depending on the value of the previous parameter (**Specified Faces/Edges are**). Faces (or edges) can be selected either in the Object Browser or in the VTK Viewer. **Add** button becomes active as soon as a suitable sub-shape is selected. -.. note:: - A mesh shown in the 3D Viewer can prevent selection of faces and edges, just hide the mesh to avoid this. If a face, which should be selected, is hidden by other faces, consider creating a group of faces to be selected in the Geometry module. To avoid a long wait when a geometry with many faces (or edges) is displayed, the number of faces (edges) shown at a time is limited by the value of "Sub-shapes preview chunk size" preference (in Preferences/Mesh/General tab). + .. note:: + A mesh shown in the 3D Viewer can prevent selection of faces and edges, just hide the mesh to avoid this. If a face, which should be selected, is hidden by other faces, consider creating a group of faces to be selected in the Geometry module. To avoid a long wait when a geometry with many faces (or edges) is displayed, the number of faces (edges) shown at a time is limited by the value of :ref:`Sub-shapes preview chunk size ` preference (in Preferences/Mesh/General tab). -If faces/edges without layers are specified, the element layers are + If faces/edges without layers are specified, the element layers are not constructed on geometrical faces shared by several solids in 3D case and edges shared by several faces in 2D case. In other words, in this mode the element layers can be constructed on boundary faces @@ -107,13 +108,13 @@ If faces/edges without layers are specified, the element layers are boundary faces/edges of the shape of this sub-mesh, at same time possibly being internal faces/edges within the whole model. -.. image:: ../images/viscous_layers_on_submesh.png - :align: center + .. image:: ../images/viscous_layers_on_submesh.png + :align: center -.. centered:: + .. centered:: 2D viscous layers constructed on boundary edges of a sub-mesh on a disk face. -If you use **several** hypotheses to define viscous layers on faces of + If you use **several** hypotheses to define viscous layers on faces of one solid, keep in mind the following. Each hypothesis defines a set of faces with viscous layers (even if you specify faces without layers). The sets of faces with viscous layers defined by several @@ -144,9 +145,9 @@ links between element nodes are not straight but curved lines due to presence of an additional mid-side node). This 1D hypothesis can be taken into account by -:ref:`a1d_algos_anchor` "Wire Discretization" and -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. To create a quadratic mes assign this hypothesis at -:ref:`constructing_meshes_page`. +:ref:`Wire Discretization ` and +:ref:`Composite Side Discretization ` algorithms. To create a quadratic mes assign this hypothesis at +:ref:`mesh construction `. See :ref:`adding_quadratic_elements_page` for more information about quadratic meshes. @@ -159,8 +160,8 @@ Quadrangle Preference This additional hypothesis can be used together with 2D triangulation algorithms. It allows 2D triangulation algorithms to build quadrangular meshes. -Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm is obsolete since introducing :ref:`hypo_quad_params_anchor` "Quadrangle parameters" hypothesis. -Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm corresponds to specifying "Quadrangle Preference" transition type of :ref:`hypo_quad_params_anchor` "Quadrangle parameters" hypothesis. +Usage of this hypothesis with :ref:`Quadrangle: Mapping ` meshing algorithm is obsolete since introducing :ref:`Quadrangle parameters ` hypothesis. +Usage of this hypothesis with :ref:`Quadrangle: Mapping ` meshing algorithm corresponds to specifying *Quadrangle Preference* transition type of :ref:`Quadrangle parameters ` hypothesis. .. note:: - "Quadrangle Preference" transition type can be used only if the total quantity of segments on all sides of the face is even (divisible by 2), else "Standard" transition type is used. + *Quadrangle Preference* transition type can be used only if the total quantity of segments on all sides of the face is even (divisible by 2), else *Standard* transition type is used. diff --git a/doc/salome/gui/SMESH/input/area.rst b/doc/salome/gui/SMESH/input/area.rst index 35bf8e886..11bbdddaa 100644 --- a/doc/salome/gui/SMESH/input/area.rst +++ b/doc/salome/gui/SMESH/input/area.rst @@ -5,19 +5,14 @@ Area **** -.. note:: **Area** mesh quality control is based on the algorithm of area - calculation of mesh faces. +**Area** mesh quality control is based on the algorithm of area calculation of mesh faces. -**To apply the Area quality control to your mesh:** +*To apply the Area quality control to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Area** or click **"Area"** button. - - .. image:: ../images/image35.png - :align: center +.. |img| image:: ../images/image35.png - .. centered:: - **"Area" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Area** or click **"Area"** button |img|. Your mesh will be displayed in the viewer with its faces colored according to the applied mesh quality control criterion: @@ -26,5 +21,5 @@ according to the applied mesh quality control criterion: :align: center -**See Also** a sample TUI Script of an :ref:`tui_area` operation. +**See Also** a sample TUI Script of an :ref:`tui_area` filter. diff --git a/doc/salome/gui/SMESH/input/aspect_ratio.rst b/doc/salome/gui/SMESH/input/aspect_ratio.rst index 080941743..2199d5b39 100644 --- a/doc/salome/gui/SMESH/input/aspect_ratio.rst +++ b/doc/salome/gui/SMESH/input/aspect_ratio.rst @@ -17,24 +17,17 @@ The **Aspect Ratio** quality criterion for mesh elements reveals the degree of c .. image:: ../images/formula5.png :align: center -**To apply the Aspect Ratio quality criterion to your mesh:** +*To apply the Aspect Ratio quality criterion to your mesh:* + +.. |img| image:: ../images/image37.png #. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Aspect Ratio** or click **Aspect Ratio** button in the toolbar. - +#. Choose **Controls > Face Controls > Aspect Ratio** or click *Aspect Ratio* button |img| in the toolbar. - .. image:: ../images/image37.png - :align: center - - .. centered:: - Aspect Ratio button - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image94.jpg :align: center -**See Also** a sample TUI Script of an :ref:`tui_aspect_ratio` operation. - - +**See Also** a sample TUI Script of an :ref:`tui_aspect_ratio` filter. diff --git a/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst b/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst index 2f25b1727..dd1ac9196 100644 --- a/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst +++ b/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst @@ -16,23 +16,17 @@ The **Aspect Ratio 3D** mesh quality criterion calculates the same parameter as .. image:: ../images/formula2.png :align: center -**To apply the Aspect Ratio 3D quality criterion to your mesh:** +*To apply the Aspect Ratio 3D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Volume Controls > Aspect Ratio 3D** or click **"Aspect Ratio 3D"** button of the toolbar. - - - .. image:: ../images/image144.png - :align: center +.. |img| image:: ../images/image144.png - .. centered:: - "Aspect Ratio 3D" button - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Aspect Ratio 3D** or click *"Aspect Ratio 3D"* button |img| of the toolbar. + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image86.jpg :align: center -**See Also** a sample TUI Script of a :ref:`tui_aspect_ratio_3d` operation. - +**See Also** a sample TUI Script of a :ref:`tui_aspect_ratio_3d` filter. diff --git a/doc/salome/gui/SMESH/input/bare_border_face.rst b/doc/salome/gui/SMESH/input/bare_border_face.rst index f15a291c1..fd50742a3 100644 --- a/doc/salome/gui/SMESH/input/bare_border_face.rst +++ b/doc/salome/gui/SMESH/input/bare_border_face.rst @@ -12,5 +12,4 @@ color different from the color of shared faces. .. image:: ../images/bare_border_faces_smpl.png :align: center -**See also** A sample TUI Script making a group of faces highlighted in the picture is :ref:`tui_bare_border_faces`. - +**See also** a sample :ref:`TUI Script ` making a group of faces highlighted in the picture. diff --git a/doc/salome/gui/SMESH/input/bare_border_volumes.rst b/doc/salome/gui/SMESH/input/bare_border_volumes.rst index c6a9bec6a..d58673dde 100644 --- a/doc/salome/gui/SMESH/input/bare_border_volumes.rst +++ b/doc/salome/gui/SMESH/input/bare_border_volumes.rst @@ -12,6 +12,5 @@ color different from the color of shared volumes. .. image:: ../images/bare_border_volumes_smpl.png :align: center -**See also** A sample TUI Script making a group of volumes highlighted in the -picture is :ref:`tui_bare_border_volumes`. +**See also** a sample :ref:`TUI Script ` making a group of volumes highlighted in the picture. diff --git a/doc/salome/gui/SMESH/input/basic_meshing_algos.rst b/doc/salome/gui/SMESH/input/basic_meshing_algos.rst index e1e7b2a01..9033c3104 100644 --- a/doc/salome/gui/SMESH/input/basic_meshing_algos.rst +++ b/doc/salome/gui/SMESH/input/basic_meshing_algos.rst @@ -6,74 +6,59 @@ Basic meshing algorithms The MESH module contains a set of meshing algorithms, which are used for meshing entities (1D, 2D, 3D sub-shapes) composing geometrical objects. +.. note:: Algorithms added to the module as plug-ins are described in documentation of the plug-ins. + An algorithm represents either an implementation of a certain meshing technique or an interface to the whole meshing program generating elements of several dimensions. .. _a1d_algos_anchor: -1D Entities -=========== - * For meshing of 1D entities (**edges**): -* **Wire Discretization** meshing algorithm - splits an edge into a number of mesh segments following an 1D hypothesis. -* **Composite Side Discretization** algorithm - allows to apply a 1D hypothesis to a whole side of a geometrical face even if it is composed of several edges provided that they form C1 curve in all faces of the main shape. -* For meshing of 2D entities (**faces**): + * **Wire Discretization** meshing algorithm - splits an edge into a number of mesh segments following an 1D hypothesis. + * **Composite Side Discretization** algorithm - allows to apply a 1D hypothesis to a whole side of a geometrical face even if it is composed of several edges provided that they form C1 curve in all faces of the main shape. - * **Triangle: Mefisto** meshing algorithm - splits faces into triangular elements. - * :ref:`quad_ijk_algo_page` meshing algorithm - splits faces into quadrangular elements. +* For meshing of 2D entities (**faces**): + + * **Triangle: Mefisto** meshing algorithm - splits faces into triangular elements. + * :ref:`Quadrangle: Mapping ` meshing algorithm - splits faces into quadrangular elements. .. image:: ../images/image123.gif :align: center .. centered:: - "Example of a triangular 2D mesh" + Example of a triangular 2D mesh .. image:: ../images/image124.gif :align: center .. centered:: - "Example of a quadrangular 2D mesh" - - * For meshing of 3D entities (**solid objects**): + Example of a quadrangular 2D mesh +* For meshing of 3D entities (**solid objects**): - * **Hexahedron (i,j,k)** meshing algorithm - solids are split into hexahedral elements thus forming a structured 3D mesh. The algorithm requires that 2D mesh generated on a solid could be considered as a mesh of a box, i.e. there should be eight nodes shared by three quadrangles and the rest nodes should be shared by four quadrangles. + * **Hexahedron (i,j,k)** meshing algorithm - solids are split into hexahedral elements thus forming a structured 3D mesh. The algorithm requires that 2D mesh generated on a solid could be considered as a mesh of a box, i.e. there should be eight nodes shared by three quadrangles and the rest nodes should be shared by four quadrangles. .. image:: ../images/hexa_ijk_mesh.png :align: center - .. centered:: - "Structured mesh generated by Hexahedron (i,j,k) on a solid bound by 16 faces" - - - * :ref:`cartesian_algo_page` meshing algorithm - solids are split into hexahedral elements forming a Cartesian grid; polyhedra and other types of elements are generated where the geometrical boundary intersects Cartesian cells. - .. image:: ../images/image125.gif - :align: center - - .. centered:: - "Example of a tetrahedral 3D mesh" - - .. image:: ../images/image126.gif - :align: center - - .. centered:: - "Example of a hexahedral 3D mesh" + .. centered:: + Structured mesh generated by Hexahedron (i,j,k) on a solid bound by 16 faces + * :ref:`Body Fitting ` meshing algorithm - solids are split into hexahedral elements forming a Cartesian grid; polyhedra and other types of elements are generated where the geometrical boundary intersects Cartesian cells. -Some 3D meshing algorithms, such as Hexahedron(i,j,k) also can -generate 3D meshes from 2D meshes, working without geometrical -objects. + Some 3D meshing algorithms, such as Hexahedron(i,j,k) also can + generate 3D meshes from 2D meshes, working without geometrical objects. -There is also a number of more specific algorithms: +* There is also a number of more specific algorithms: - * :ref:`prism_3d_algo_page` - for meshing prismatic 3D shapes with hexahedra and prisms. - * :ref:`quad_from_ma_algo_page` - for quadrangle meshing of faces with sinuous borders and rings. - * **Polygon per Face** meshing algorithm - generates one mesh face (either a triangle, a quadrangle or a polygon) per a geometrical face using all nodes from the face boundary. - * :ref:`projection_algos_page` - for meshing by projection of another mesh. - * :ref:`import_algos_page` - for meshing by importing elements from another mesh. - * :ref:`radial_prism_algo_page` - for meshing 3D geometrical objects with cavities with hexahedra and prisms. - * :ref:`radial_quadrangle_1D2D_algo_page` - for quadrangle meshing of disks and parts of disks. - * :ref:`use_existing_page` - to create a 1D or a 2D mesh in a python script. - * :ref:`segments_around_vertex_algo_page` - for defining the length of mesh segments around certain vertices. + * :ref:`Extrusion 3D ` - for meshing prismatic 3D shapes with hexahedra and prisms. + * :ref:`Quadrangle: Medial Axis Projection ` - for quadrangle meshing of faces with sinuous borders and rings. + * **Polygon per Face** meshing algorithm - generates one mesh face (either a triangle, a quadrangle or a polygon) per a geometrical face using all nodes from the face boundary. + * :ref:`Projection algorithms ` - for meshing by projection of another mesh. + * :ref:`Import algorithms ` - for meshing by importing elements from another mesh. + * :ref:`Radial Prism ` - for meshing 3D geometrical objects with cavities with hexahedra and prisms. + * :ref:`Radial Quadrangle 1D-2D ` - for quadrangle meshing of disks and parts of disks. + * :ref:`Use Faces/Edges to be Created Manually ` - to create a 1D or a 2D mesh in a python script. + * :ref:`Segments around Vertex ` - for defining the length of mesh segments around certain vertices. :ref:`constructing_meshes_page` page describes in detail how to apply meshing algorithms. @@ -82,16 +67,17 @@ There is also a number of more specific algorithms: .. toctree:: - :maxdepth: 2 - - quad_ijk_algo.rst - cartesian_algo.rst - prism_3d_algo.rst - quad_from_ma_algo.rst - projection_algos.rst - use_existing_algos.rst - radial_prism_algo.rst - radial_quadrangle_1D2D_algo.rst - define_mesh_by_script.rst - segments_around_vertex_algo.rst + :maxdepth: 2 + :hidden: + + quad_ijk_algo.rst + cartesian_algo.rst + prism_3d_algo.rst + quad_from_ma_algo.rst + projection_algos.rst + use_existing_algos.rst + radial_prism_algo.rst + radial_quadrangle_1D2D_algo.rst + define_mesh_by_script.rst + segments_around_vertex_algo.rst diff --git a/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst b/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst index 7fe6fac47..b7dce97e4 100644 --- a/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst +++ b/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst @@ -11,5 +11,5 @@ This mesh quality control highlights segments according to the number of element In this picture the borders at multi-connection are displayed in blue. -**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection` operation. +**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection` filter. diff --git a/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst b/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst index bc7e89bba..7494952c9 100644 --- a/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst +++ b/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst @@ -9,5 +9,4 @@ This mesh quality control highlights borders of faces (links between nodes) acco .. image:: ../images/image127.gif :align: center -**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection_2d` operation. - +**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection_2d` filter. diff --git a/doc/salome/gui/SMESH/input/building_compounds.rst b/doc/salome/gui/SMESH/input/building_compounds.rst index c2f922e10..8501ab7c6 100644 --- a/doc/salome/gui/SMESH/input/building_compounds.rst +++ b/doc/salome/gui/SMESH/input/building_compounds.rst @@ -7,43 +7,37 @@ Building Compound Meshes Compound Mesh is a combination of several meshes. All elements and groups present in input meshes are present in the compound mesh. However, it does not use geometry or hypotheses of the initial meshes. The links between the input meshes and the compound mesh are not supported, consequently the modification of an input mesh does not lead to the update of the compound mesh. -**To Build a compound mesh:** +*To Build a compound mesh:* -From the **Mesh** menu select **Build Compound** or click **"Build Compound Mesh"** button in the toolbar. +.. |img| image:: ../images/image161.png - .. image:: ../images/image161.png - :align: center - -**"Build Compound Mesh" button** - - -The following dialog box will appear: +From the **Mesh** menu select **Build Compound** or click *"Build Compound Mesh"* button |img| in the toolbar. The following dialog box will appear: .. image:: ../images/buildcompound.png :align: center - * **Name** - allows selecting the name of the resulting **Compound** mesh. - * **Meshes, sub-meshes, groups** - allows selecting the meshes, sub-meshes and groups to be concatenated. They can be chosen in the Object Browser while holding **Ctrl** button. - * **Processing identical groups** - allows selecting the method of processing the namesake groups existing in the input meshes. They can be either +* **Name** - allows selecting the name of the resulting **Compound** mesh. +* **Meshes, sub-meshes, groups** - allows selecting the meshes, sub-meshes and groups to be concatenated. They can be chosen in the Object Browser while holding **Ctrl** button. +* **Processing identical groups** - allows selecting the method of processing the namesake groups existing in the input meshes. They can be either - * **United** - all elements of **Group1** of **Mesh_1** and **Group1** of **Mesh_2** become the elements of **Group1** of the **Compound_Mesh**, or - * **Renamed** - **Group1** of **Mesh_1** becomes **Group1_1** and **Group1** of **Mesh_2** becomes **Group1_2**. + * **United** - all elements of *Group1* of *Mesh_1* and *Group1* of *Mesh_2* become the elements of *Group1* of the *Compound_Mesh*, or + * **Renamed** - *Group1* of *Mesh_1* becomes *Group1_1* and *Group1* of *Mesh_2* becomes *Group1_2*. - See :ref:`grouping_elements_page` for more information about groups. - * **Create groups from input objects** check-box permits to automatically create groups corresponding to every initial mesh. + See :ref:`grouping_elements_page` for more information about groups. +* **Create groups from input objects** check-box permits to automatically create groups corresponding to every initial mesh. .. image:: ../images/buildcompound_groups.png :align: center .. centered:: - "Groups created from input meshes 'Box_large' and 'Box_small'" + Groups created from input meshes 'Box_large' and 'Box_small' - * You can choose to additionally :ref:`merging_nodes_page`, :ref:`merging_elements_page` in the compound mesh, in which case it is possible to define the **Tolerance** for this operation. +* You can choose to additionally :ref:`Merge coincident nodes ` :ref:`and elements ` in the compound mesh, in which case it is possible to define the **Tolerance** for this operation. .. image:: ../images/image160.gif :align: center .. centered:: - "Example of a compound of two meshed cubes" + Example of a compound of two meshed cubes -**See Also** a sample :ref:`tui_building_compound`. +**See Also** a sample script of :ref:`tui_building_compound`. diff --git a/doc/salome/gui/SMESH/input/cartesian_algo.rst b/doc/salome/gui/SMESH/input/cartesian_algo.rst index 6d61ca87d..bde18de08 100644 --- a/doc/salome/gui/SMESH/input/cartesian_algo.rst +++ b/doc/salome/gui/SMESH/input/cartesian_algo.rst @@ -13,16 +13,17 @@ boundary. :align: center .. centered:: - "A sphere meshed by Body Fitting algorithm" + A sphere meshed by Body Fitting algorithm The meshing algorithm is as follows. -#. Lines of a Cartesian structured grid defined by :ref:`cartesian_hyp_anchor` hypothesis are intersected with the geometry boundary, thus nodes lying on the boundary are found. This step also allows finding out for each node of the Cartesian grid if it is inside or outside the geometry. +#. Lines of a Cartesian structured grid defined by :ref:`Body Fitting Parameters ` hypothesis are intersected with the geometry boundary, thus nodes lying on the boundary are found. This step also allows finding out for each node of the Cartesian grid if it is inside or outside the geometry. #. For each cell of the grid, check how many of its nodes are outside of the geometry boundary. Depending on a result of this check -#. skip a cell, if all its nodes are outside -#. skip a cell, if it is too small according to **Size Threshold** parameter -#. add a hexahedron in the mesh, if all nodes are inside -#. add a polyhedron or another cell type in the mesh, if some nodes are inside and some outside. + + * skip a cell, if all its nodes are outside + * skip a cell, if it is too small according to **Size Threshold** parameter + * add a hexahedron in the mesh, if all nodes are inside + * add a polyhedron or another cell type in the mesh, if some nodes are inside and some outside. To apply this algorithm when you define your mesh, select **Body Fitting** in the list of 3D algorithms and add **Body Fitting Parameters** hypothesis. The following dialog will appear: @@ -35,7 +36,7 @@ Body Fitting Parameters hypothesis :align: center .. centered:: - "Body Fitting Parameters hypothesis dialog" + Body Fitting Parameters hypothesis dialog This dialog allows to define @@ -47,14 +48,12 @@ This dialog allows to define :align: center .. centered:: - "Implement Edges switched off to the left and on to the right" + Implement Edges switched off to the left and on to the right * **Definition mode** allows choosing how Cartesian structured grid is defined. Location of nodes along each grid axis is defined individually: - * You can specify the **Coordinates** of grid nodes. **Insert** button inserts a node at **Step** distance (negative or positive) from the selected node. **Delete** button removes the selected node. Double click on a coordinate in the list enables its edition. - .. note:: - that node coordinates are measured along directions of axes that can differ from the directions of the Global Coordinate System. - * You can define the **Spacing** of a grid as an algebraic formula **f(t)** where *t* is a position along a grid axis normalized at [0.0,1.0]. **f(t)** must be non-negative at 0. <= *t* <= 1. The whole extent of geometry can be divided into ranges with their own spacing formulas to apply; a t varies between 0.0 and 1.0 within each **Range**. **Insert** button divides a selected range into two. **Delete** button adds the selected sub-range to the previous one. Double click on a range in the list enables edition of its right boundary. Double click on a function in the list enables its edition. + * You can specify the **Coordinates** of grid nodes. **Insert** button inserts a node at **Step** distance (negative or positive) from the selected node. **Delete** button removes the selected node. Double click on a coordinate in the list enables its edition. **Note** that node coordinates are measured along directions of axes that can differ from the directions of the Global Coordinate System. + * You can define the **Spacing** of a grid as an algebraic formula *f(t)* where *t* is a position along a grid axis normalized at [0.0,1.0]. *f(t)* must be non-negative at 0. <= *t* <= 1. The whole extent of geometry can be divided into ranges with their own spacing formulas to apply; a t varies between 0.0 and 1.0 within each **Range**. **Insert** button divides a selected range into two. **Delete** button adds the selected sub-range to the previous one. Double click on a range in the list enables edition of its right boundary. Double click on a function in the list enables its edition. * **Fixed Point** group allows defining an exact location of a grid node in the direction defined by spacing. The following cases are possible: diff --git a/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst b/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst index f97fcbf7b..61f979c7a 100644 --- a/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst +++ b/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst @@ -4,26 +4,22 @@ Changing orientation of elements ******************************** -Orientation of an element is changed by changing the order of its nodes. +Orientation of an element is changed by changing the :doc:`order ` of its nodes. -**To change orientation of elements:** +*To change orientation of elements:* -#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). -#. In the **Modification** menu select the **Orientation** item or click **Orientation** button in the toolbar. - - .. image:: ../images/image79.png - :align: center +.. |img| image:: ../images/image79.png - .. centered:: - **"Orientation" button** +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Orientation** item or click *Orientation* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/orientaation1.png :align: center * Select type of elements to reorient: **Face** or **Volume**. - * **The main list** shall contain the elements which will be reoriented. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of elements IDs. The **Set filter** button allows to apply a definite :ref:`filtering_elements` "filter" to the selection of elements. + * **The main list** shall contain the elements which will be reoriented. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of elements IDs. The **Set filter** button allows to apply a definite :ref:`filter ` to the selection of elements. * **Apply to all** radio button allows to modify the orientation of all elements of the selected mesh. * *Select from** set of fields allows to choose a sub-mesh or an existing group whose elements can be added to the list. diff --git a/doc/salome/gui/SMESH/input/clipping.rst b/doc/salome/gui/SMESH/input/clipping.rst index df466d24b..6cafd29c4 100644 --- a/doc/salome/gui/SMESH/input/clipping.rst +++ b/doc/salome/gui/SMESH/input/clipping.rst @@ -5,31 +5,33 @@ Clipping ******** **Clipping** allows creating cross-section views (clipping planes) of your mesh. -It is available as a sub-item in the context menu of an active mesh. -To create a clipping plane, click on the **New** button in the dialog and choose how it is defined: by **Absolute** or **Relative** coordinates. -**Absolute Coordinates** +It is available as a sub-item in the context menu of an active mesh in 3D Viewer. +To create a clipping plane, click on the **New** button in the dialog and choose how it is defined: by **Absolute** or **Relative** coordinates. -.. image:: ../images/Clipping_Absolute.png +* **Absolute Coordinates** + + .. image:: ../images/Clipping_Absolute.png :align: center -* **Base point** - allows defining the coordinates of the base point for the clipping plane. -* **Reset** - returns the base point to coordinate origin. -* **Direction** - allows defining the orientation of the clipping plane. -* **Invert** - allows selecting, which part of the object will be removed and which will remain after clipping. + * **Base point** - allows defining the coordinates of the base point for the clipping plane. + * **Reset** - returns the base point to the coordinate origin. + * **Direction** - allows defining the orientation of the clipping plane. + * **Invert** - allows selecting, which part of the object will be removed and which will remain after clipping. -**Relative mode** +* **Relative mode** -.. image:: ../images/Clipping_Relative.png + .. image:: ../images/Clipping_Relative.png :align: center -* **Orientation** ( ||X-Y, ||X-Z or ||Y-Z). -* **Distance** between the opposite extremities of the boundary box of selected objects, if it is set to 0.5 the boundary box is split in two halves. -* **Rotation** (in angle degrees) **around X** (Y to Z) and **around Y** (X to Z) (depending on the chosen Orientation) + * **Orientation** ( ||X-Y, ||X-Z or ||Y-Z). + * **Distance** between the opposite extremities of the boundary box of selected objects, if it is set to 0.5 the boundary box is split in two halves. + * **Rotation** (in angle degrees) **around X** (Y to Z) and **around Y** (X to Z) (depending on the chosen Orientation) .. image:: ../images/before_clipping_preview.png :align: center -"The preview plane and the cut object" + .. centered:: + The preview plane and the cut object The other parameters are available in both modes : @@ -39,20 +41,20 @@ The other parameters are available in both modes : * **Show preview** check-box shows the clipping plane in the **3D Viewer**. * **Auto Apply** check-box shows button is on, you can preview the cross-section in the **3D Viewer**. -It is also possible to interact with the clipping plane directly in 3D view using the mouse. +It is also possible to interact with the clipping plane directly in 3D view using the mouse. -To get a new object from **Clipping**, click **Apply**. +To get an object clipped, click **Apply**. **Examples:** .. image:: ../images/dataset_clipping.png :align: center -"The cross-section using dataset" + .. centered:: + The cross-section using dataset .. image:: ../images/opengl_clipping.png :align: center -"The OpenGL cross-section" - - + .. centered:: + The OpenGL cross-section diff --git a/doc/salome/gui/SMESH/input/colors_size.rst b/doc/salome/gui/SMESH/input/colors_size.rst index b3606c637..56a9ab18c 100644 --- a/doc/salome/gui/SMESH/input/colors_size.rst +++ b/doc/salome/gui/SMESH/input/colors_size.rst @@ -13,7 +13,7 @@ The GUI elements in the "Properties" dialog box are grouped according to the ent * **Nodes**: * **Color** - color of nodes. - * **Type** and **Scale** - these options allow changing the nodes representation (see :ref:point_marker_page "Point Marker" page for more details). + * **Type** and **Scale** - these options allow changing the nodes representation (see :ref:`point_marker_page` page for more details). * **Edges / wireframe**: * **Color** - color of element borders in wireframe mode. * **Width** - width of lines (edges and borders of elements in wireframe mode). @@ -39,3 +39,7 @@ The GUI elements in the "Properties" dialog box are grouped according to the ent * **3D vectors** - allows to choose between 2D planar and 3D vectors. * **Shrink coef.** - relative space of elements compared to gaps between them in shrink mode. +.. toctree:: + :hidden: + + point_marker.rst diff --git a/doc/salome/gui/SMESH/input/constructing_meshes.rst b/doc/salome/gui/SMESH/input/constructing_meshes.rst index 276d3a7c7..bb269953a 100644 --- a/doc/salome/gui/SMESH/input/constructing_meshes.rst +++ b/doc/salome/gui/SMESH/input/constructing_meshes.rst @@ -8,16 +8,22 @@ To create a mesh on geometry, it is necessary to create a mesh object by choosin * a geometrical shape produced in the Geometry module (*main shape*); * *meshing parameters*, including - * :ref:`basic_meshing_algos_page` and - * :ref:`about_hypo_page` specifying constraints to be taken into account by the chosen meshing algorithms. -Then you can launch mesh generation by invoking :ref:`compute_anchor` command. + * :ref:`meshing algorithms ` and + * :ref:`hypotheses ` specifying constraints to be taken into account by the chosen meshing algorithms. + +Then you can launch mesh generation by invoking :ref:`Compute ` command. The generated mesh will be automatically shown in the Viewer. You can switch off automatic visualization or limit mesh size until which it is -automatically shown in :ref:`mesh_preferences_page` (**Automatic update** entry). +automatically shown in :ref:`mesh_preferences_page` (*Automatic update* entry). -.. note:: - Sometimes *hypotheses* term is used to refer to both algorithms and hypotheses. +Read more about meshing parameters: + +.. toctree:: + :maxdepth: 1 + + basic_meshing_algos.rst + about_hypo.rst Mesh generation on the geometry is performed in the bottom-up flow: nodes on vertices are created first, then edges are divided into @@ -37,21 +43,21 @@ re-computed). An algorithm of a certain dimension chosen at mesh creation is applied to discretize every sub-shape of this dimension. It is possible to specify a different algorithm or hypothesis to be applied to one or -a group of sub-shapes by creating a :ref:`constructing_submeshes_page`. +a group of sub-shapes by creating a :ref:`sub-mesh `. You can specify no algorithms at all at mesh object creation and specify the meshing parameters on sub-meshes only; then only the sub-shapes, for which an algorithm and a hypothesis (if any) have been defined will be discretized. -.. note:: Construction of a mesh on a geometry includes at least two (:ref:`create_mesh_anchor` and :ref:`compute_anchor`) of the following steps: +Construction of a mesh on a geometry includes at least two (:ref:`mesh creation ` and :ref:`computing `) of the following steps: - * :ref:`create_mesh_anchor`, where you can specify meshing parameters to apply to all sub-shapes of the main shape. - * :ref:`constructing_submeshes_page`, (optional) where you can specify meshing parameters to apply to the selected sub-shapes. - * :ref:`evaluate_anchor` (optional) can be used to know an approximate number of elements before their actual generation. - * :ref:`preview_anchor` (optional) can be used to generate mesh of only lower dimension(s) in order to visually estimate it before full mesh generation, which can be much longer. - * :ref:`submesh_order_anchor` (optional) can be useful if there are concurrent sub-meshes defined. - * :ref:`compute_anchor` uses defined meshing parameters to generate mesh elements. - * :ref:`edit_anchor` (optional) can be used to :ref:`modifying_meshes_page` the mesh of a lower dimension before :ref:`compute_anchor` elements of an upper dimension. +* :ref:`create_mesh_anchor`, where you can specify meshing parameters to apply to all sub-shapes of the main shape. +* :ref:`Creation of sub-meshes `, (optional) where you can specify meshing parameters to apply to the selected sub-shapes. +* :ref:`evaluate_anchor` (optional) can be used to know an approximate number of elements before their actual generation. +* :ref:`preview_anchor` (optional) can be used to generate mesh of only lower dimension(s) in order to visually estimate it before full mesh generation, which can be much longer. +* :ref:`submesh_order_anchor` (optional) can be useful if there are concurrent sub-meshes defined. +* :ref:`compute_anchor` uses defined meshing parameters to generate mesh elements. +* :ref:`edit_anchor` (optional) can be used to :ref:`modify ` the mesh of a lower dimension before :ref:`computing ` elements of an upper dimension. .. _create_mesh_anchor: @@ -59,94 +65,80 @@ have been defined will be discretized. Creation of a mesh object ######################### -**To construct a mesh:** +To construct a mesh: -#. Select a geometrical object for meshing. -#. In the **Mesh** menu select **Create Mesh** or click **"Create Mesh"** button in the toolbar. - - .. image:: ../images/image32.png - :align: center +.. |img| image:: ../images/image32.png +.. |sel| image:: ../images/image120.png +.. |add| image:: ../images/image121.png +.. |edt| image:: ../images/image122.png +.. |cmp| image:: ../images/image28.png +.. |prv| image:: ../images/mesh_precompute.png - .. centered:: - **"Create Mesh" button** +#. Select a geometrical object for meshing. +#. In the **Mesh** menu select **Create Mesh** or click *"Create Mesh"* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/createmesh-inv.png :align: center #. To filter off irrelevant meshing algorithms, you can select **Mesh Type** in the corresponding list from **Any, Hexahedral, Tetrahedral, Triangular** and **Quadrilateral** (there can be less items for the geometry of lower dimensions). Selection of a mesh type hides all meshing algorithms that cannot generate elements of this type. -#. Apply :ref:`basic_meshing_algos_page` and :ref:`about_hypo_page` which will be used to compute this mesh. - - "Create mesh" dialog box contains several tab pages titled **3D**, **2D**, **1D** and **0D**. The title of each page reflects the dimension of the sub-shapes the algorithms listed on this page affect and the maximal dimension of elements the algorithms generate. For example, **3D** page lists the algorithms that affect 3D sub-shapes (solids) and generate 3D mesh elements (tetrahedra, hexahedra etc.) - - As soon as you have selected an algorithm, you can create a hypothesis (or select an already created one). A set of accessible hypotheses includes only the hypotheses that can be used by the selected algorithm. - - .. note:: - * Some page(s) can be disabled if the geometrical object does not include shapes (sub-shapes) of the corresponding dimension(s). For example, if the input object is a geometrical face, **3D** page is disabled. - * Some algorithms affect the geometry of several dimensions, i.e. 1D+2D or 1D+2D+3D. If such an algorithm is selected, the dialog pages related to the corresponding lower dimensions are disabled. - * **0D** page refers to 0D geometry (vertices) rather than to 0D elements. Mesh module does not provide algorithms that produce 0D elements. Currently **0D** page provides only one algorithm "Segments around vertex" that allows specifying the required size of mesh edges about the selected vertex (or vertices). +#. Apply :ref:`meshing algorithms ` and :ref:`hypotheses ` which will be used to compute this mesh. - For example, you need to mesh a 3D object. + "Create mesh" dialog box contains several tab pages titled **3D**, **2D**, **1D** and **0D**. The title of each page reflects the dimension of the sub-shapes the algorithms listed on this page affect and the maximal dimension of elements the algorithms generate. For example, **3D** page lists the algorithms that affect 3D sub-shapes (solids) and generate 3D mesh elements (tetrahedra, hexahedra etc.) - First, you can change a default name of your mesh in the **Name** box. Then check that the selected geometrical object indicated in **Geometry** field, is what you wish to mesh; if not, select the correct object in the Object Browser. Click "Select" button near **Geometry** field if the name of the object has not yet appeared in **Geometry** field. - .. image:: ../images/image120.png - :align: center + As soon as you have selected an algorithm, you can create a hypothesis (or select an already created one). A set of accessible hypotheses includes only the hypotheses that can be used by the selected algorithm. - .. centered:: - **"Select" button** + .. note:: + * Some page(s) can be disabled if the geometrical object does not include shapes (sub-shapes) of the corresponding dimension(s). For example, if the input object is a geometrical face, **3D** page is disabled. + * Some algorithms affect the geometry of several dimensions, i.e. 1D+2D or 1D+2D+3D. If such an algorithm is selected, the dialog pages related to the corresponding lower dimensions are disabled. + * **0D** page refers to 0D geometry (vertices) rather than to 0D elements. Mesh module does not provide algorithms that produce 0D elements. Currently **0D** page provides only one algorithm "Segments around vertex" that allows specifying the required size of mesh edges about the selected vertex (or vertices). - Now you can define 3D Algorithm and 3D Hypotheses, which will be applied to discretize the solids of your geometrical object using 3D elements. Click the **"Add Hypothesis"** button to create and add a hypothesis. - .. image:: ../images/image121.png - :align: center + For example, you need to mesh a 3D object. - .. centered:: - **"Add Hypothesis" button** + First, you can change a default name of your mesh in the **Name** box. Then check that the selected geometrical object indicated in **Geometry** field, is what you wish to mesh; if not, select the correct object in the Object Browser. Click "Select" button |sel| near **Geometry** field if the name of the object has not yet appeared in **Geometry** field. - Click the **"Plus"** button to enable adding more additional hypotheses. + Now you can define 3D Algorithm and 3D Hypotheses, which will be applied to discretize the solids of your geometrical object using 3D elements. Click the *"Add Hypothesis"* button |add| to create and add a hypothesis. - Click the **"Edit Hypothesis"** button to change the values for the current hypothesis. - .. image:: ../images/image122.png - :align: center + Click the *"Plus"* button to enable adding more additional hypotheses. - .. centered:: - **"Edit Hypothesis" button** + Click the *"Edit Hypothesis"* button |edt| to change the values for the current hypothesis. - Most 2D and 3D algorithms can work without hypotheses using default meshing parameters. Some algorithms do not require any hypotheses. After selection of an algorithm "Hypothesis" field of the dialog can contain: + Most 2D and 3D algorithms can work without hypotheses using default meshing parameters. Some algorithms do not require any hypotheses. After selection of an algorithm "Hypothesis" field of the dialog can contain: - * **\** if the algorithm can work using default parameters. - * **\** if the algorithm requires a hypothesis defining its parameters. - * If the algorithm does not use hypotheses, this field is grayed. + * *\* if the algorithm can work using default parameters. + * *\* if the algorithm requires a hypothesis defining its parameters. + * If the algorithm does not use hypotheses, this field is grayed. - After selection of an algorithm **Add. Hypothesis** field can contain: + After selection of an algorithm **Add. Hypothesis** field can contain: - * **\** if the algorithm can be tuned using an additional hypothesis. - * If the algorithm does not use additional hypotheses, this field is grayed. + * *\* if the algorithm can be tuned using an additional hypothesis. + * If the algorithm does not use additional hypotheses, this field is grayed. - Proceed in the same way with 2D and 1D Algorithms and Hypotheses that will be used to mesh faces and edges of your geometry. (Note that any object has edges, even if their existence is not apparent, for example, a sphere has 4 edges). Note that the choice of hypotheses and lower dimension algorithms depends on the higher dimension algorithm. + Proceed in the same way with 2D and 1D Algorithms and Hypotheses that will be used to mesh faces and edges of your geometry. (Note that any object has edges, even if their existence is not apparent, for example, a sphere has 4 edges). Note that the choice of hypotheses and lower dimension algorithms depends on the higher dimension algorithm. - If you wish you can select other algorithms and/or hypotheses for meshing some sub-shapes of your CAD model by :ref:`constructing_submeshes_page`. + If you wish you can select other algorithms and/or hypotheses for meshing some sub-shapes of your CAD model by :ref:`constructing_submeshes_page`. - Some algorithms generate mesh of several dimensions, while others produce mesh of only one dimension. In the latter case there must be one Algorithm and zero or several Hypotheses for each dimension of your object, otherwise you will not get any mesh at all. Of course, if you wish to mesh a face, which is a 2D object, you do not need to define a 3D Algorithm and Hypotheses. + Some algorithms generate mesh of several dimensions, while others produce mesh of only one dimension. In the latter case there must be one Algorithm and zero or several Hypotheses for each dimension of your object, otherwise you will not get any mesh at all. Of course, if you wish to mesh a face, which is a 2D object, you do not need to define a 3D Algorithm and Hypotheses. - In the **Object Browser** the structure of the new mesh is displayed as follows: + In the **Object Browser** the structure of the new mesh is displayed as follows: .. image:: ../images/image88.jpg :align: center - It contains: + It contains: - * a mesh name (**Mesh_mechanic**); - * a reference to the geometrical object on the basis of which the mesh has been constructed (*mechanic*); - * **Applied hypotheses** folder containing the references to the hypotheses chosen at the construction of the mesh; - * **Applied algorithms** folder containing the references to the algorithms chosen at the construction of the mesh. - * **SubMeshes on Face** folder containing the sub-meshes defined on geometrical faces. There also can be folders for sub-meshes on vertices, edges, wires, shells, solids and compounds. - * **Groups of Faces** folder containing the groups of mesh faces. There also can be folders for groups of nodes, edges, volumes 0D elements and balls. + * a mesh name (*Mesh_mechanic*); + * a reference to the geometrical object on the basis of which the mesh has been constructed (*mechanic*); + * **Applied hypotheses** folder containing the references to the hypotheses chosen at the construction of the mesh; + * **Applied algorithms** folder containing the references to the algorithms chosen at the construction of the mesh. + * **SubMeshes on Face** folder containing the sub-meshes defined on geometrical faces. There also can be folders for sub-meshes on vertices, edges, wires, shells, solids and compounds. + * **Groups of Faces** folder containing the groups of mesh faces. There also can be folders for groups of nodes, edges, volumes 0D elements and balls. - There is an alternative way to assign Algorithms and Hypotheses by clicking **Assign a set of hypotheses** button and selecting among pre-defined sets of algorithms and hypotheses. In addition to the built-in sets of hypotheses, it is possible to create custom sets by editing CustomMeshers.xml file located in the home directory. CustomMeshers.xml file must describe sets of hypotheses in the same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml file does (sets of hypotheses are enclosed between \ tags). For example: + There is an alternative way to assign Algorithms and Hypotheses by clicking **Assign a set of hypotheses** button and selecting among pre-defined sets of algorithms and hypotheses. In addition to the built-in sets of hypotheses, it is possible to create custom sets by editing CustomMeshers.xml file located in the home directory. CustomMeshers.xml file must describe sets of hypotheses in the same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml file does (sets of hypotheses are enclosed between \ tags). For example: :: @@ -159,26 +151,27 @@ Creation of a mesh object - If the file contents are incorrect, there can be an error at activation of Mesh module: **"fatal parsing error: error triggered by consumer in line ..."** + If the file contents are incorrect, there can be an error at activation of Mesh module: *"fatal parsing error: error triggered by consumer in line ..."* .. image:: ../images/hypo_sets.png :align: center - List of sets of hypotheses. Tag **[custom]** is automatically added to the sets defined by the user. + .. centered:: + List of sets of hypotheses. Tag *[custom]* is automatically added to the sets defined by the user. - .. note:: - * *"Automatic"* in the names of predefined sets of hypotheses does not actually mean that they are suitable for meshing any geometry. - * The list of sets of hypotheses can be shorter than in the above image depending on the geometry dimension. + .. note:: + * *"Automatic"* in the names of predefined sets of hypotheses does not actually mean that they are suitable for meshing any geometry. + * The list of sets of hypotheses can be shorter than in the above image depending on the geometry dimension. -Consider trying a sample script for construction of a mesh from our :ref:`tui_creating_meshes_page` section. +Consider trying a sample script for construction of a mesh from our :ref:`TUI Scripts ` section. .. _evaluate_anchor: Evaluating mesh size #################### -After the mesh object is created and all hypotheses are assigned and before :ref:`compute_anchor` operation, it is possible to calculate the eventual mesh size. For this, select the mesh in the **Object Browser** and from the **Mesh** menu select **Evaluate**. +After the mesh object is created and all hypotheses are assigned and before :ref:`Compute ` operation, it is possible to calculate the eventual mesh size. For this, select the mesh in the **Object Browser** and from the **Mesh** menu select **Evaluate**. The result of evaluation will be displayed in the following information box: .. image:: ../images/mesh_evaluation_succeed.png @@ -189,15 +182,9 @@ The result of evaluation will be displayed in the following information box: Previewing the mesh ################### -Before :ref:`compute_anchor` , it is also possible to see the mesh preview. This operation allows to incrementally compute the mesh, dimension by dimension, and to discard an unsatisfactory mesh. +Before :ref:`the mesh computation `, it is also possible to see the mesh preview. This operation allows to incrementally compute the mesh, dimension by dimension, and to discard an unsatisfactory mesh. -For this, select the mesh in the Object Browser. From the **Mesh** menu select **Preview** or click "Preview" button in the toolbar or activate "Preview" item from the pop-up menu. - -.. image:: ../images/mesh_precompute.png - :align: center - -.. centered:: - **"Preview" button** +For this, select the mesh in the Object Browser. From the **Mesh** menu select **Preview** or click "Preview" button |prv| in the toolbar or activate "Preview" item from the pop-up menu. Select **1D mesh** or **2D mesh** preview mode in the Preview dialog. @@ -205,14 +192,14 @@ Select **1D mesh** or **2D mesh** preview mode in the Preview dialog. :align: center .. centered:: - "1D mesh preview shows nodes computed on geometry edges" + 1D mesh preview shows nodes computed on geometry edges .. image:: ../images/preview_mesh_2D.png :align: center .. centered:: - "2D mesh preview shows edge mesh elements, computed on geometry faces" + 2D mesh preview shows edge mesh elements, computed on geometry faces **Compute** button computes the whole mesh. @@ -230,33 +217,33 @@ These elements can be kept in the mesh. Changing sub-mesh priority ########################## -If the mesh contains concurrent :ref:`constructing_submeshes_page`, it is possible to change the priority of their computation, i.e. to change the priority of applying algorithms to the shared sub-shapes of the Mesh shape. +If the mesh contains concurrent :ref:`sub-meshes `, it is possible to change the priority of their computation, i.e. to change the priority of applying algorithms to the shared sub-shapes of the Mesh shape. -**To change sub-mesh priority:** +*To change sub-mesh priority:* -Choose "Change sub-mesh priority" from the Mesh menu or a pop-up menu. The opened dialog shows a list of sub-meshes in the order of their priority. +Choose **Change sub-mesh priority** from the **Mesh** menu or a pop-up menu. The opened dialog shows a list of sub-meshes in the order of their priority. There is an example of sub-mesh order modifications taking a Mesh created on a Box shape. The main Mesh object: -* *1D* **Wire discretisation** with **Number of Segments** =20 +* *1D* **Wire discretisation** with **Number of Segments** = 20 * *2D* **Triangle: Mefisto** with Hypothesis **Max Element Area** The first sub-mesh **Submesh_1** created on **Face_1** is: -* *1D* **Wire discretisation** with **Number of Segments** =4 -* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 +* *1D* **Wire discretisation** with **Number of Segments** = 4 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200 The second sub-mesh **Submesh_2** created on **Face_2** is: -* *1D* **Wire discretisation** with **Number of Segments** =8 -* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 +* *1D* **Wire discretisation** with **Number of Segments** = 8 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200 And the last sub-mesh **Submesh_3** created on **Face_3** is: -* *1D* **Wire discretisation** with **Number of Segments** =12 -* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 +* *1D* **Wire discretisation** with **Number of Segments** = 12 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200 The sub-meshes become concurrent if they share sub-shapes that can be meshed with different algorithms (or different hypotheses). In the example, we have three sub-meshes with concurrent algorithms, because they have different hypotheses. @@ -267,14 +254,14 @@ The first mesh computation is made with: :align: center .. centered:: - **"Mesh order SubMesh_1, SubMesh_2, SubMesh_3"** + Mesh order SubMesh_1, SubMesh_2, SubMesh_3 .. image:: ../images/mesh_order_123_res.png :align: center .. centered:: - **"Result mesh with order SubMesh_1, SubMesh_2, SubMesh_3 "** + Result mesh with order SubMesh_1, SubMesh_2, SubMesh_3 The next mesh computation is made with: @@ -282,13 +269,13 @@ The next mesh computation is made with: :align: center .. centered:: - **"Mesh order SubMesh_2, SubMesh_1, SubMesh_3"** + Mesh order SubMesh_2, SubMesh_1, SubMesh_3 .. image:: ../images/mesh_order_213_res.png :align: center .. centered:: - **"Result mesh with order SubMesh_2, SubMesh_1, SubMesh_3 "** + Result mesh with order SubMesh_2, SubMesh_1, SubMesh_3 And the last mesh computation is made with: @@ -296,14 +283,14 @@ And the last mesh computation is made with: :align: center .. centered:: - **"Mesh order SubMesh_3, SubMesh_2, SubMesh_1"** + Mesh order SubMesh_3, SubMesh_2, SubMesh_1 .. image:: ../images/mesh_order_321_res.png :align: center .. centered:: - **"Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1 "** + Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1 As we can see, each mesh computation has a different number of result elements and a different mesh discretization on the shared edges (the edges @@ -318,7 +305,7 @@ modifying the order of sub-meshes. :align: center .. centered:: - **"Preview with sub-mesh priority list box"** + Preview with sub-mesh priority list box If there are no concurrent sub-meshes under the Mesh object, the user will see the following information. @@ -327,7 +314,7 @@ will see the following information. :align: center .. centered:: - **"No concurrent submeshes detected"** + No concurrent submeshes detected .. _compute_anchor: @@ -335,17 +322,11 @@ will see the following information. Computing the mesh ################## -It is equally possible to skip :ref:`evaluate_anchor` -and :ref:`preview_anchor` and to **Compute** the mesh after +It is equally possible to skip :ref:`Evaluation ` +and :ref:`Preview ` and to **Compute** the mesh after the hypotheses are assigned. For this, select your mesh in -the **Object Browser**. From the **Mesh** menu or the context menu -select **Compute** or click *"Compute"* button of the toolbar. - -.. image:: ../images/image28.png - :align: center - -.. centered:: - **"Compute" button** +the Object Browser. From the **Mesh** menu or the context menu +select **Compute** or click *"Compute"* button |cmp| of the toolbar. After the mesh computation finishes, the Mesh Computation information box appears. If you close this box and click "Compute" button again, @@ -356,9 +337,6 @@ with the same contents. (To fully re-compute the mesh, invoke .. _meshing_result_anchor: -Meshing Results -=============== - If the mesh computation has been a success, the box shows information on the number of entities of different types in the mesh. .. image:: ../images/meshcomputationsucceed.png @@ -366,9 +344,6 @@ If the mesh computation has been a success, the box shows information on the num .. _meshing_failed_anchor: -Meshing Failed -============== - If the mesh computation has failed, the information about the cause of the failure is provided in **Errors** table. .. image:: ../images/meshcomputationfail.png @@ -405,31 +380,26 @@ the visualization of faces and volumes (if any). Edges bounding a hole in the surface are shown in magenta using **Show bad Mesh** button .. note:: - Mesh Computation Information box does not appear if you set :ref:`show_comp_result_pref` preference to the "Never" value. This option gives the possibility to control mesh computation reporting. There are the following possibilities: always show the information box, show only if an error occurs or never. By default, the information box is always shown after mesh computation operation. + Mesh Computation Information box does not appear if you set :ref:`Mesh computation/Show a computation result notification ` preference to the "Never" value. This option gives the possibility to control mesh computation reporting. There are the following possibilities: always show the information box, show only if an error occurs or never. By default, the information box is always shown after mesh computation operation. .. _edit_anchor: Editing the mesh ################ -It is possible to :ref:`modifying_meshes_page` of a +It is possible to :ref:`edit the mesh ` of a lower dimension before generation of the mesh of a higher dimension. -For example you can generate a 2D mesh, modify it using e.g. :ref:`pattern_mapping_page`, and then generate a 3D mesh basing on the modified 2D mesh. The workflow is as follows: +For example you can generate a 2D mesh, modify it using e.g. :ref:`Pattern mapping `, and then generate a 3D mesh basing on the modified 2D mesh. The workflow is as follows: * Define 1D and 2D meshing algorithms. * Compute the mesh. 2D mesh is generated. -* Apply :ref:`pattern_mapping_page`. +* Apply :ref:`Pattern mapping `. * Define 3D meshing algorithms without modifying 1D and 2D algorithms and hypotheses. -* Compute the mesh. 3D mesh is generated. +* Compute the mesh. 3D mesh is generated basing on a modified 2D mesh. .. note:: - Nodes and elements added :ref:`adding_nodes_and_elements_page` cannot be used in this workflow because the manually created entities are not attached to any geometry and thus (usually) cannot be found by the mesher paving a geometry. + Nodes and elements added :ref:`manually ` cannot be used in this workflow because the manually created entities are not attached to any geometry and thus (usually) cannot be found by the mesher paving a geometry. **See Also** a sample TUI Script demonstrates the possibility of :ref:`tui_editing_while_meshing`. -.. toctree:: - :maxdepth: 2 - - basic_meshing_algos.rst - about_hypo.rst diff --git a/doc/salome/gui/SMESH/input/constructing_submeshes.rst b/doc/salome/gui/SMESH/input/constructing_submeshes.rst index 3f414135d..974b27916 100644 --- a/doc/salome/gui/SMESH/input/constructing_submeshes.rst +++ b/doc/salome/gui/SMESH/input/constructing_submeshes.rst @@ -6,6 +6,9 @@ Constructing sub-meshes .. contents:: `Table of contents` +What the sub-mesh is for +######################## + By purpose, the sub-mesh is an object used to assign to a sub-shape different meshing parameters than those assigned to the main shape. @@ -30,10 +33,10 @@ How to get a sub-shape for sub-mesh construction A sub-shape to create a sub-mesh on should be retrieved from the main shape in one of the following ways: - * In Geometry module, via **New Entity > Explode** menu. - * In Geometry module, by creation of a group (**New Entity > Group > Create Group** menu). - * In Mesh module, by :ref:`subshape_by_mesh_elem` generated on a sub-shape of interest. This way is accessible if the mesh is already computed. - * In Mesh module, by clicking **Publish Sub-shape** button in a dialog showing :ref:`meshing_failed_anchor`. +* In Geometry module, via **New Entity > Explode** menu. +* In Geometry module, by creation of a group (**New Entity > Group > Create Group** menu). +* In Mesh module, by :ref:`selecting a mesh element ` generated on a sub-shape of interest. This way is accessible if the mesh is already computed. +* In Mesh module, by clicking **Publish Sub-shape** button in a dialog showing :ref:`meshing errors `. .. :submesh_priority: @@ -47,15 +50,15 @@ compound of solids, starts from searching an algorithm, 1D as for the edge. The following sub-shapes are sequentially checked for presence of a sub-mesh where 1D algorithm is assigned: - * the **edge** itself - * **groups of edges** containing the edge, if any - * **wires** sharing the edge - * **faces** sharing the edge - * **groups of faces** sharing the edge, if any - * **shells** sharing the edge - * **solids** sharing the edge - * **groups of solids** sharing the edge, if any - * the **main shape** +* the **edge** itself +* **groups of edges** containing the edge, if any +* **wires** sharing the edge +* **faces** sharing the edge +* **groups of faces** sharing the edge, if any +* **shells** sharing the edge +* **solids** sharing the edge +* **groups of solids** sharing the edge, if any +* the **main shape** (This sequence of sub-shapes defines the priority of sub-meshes. Thus more local, i.e. assigned to sub-shape of lower dimension, algorithms and @@ -73,7 +76,7 @@ same priority. If meshing parameters are defined on sub-meshes of the same priority, for example, different 1D hypotheses are assigned to two faces sharing an edge, the hypothesis assigned to a sub-shape with a lower ID will -be used for meshing. You can :ref:`submesh_order_anchor` mutual +be used for meshing. You can :ref:`change ` mutual priority of such concurrent sub-meshes. .. _submesh_definition: @@ -81,35 +84,31 @@ priority of such concurrent sub-meshes. How to construct a sub-mesh ########################### -.. note:: Construction of a sub-mesh consists of: - * Selecting a mesh which will encapsulate the sub-mesh - * Selecting a sub-shape for meshing - * Applying one or several :ref:`about_hypo_page` and :ref:`basic_meshing_algos_page` which will be used for discretization of this sub-shape. +Construction of a sub-mesh consists of: +* Selecting a mesh which will encapsulate the sub-mesh. +* Selecting a sub-shape for meshing. +* Selecting a :ref:`meshing algorithm ` which will be used for discretization of this sub-shape. +* Creating or selecting one or several :ref:`hypotheses `. -**To construct a sub-mesh:** -From the **Mesh** menu select **Create Sub-mesh** or click **"Create Sum-mesh"** button in the toolbar. - .. image:: ../images/image33.gif - :align: center +*To construct a sub-mesh:* + +.. |img| image:: ../images/image33.gif - .. centered:: - **"Create Sub-mesh" button** +From the **Mesh** menu select **Create Sub-mesh** or click *"Create Sum-mesh"* button |img| in the toolbar. The following dialog box will appear: .. image:: ../images/createmesh-inv2.png :align: center -It allows to define the **Name**, the parent **Mesh** and the **Geometry** (e.g. a face if the parent mesh has been built on box) of the sub-mesh. You can define meshing algorithms and hypotheses in the same way as in :ref:`constructing_meshes_page` dialog. +It allows to define the **Name**, the parent **Mesh** and the **Geometry** (e.g. a face if the parent mesh has been built on box) of the sub-mesh. You can define meshing algorithms and hypotheses in the same way as in :ref:`Create mesh ` dialog. -Later you can change the applied hypotheses or their parameters in :ref:`editing_meshes_page` dialog. Mesh entities generated using changed hypotheses are automatically removed. +Later you can change the applied hypotheses or their parameters in :ref:`Edit mesh/sub-mesh ` dialog. Mesh entities generated using changed hypotheses are automatically removed. .. _subshape_by_mesh_elem: -Subshape by mesh element -======================== - If the parent mesh is already computed, then you can define the **Geometry** by picking mesh elements computed on a sub-shape of interest in the 3D Viewer, i.e. you do not have to extract this sub-shape in Geometry module beforehand. To start element selection, press *Selection* button to the right of **Geometry** label. If this button is already down, then click it to release and then click it again. The following pop-up menu allowing to choose a way of geometry definition will appear. .. image:: ../images/choose_geom_selection_way.png @@ -135,10 +134,11 @@ In the Object Browser the structure of the new sub-mesh will be displayed as fol :align: center It contains: - * a sub-mesh name (*SubMeshFace1*) - * a reference to the geometrical object on the basis of which the sub-mesh has been constructed (**Cylindrical Face_1**); - * **Applied hypotheses** folder containing references to hypotheses assigned to the sub-mesh; - * **Applied algorithms** folder containing references to algorithms assigned to the sub-mesh. + +* a sub-mesh name (*SubMeshFace1*) +* a reference to the geometrical object on the basis of which the sub-mesh has been constructed (*Cylindrical Face_1*); +* *Applied hypotheses* folder containing references to hypotheses assigned to the sub-mesh; +* *Applied algorithms* folder containing references to algorithms assigned to the sub-mesh. **See Also** a sample TUI Script of a :ref:`tui_construction_submesh` operation. diff --git a/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst index 0fa226cfb..cd2a3e8ca 100644 --- a/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst +++ b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst @@ -11,26 +11,22 @@ This functionality allows transforming linear meshes (or sub-meshes) to quadrati See :ref:`adding_quadratic_elements_page` for more information about quadratic meshes. -**To produce a conversion:** +*To produce a conversion:* -#. Select a mesh or a sub-mesh in the Object Browser or in the Viewer. -#. From the Modification menu or from the contextual menu in the Object Browser choose **Convert to/from Quadratic Mesh** item, or click **"Convert to/from quadratic"** button in the toolbar. - - .. image:: ../images/image154.png - :align: center +.. |img| image:: ../images/image154.png - .. centered:: - **"Convert to/from quadratic" button** +#. Select a mesh or a sub-mesh in the Object Browser or in the Viewer. +#. From the Modification menu or from the contextual menu in the Object Browser choose **Convert to/from Quadratic Mesh** item, or click *"Convert to/from quadratic"* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/convert.png :align: center #. In this dialog box specify: - * If it is necessary to convert a linear mesh to quadratic or a quadratic mesh to linear. **Convert to bi-quadratic** creates some types of quadratic elements with additional central nodes: TRIA7, QUAD9 and HEXA27 elements instead of TRIA6, QUAD8, and HEXA20 elements respectively. - * If it is necessary to place **medium nodes** of the quadratic mesh **on the geometry** (meshed shape). This option is relevant for conversion to quadratic provided that the mesh is based on a geometry (not imported from file). + * If it is necessary to convert a linear mesh to quadratic or a quadratic mesh to linear. **Convert to bi-quadratic** creates some types of quadratic elements with additional central nodes: TRIA7, QUAD9 and HEXA27 elements instead of TRIA6, QUAD8, and HEXA20 elements respectively. + * If it is necessary to place **medium nodes** of the quadratic mesh **on the geometry** (meshed shape). This option is relevant for conversion to quadratic provided that the mesh is based on a geometry (not imported from file). .. image:: ../images/image156.gif :align: center @@ -46,7 +42,7 @@ See :ref:`adding_quadratic_elements_page` for more information about quadratic m Quadratic mesh - * Click the **Apply** or **Apply and Close** button. +#. Click the **Apply** or **Apply and Close** button. **See Also** a sample TUI Script of a :ref:`tui_quadratic` operation. diff --git a/doc/salome/gui/SMESH/input/copy_mesh.rst b/doc/salome/gui/SMESH/input/copy_mesh.rst index 0f542df43..7d49ed37b 100644 --- a/doc/salome/gui/SMESH/input/copy_mesh.rst +++ b/doc/salome/gui/SMESH/input/copy_mesh.rst @@ -6,15 +6,11 @@ Copy Mesh A mesh can be created by copying a part of or the whole other mesh. -**To make a copy of a mesh:** +*To make a copy of a mesh:* -From the contextual menu in the Object Browser of from the **Mesh** menu select **Copy Mesh** or click **"Copy Mesh"** button in the toolbar. +.. |img| image:: ../images/copy_mesh_icon.png -.. image:: ../images/copy_mesh_icon.png - :align: center - -.. centered:: - **"Copy Mesh" button** +From the contextual menu in the Object Browser of from the **Mesh** menu select **Copy Mesh** or click *"Copy Mesh"* button |img| in the toolbar. The following dialog box will appear: @@ -24,20 +20,20 @@ The following dialog box will appear: In the dialog: - * specify the part of mesh to copy: +* specify the part of mesh to copy: - * **Select whole mesh, sub-mesh or group** by mouse activating this checkbox; or - * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or - * input the **Source Element IDs** directly in this field. The selected elements will be highlighted in the viewer; or - * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` "Selection filter library" page. + * **Select whole mesh, sub-mesh or group** by mouse activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the **Source Element IDs** directly in this field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. - * specify the **New Mesh Name**; - * specify the conditions of copying: +* specify the **New Mesh Name**; +* specify the conditions of copying: - * activate **Generate groups** checkbox to copy the groups of the source mesh to the newly created mesh. + * activate **Generate groups** checkbox to copy the groups of the source mesh to the newly created mesh. - * Click **Apply** or **Apply and Close** button to confirm the operation. +* Click **Apply** or **Apply and Close** button to confirm the operation. -**See Also** a sample :ref:`tui_copy_mesh`. +**See Also** a sample script of :ref:`tui_copy_mesh`. diff --git a/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst b/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst index 790e884d9..49bc6ed99 100644 --- a/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst +++ b/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst @@ -9,7 +9,7 @@ This operation allows creating groups on geometry on all selected shapes. Only t The type of each new group is defined automatically by the nature of the **Geometry**. The group names will be the same as the names of geometrical objects. -.. warning:: It's impossible to create a group of **0D elements** or **ball elements** with this operation. For this, it is necessary to use :ref:`creating_groups_page` operation. +.. warning:: It's impossible to create a group of *0D elements* or *ball elements* with this operation. For this, it is necessary to use :ref:`Create group ` operation. To use this operation, select in the **Mesh** menu or in the contextual menu in the Object browser **Create Groups from Geometry** item. @@ -19,4 +19,4 @@ To use this operation, select in the **Mesh** menu or in the contextual menu in In this dialog **Elements** group contains a list of shapes, on which groups of elements will be created; **Nodes** group contains a list of shapes, on which groups of nodes will be created. - +**See Also** a sample TUI Script of a :ref:`tui_create_group_on_geometry` operation. diff --git a/doc/salome/gui/SMESH/input/creating_groups.rst b/doc/salome/gui/SMESH/input/creating_groups.rst index d24d7c3c0..7697a22a6 100644 --- a/doc/salome/gui/SMESH/input/creating_groups.rst +++ b/doc/salome/gui/SMESH/input/creating_groups.rst @@ -4,7 +4,7 @@ Creating groups *************** -In MESH you can create a :ref:`grouping_elements_page` of elements of a certain type. The main way to create a group, is to +In MESH you can create a group of elements of a certain type. The main way to create a group, is to select in the **Mesh** menu **Create Group** item (also available in the context menu of the mesh). To create a group you should define the following: @@ -32,7 +32,7 @@ Mesh module distinguishes between the three Group types: the following ways: * By adding all entities of the chosen type existing in the mesh. For this, turn on the **Select All** check-box. In this mode all controls, which allow selecting the entities, are disabled. -* By choosing entities manually with the mouse in the 3D Viewer. For this, turn on the **Enable manual edition** check box. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. The **Set filter** button allows to define the filter for selection of the elements for your group. See more about filters on the :ref:`selection_filter_library_page` "Selection filter library" page. +* By choosing entities manually with the mouse in the 3D Viewer. For this, turn on the **Enable manual edition** check box. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. The **Set filter** button allows to define the filter for selection of the elements for your group. See more about filters on the :ref:`selection_filter_library_page` page. * By adding entities from either a sub-mesh or another group. For this, turn on the **Enable manual edition** check box. **Select from** fields group allows to select a sub-mesh or a group of the appropriate type and to **Add** their elements to the group. In the **manual edition** mode you can @@ -54,13 +54,13 @@ For example, to create a new group containing all faces of an existing group and * Click **Apply** button to create the new group. -Please note that the new group does not have references to the source group. It contains only the list of face IDs. So if the source group is changed, the new one is not updated accordingly. +.. note:: The new group does not have references to the source group. It contains only the list of face IDs. So if the source group is changed, the new one is not updated accordingly. .. image:: ../images/image130.gif :align: center .. centered:: - In this picture the brown cells belong to a group defined manually. + Brown cells belong to a group defined manually **See Also** a sample TUI Script of a :ref:`tui_create_standalone_group` operation. @@ -70,15 +70,17 @@ Please note that the new group does not have references to the source group. It "Group on Geometry" ################### +.. |sel| image:: ../images/image120.png + To create a group on geometry check **Group on geometry** in the **Group** **type** field. The group on geometry contains the elements of a certain type generated on the selected geometrical object. Group contents are dynamically updated if the mesh is modified. The group on geometry can be created only if the mesh is based on geometry. -To define a group, click the *Selection* button and choose +To define a group, click the *Selection* button |sel| and choose -* **Direct geometry selection** to select a shape in the Object Browser or in the Viewer; -* **Find geometry by mesh element selection** to activate a dialog which retrieves a shape by the selected element generated on this shape. +* *Direct geometry selection* to select a shape in the Object Browser or in the Viewer; +* *Find geometry by mesh element selection* to activate a dialog which retrieves a shape by the selected element generated on this shape. .. note:: - that this choice is available only if the mesh elements are already generated. + This choice is available only if the mesh elements are already generated. .. image:: ../images/a-creategroup.png :align: center @@ -88,7 +90,8 @@ After confirmation of the operation a new group of mesh elements will be created .. image:: ../images/image132.gif :align: center -In this picture the cells which belong to a certain geometrical face are selected in green. +.. centered:: + Cells belonging to a certain geometrical face are selected in green **See Also** a sample TUI Script of a :ref:`tui_create_group_on_geometry` operation. @@ -108,5 +111,3 @@ To define a group, click the **Set filter** button and define criteria of the fi :align: center **See Also** a sample TUI Script of a :ref:`tui_create_group_on_filter` operation. - - diff --git a/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst b/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst index 889ed666f..d0a482e95 100644 --- a/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst +++ b/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst @@ -21,17 +21,16 @@ Syntax:: MeshCut input.med output.med resuMeshName aboveGroup belowGroup nx ny nz px py pz T -where:: +where: - input.med = name of the original mesh file in med format - output.med = name of the result mesh file in med format - resuMeshName = name of the result mesh - aboveGroup = name of the group of volumes above the cut plane - belowGroups = name of the group of volumes below the cut plane - nx ny nz = vector normal to the cut plane - px py pz = a point of the cut plane - T = 0 < T < 1 : vertices of a tetrahedron are considered as belonging to the cut plane if their distance from the plane is inferior to L*T, - where L is the mean edge size of the tetrahedron +* **input.med** = name of the original mesh file in med format +* **output.med** = name of the result mesh file in med format +* **resuMeshName** = name of the result mesh +* **aboveGroup** = name of the group of volumes above the cut plane +* **belowGroups** = name of the group of volumes below the cut plane +* **nx ny nz** = vector normal to the cut plane +* **px py pz** = a point of the cut plane +* **T** = 0 < T < 1 : vertices of a tetrahedron are considered as belonging to the cut plane if their distance from the plane is inferior to L*T, where L is the mean edge size of the tetrahedron .. _meshcut_plugin: @@ -53,7 +52,7 @@ The following dialog box will appear: :align: center .. centered:: - "MeshCut Plugin dialog box" + MeshCut Plugin dialog box See above for the meaning of the parameters. diff --git a/doc/salome/gui/SMESH/input/cutting_quadrangles.rst b/doc/salome/gui/SMESH/input/cutting_quadrangles.rst index 912d34780..21c33112d 100644 --- a/doc/salome/gui/SMESH/input/cutting_quadrangles.rst +++ b/doc/salome/gui/SMESH/input/cutting_quadrangles.rst @@ -6,47 +6,43 @@ Cutting quadrangles This operation allows cutting one or several quadrangle elements into two or four triangles. -**To cut quadrangles:** +*To cut quadrangles:* -1. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). -2. In the **Modification** menu select the **Cutting of quadrangles** item or click **"Cutting of quadrangles"** button in the toolbar. +.. |img| image:: ../images/image82.png -.. image:: ../images/image82.png - :align: center - -.. centered:: - **"Cutting of quadrangles" button** +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Cutting of quadrangles** item or click *"Cutting of quadrangles"* button |img| in the toolbar. -The following dialog box will appear: + The following dialog box will appear: -.. image:: ../images/a-cuttingofquadrangles.png - :align: center + .. image:: ../images/a-cuttingofquadrangles.png + :align: center -* The main list contains the list of quadrangles selected for cutting. You can click on a quadrangle in the 3D viewer and it will be highlighted (lock Shift keyboard button to select several quadrangles): + * The main list contains the list of quadrangles selected for cutting. You can click on a quadrangle in the 3D viewer and it will be highlighted (lock Shift keyboard button to select several quadrangles): * Click **Add** button and the ID of this quadrangle will be added to the list. * To remove a selected element or elements from the list click **Remove** button. * **Sort list** button allows sorting the list of IDs. - * **Filter** button allows applying a definite :ref:`filtering_elements` "filter" to the selection of quadrangles. -* **Apply to all** check box allows cutting all quadrangles of the selected mesh. -* **Preview** provides a preview of cutting in the viewer. It is disabled for **Cut into 4 triangles** as this cutting way implies no ambiguity. -* **Criterion** defines the way of cutting: + * **Filter** button allows applying a definite :ref:`filter ` to the selection of quadrangles. + * **Apply to all** check box allows cutting all quadrangles of the selected mesh. + * **Preview** provides a preview of cutting in the viewer. It is disabled for **Cut into 4 triangles** as this cutting way implies no ambiguity. + * **Criterion** defines the way of cutting: * **Cut into 4 triangles** allows cutting a quadrangle into four triangles by inserting a new node at the center of the quadrangle. The other options allow cutting a quadrangle into two triangles by connecting the nodes of a diagonal. * **Use diagonal 1-3** and **Use diagonal 2-4** allow specifying the opposite corners, which will be connected to form two new triangles. * **Use numeric functor** allows selecting in the field below a quality metric, which will be optimized when choosing a diagonal for cutting a quadrangle: * **Minimum diagonal** cuts by the shortest diagonal. - * **Aspect Ratio** cuts by the diagonal splitting the quadrangle into triangles with :ref:`aspect_ratio_page` "Aspect Ratio" closer to 1 - * **Minimum Angle** cuts by the diagonal splitting the quadrangle into triangles with :ref:`minimum_angle_page` "Minimum Angle" closer to 60 degrees. - * **Skew** cuts by the diagonal splitting the quadrangle into triangles with :ref:`skew_page` "Skew" closer to 0.0 degrees. -* **Select from** allows choosing a sub-mesh or an existing group, whose quadrangle elements then can be added to the main list. + * **Aspect Ratio** cuts by the diagonal splitting the quadrangle into triangles with :ref:`Aspect Ratio ` closer to 1 + * **Minimum Angle** cuts by the diagonal splitting the quadrangle into triangles with :ref:`Minimum Angle ` closer to 60 degrees. + * **Skew** cuts by the diagonal splitting the quadrangle into triangles with :ref:`Skew ` closer to 0.0 degrees. + * **Select from** allows choosing a sub-mesh or an existing group, whose quadrangle elements then can be added to the main list. -3. Click the **Apply** or **Apply and Close** button to confirm the operation. +#. Click the **Apply** or **Apply and Close** button to confirm the operation. .. image:: ../images/image52.jpg :align: center .. centered:: - "The chosen quadrangular element" + The chosen quadrangular element | @@ -54,7 +50,7 @@ The following dialog box will appear: :align: center .. centered:: - "Two resulting triangular elements" + Two resulting triangular elements **See Also** a sample TUI Script of a :ref:`tui_cutting_quadrangles` operation. diff --git a/doc/salome/gui/SMESH/input/define_mesh_by_script.rst b/doc/salome/gui/SMESH/input/define_mesh_by_script.rst index a3329d3b6..92387778c 100644 --- a/doc/salome/gui/SMESH/input/define_mesh_by_script.rst +++ b/doc/salome/gui/SMESH/input/define_mesh_by_script.rst @@ -4,25 +4,23 @@ Use Edges/Faces to be Created Manually ************************************** -The algorithms **Use Edges to be Created Manually** and **Use Faces to be Created Manually** allow creating a 1D or a 2D mesh in a python script (using **AddNode, AddEdge** and **AddFace** commands) and then using such sub-meshes in the construction of a 2D or a 3D mesh. +The algorithms **Use Edges to be Created Manually** and **Use Faces to be Created Manually** allow creating a 1D or a 2D mesh in a python script (using *AddNode, AddEdge* and *AddFace* commands) and then using such sub-meshes in the construction of a 2D or a 3D mesh. For example, you want to use standard algorithms to generate 1D and 3D meshes and to create 2D mesh by your python code. For this, you #. create a mesh object, assign a 1D algorithm, #. invoke **Compute** command, which computes a 1D mesh, - #. assign **Use Faces to be Created Manually** and a 3D algorithm, #. run your python code, which creates a 2D mesh, #. invoke **Compute** command, which computes a 3D mesh. -.. warning:: **Use Edges to be Created Manually** and **Use Faces to be Created Manually** algorithms should be assigned _before_ mesh generation by the Python code. +.. warning:: **Use Edges to be Created Manually** and **Use Faces to be Created Manually** algorithms should be assigned *before* mesh generation by the Python code. -Consider trying a sample script demonstrating the usage of :ref:`tui_use_existing_faces` algorithm for construction of a 2D mesh using Python commands. +Consider trying a sample script demonstrating the usage of :ref:`Use Faces to be Created Manually ` algorithm for construction of a 2D mesh using Python commands. - .. image:: ../images/use_existing_face_sample_mesh.png - :align: center +.. figure:: ../images/use_existing_face_sample_mesh.png + :align: center -**Mesh computed by** :ref:`tui_use_existing_faces` shown in a Shrink mode. +**See also** :ref:`the sample script ` creating the mesh shown in the image in a Shrink mode. - diff --git a/doc/salome/gui/SMESH/input/deleting_groups.rst b/doc/salome/gui/SMESH/input/deleting_groups.rst index 02c06e803..8b2038cbc 100644 --- a/doc/salome/gui/SMESH/input/deleting_groups.rst +++ b/doc/salome/gui/SMESH/input/deleting_groups.rst @@ -12,7 +12,6 @@ Then click **Apply and Close** button to remove the selected groups and close th .. image:: ../images/deletegroups.png :align: center -.. note:: - Please, note that this operation removes groups **with their elements**. To delete a group and leave its elements intact, right-click on the group in the Object Browser and select **Delete** in the pop-up menu or select the group and choose **Edit -> Delete** in the main menu. +.. note:: This operation removes groups **with their elements**. To delete a group and leave its elements intact, right-click on the group in the Object Browser and select **Delete** in the pop-up menu or select the group and choose **Edit -> Delete** in the main menu. diff --git a/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst b/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst index a0bc940a4..71302bb7e 100644 --- a/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst +++ b/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst @@ -7,15 +7,11 @@ Diagonal inversion of two triangles In MESH you can inverse the diagonal (edge) of a pseudo-quadrangle formed by two neighboring triangles with one common edge. -**To inverse the diagonal:** +*To inverse the diagonal:* -#. From the **Modification** menu choose the **Diagonal inversion** item or click **"Diagonal Inversion"** button in the toolbar. +#. From the **Modification** menu choose the **Diagonal inversion** item or click *"Diagonal Inversion"* |img| button in the toolbar. - .. image:: ../images/image70.png - :align: center - - .. centered:: - **"Diagonal Inversion" button** +.. |img| image:: ../images/image70.png The following dialog box shall appear: @@ -29,13 +25,13 @@ The following dialog box shall appear: :align: center .. centered:: - "The selected edge" + The selected edge .. image:: ../images/image36.jpg :align: center .. centered:: - "The inverted edge" + The inverted edge **See Also** a sample TUI Script of a :ref:`tui_diagonal_inversion` operation. diff --git a/doc/salome/gui/SMESH/input/double_elements_control.rst b/doc/salome/gui/SMESH/input/double_elements_control.rst index ed1e9c7b4..1286bccf8 100644 --- a/doc/salome/gui/SMESH/input/double_elements_control.rst +++ b/doc/salome/gui/SMESH/input/double_elements_control.rst @@ -11,6 +11,4 @@ These mesh quality controls highlight the mesh elements basing on the same set o In this picture some faces are coincident after copying all elements with translation with subsequent Merge of nodes. -*A sample TUI Script of a* :ref:`filter_double_elements`:. - - +**See also** a sample TUI Script of a :ref:`filter_double_elements` filters. diff --git a/doc/salome/gui/SMESH/input/double_nodes_control.rst b/doc/salome/gui/SMESH/input/double_nodes_control.rst index f19eebde1..816f29d39 100644 --- a/doc/salome/gui/SMESH/input/double_nodes_control.rst +++ b/doc/salome/gui/SMESH/input/double_nodes_control.rst @@ -4,13 +4,12 @@ Double nodes ************ -This mesh quality control highlights the nodes which are coincident with other nodes (within a given tolerance). Distance at which two nodes are considered coincident is defined by :ref:`dbl_nodes_tol_pref` preference. +This mesh quality control highlights the nodes which are coincident with other nodes (within a given tolerance). Distance at which two nodes are considered coincident is defined by :ref:`Quality Controls/Double nodes tolerance ` preference. .. image:: ../images/double_nodes.png :align: center -In this picture some nodes are coincident after copying all elements with translation. +.. centered:: + Some nodes are coincident after copying all elements with translation. **See also**: A sample TUI Script of a :ref:`tui_double_nodes_control` filter. - - diff --git a/doc/salome/gui/SMESH/input/double_nodes_page.rst b/doc/salome/gui/SMESH/input/double_nodes_page.rst index de4e30da9..104efb180 100644 --- a/doc/salome/gui/SMESH/input/double_nodes_page.rst +++ b/doc/salome/gui/SMESH/input/double_nodes_page.rst @@ -8,16 +8,11 @@ This operation allows duplicating mesh nodes or/and elements, which can be usefu Duplication consists in creation of mesh elements "equal" to existing ones. -**To duplicate nodes or/and elements:** +*To duplicate nodes or/and elements:* -#. From the **Modification** menu choose **Transformation** -> **Duplicate Nodes or/and Elements** item or click **"Duplicate Nodes or/and Elements"** button in the toolbar. - - .. image:: ../images/duplicate_nodes.png - :align: center - - .. centered:: - "Duplicate Nodes or/and Elements button" +.. |img| image:: ../images/duplicate_nodes.png +#. From the **Modification** menu choose **Transformation** -> **Duplicate Nodes or/and Elements** item or click *"Duplicate Nodes or/and Elements"* button |img| in the toolbar. #. Check in the dialog box one of four radio buttons corresponding to the type of duplication operation you would like to perform. #. Fill the other fields available in the dialog box (depending on the chosen operation mode). #. Click the **Apply** or **Apply and Close** button to perform the operation of duplication. @@ -42,9 +37,9 @@ Duplicate nodes only Parameters to be defined in this mode: - * **Group of nodes to duplicate** (**mandatory**): these nodes will be duplicated. - * **Group of elements to replace nodes with new ones** (**optional**): the new nodes will replace the duplicated nodes within these elements. - * **Construct group with newly created nodes** option (**checked by default**): if checked - the group with newly created nodes will be built. + * **Group of nodes to duplicate** (*mandatory*): these nodes will be duplicated. + * **Group of elements to replace nodes with new ones** (*optional*): the new nodes will replace the duplicated nodes within these elements. **Generate** button tries to automatically find such elements and creates a group of them. This button becomes active as soon as **Group of nodes to duplicate** is selected. + * **Construct group with newly created nodes** option (*checked by default*): if checked - the group with newly created nodes will be built. A schema below illustrates how the crack is emulated using the node duplication. @@ -52,7 +47,7 @@ A schema below illustrates how the crack is emulated using the node duplication. :align: center .. centered:: - "Crack emulation" + Crack emulation This schema shows a virtual crack in a 2D mesh created using this duplication mode: @@ -74,11 +69,11 @@ Duplicate nodes and border elements Parameters to be defined in this mode: - * **Group of elements to duplicate** (**mandatory**): these elements will be duplicated. - * **Group of nodes not to duplicate** (**optional**): group of nodes at crack bottom which will not be duplicated. - * **Group of elements to replace nodes with new ones** (**mandatory**): the new nodes will replace the nodes to duplicate within these elements. - * **Construct group with newly created elements** option (**checked by default**): if checked - the group of newly created elements will be built. - * **Construct group with newly created nodes** option (**checked by default**): if checked - the group of newly created nodes will be built. + * **Group of elements to duplicate** (*mandatory*): these elements will be duplicated. + * **Group of nodes not to duplicate** (*optional*): group of nodes at crack bottom which will not be duplicated. + * **Group of elements to replace nodes with new ones** (*mandatory*): the new nodes will replace the nodes to duplicate within these elements. **Generate** button tries to automatically find such elements and creates a group of them. This button becomes active as soon as **Group of elements to duplicate** is selected. + * **Construct group with newly created elements** option (*checked by default*): if checked - the group of newly created elements will be built. + * **Construct group with newly created nodes** option (*checked by default*): if checked - the group of newly created nodes will be built. A schema below explains the crack emulation using the node duplication with border elements. @@ -87,7 +82,7 @@ A schema below explains the crack emulation using the node duplication with bord :align: center .. centered:: - "Crack emulation" + Crack emulation This schema shows a virtual crack in a 2D mesh created using this duplication mode. In this schema: @@ -117,8 +112,8 @@ This mode duplicates the given elements, i.e. creates new elements with the same Parameters to be defined in this mode: - * **Group of elements to duplicate** (**mandatory**): these elements will be duplicated. - * **Construct group with newly created elements** option (**checked by default**): if checked - the group of newly created elements will be built. The name of the created group starts from "DoubleElements". + * **Group of elements to duplicate** (*mandatory*): these elements will be duplicated. + * **Construct group with newly created elements** option (*checked by default*): if checked - the group of newly created elements will be built. The name of the created group starts from "DoubleElements". .. _mode_group_boundary_anchor: @@ -129,13 +124,12 @@ Duplicate nodes on group boundaries This mode duplicates nodes located on boundaries between given groups of volumes. - .. image:: ../images/duplicate04.png :align: center Parameters to be defined in this mode: - * **Groups (faces or volumes)** (**mandatory**): list of mesh groups. These groups should be disjoint, i.e. should not have shared elements. + * **Groups (faces or volumes)** (*mandatory*): list of mesh groups. These groups should be disjoint, i.e. should not have shared elements. * If **Create joint elements** option is activated, flat elements are created on the duplicated nodes: a triangular facet shared by two volumes of two groups generates a flat prism, a quadrangular facet generates a flat hexahedron. Correspondingly 2D joint elements (null area faces) are generated where edges are shared by two faces. The created flat volumes (or faces) are stored in groups. These groups are named according to the position of the group in the list of groups: group "j_n_p" is a group of flat elements that are built between the group \#n and the group \#p in the group list. All flat elements are gathered into the group named "joints3D" (correspondingly "joints2D"). The flat elements of multiple junctions between the simple junction are stored in a group named "jointsMultiples". * If **On all boundaries** option is activated, the volumes (or faces), which are not included into **Groups** input, are considered as another group and thus the nodes on the boundary between **Groups** and the remaining mesh are also duplicated. diff --git a/doc/salome/gui/SMESH/input/editing_groups.rst b/doc/salome/gui/SMESH/input/editing_groups.rst index 20ab40e6a..b00f956aa 100644 --- a/doc/salome/gui/SMESH/input/editing_groups.rst +++ b/doc/salome/gui/SMESH/input/editing_groups.rst @@ -4,24 +4,20 @@ Editing groups ************** -**To edit an existing group of elements:** +*To edit an existing group of elements:* -#. Select your group in the Object Browser and in the **Mesh** menu click the **Edit Group** item or **"Edit Group"** button in the toolbar. - - .. image:: ../images/image74.gif - :align: center +.. |img| image:: ../images/image74.gif +#. Select your group in the Object Browser and in the **Mesh** menu click the **Edit Group** item or *"Edit Group"* button |img| in the toolbar. - .. centered:: - **"Edit Group" button** - The following dialog box will appear (if the selected group is **standalone**, else this dialog looks different): + The following dialog box will appear (if the selected group is **standalone**, else this dialog looks different): .. image:: ../images/editgroup.png :align: center - In this dialog box you can modify the name and the color of your group despite of its type. You can add or remove the elements composing a **standalone group**. You can change criteria of the filter of a **group on filter**. For more information see :ref:`creating_groups_page`:"Creating Groups" page. + In this dialog box you can modify the name and the color of your group despite of its type. You can add or remove the elements composing a **standalone group**. You can change criteria of the filter of a **group on filter**. For more information see :ref:`creating_groups_page` page. #. Click the **Apply** or **Apply and Close** button to confirm modification of the group. @@ -31,18 +27,15 @@ Editing groups Convert to stanalone group ========================== -**To convert an existing group on geometry or a group on filer into a standalone group and modify its contents:** +*To convert an existing group on geometry or a group on filer into a standalone group and modify its contents:* -#. Select your group on geometry or on filter in the Object Browser and in the **Mesh** menu click the **Edit Group as Standalone** item. +.. |edit| image:: ../images/image74.gif - .. image:: ../images/image74.gif - :align: center +#. Select your group on geometry or on filter in the Object Browser and in the **Mesh** menu click the **Edit Group as Standalone** item |edit|. - .. centered:: - **"Edit Group as Standalone" button** - The selected group will be converted into a standalone group and its contents can be modified. + The selected group will be converted into a standalone group and its contents can be modified. #. Click the **Apply** or **Apply and Close** button to confirm modification of the group. diff --git a/doc/salome/gui/SMESH/input/editing_meshes.rst b/doc/salome/gui/SMESH/input/editing_meshes.rst index 98437ef12..09f63fbf2 100644 --- a/doc/salome/gui/SMESH/input/editing_meshes.rst +++ b/doc/salome/gui/SMESH/input/editing_meshes.rst @@ -4,21 +4,16 @@ Editing Meshes ************** -After you have created a mesh or sub-mesh with definite applied meshing algorithms and hypotheses you can edit your mesh by **assigning** other -algorithms and/or hypotheses or **unassigning** the applied hypotheses and algorithms. The editing proceeds in the same way as -:ref:`create_mesh_anchor`:"Mesh Creation". +After you have created a mesh or sub-mesh with definite applied meshing algorithms and hypotheses you can edit your mesh by **assigning** other algorithms and/or hypotheses or **unassigning** the applied hypotheses and algorithms. The editing proceeds in the same way as +:ref:`Mesh Creation `. .. image:: ../images/createmesh-inv3.png :align: center -You can also change values for the current hypothesis by clicking the -**"Edit Hypothesis"** button. - -.. image:: ../images/image122.png - :align: center +.. |img| image:: ../images/image122.png -.. centered:: - **"Edit Hypothesis" button** +You can also change values for the current hypothesis by clicking the +*"Edit Hypothesis"* |img| button. Mesh entities generated before using changed hypotheses are automatically removed. @@ -29,15 +24,15 @@ changes if we apply different meshing parameters to it. :align: center .. centered:: - "Example of a mesh with Max. Element area 2D hypothesis roughly corresponding to 1D hypotheses on edges" + Example of a mesh with Max. Element area 2D hypothesis roughly corresponding to 1D hypotheses on edges .. image:: ../images/edit_mesh_change_value_hyp.png :align: center .. centered:: - "And now the Max Element area is greatly reduced" + And now the Max Element area is greatly reduced -**See Also** a sample TUI Script of an :ref:`tui_editing_mesh` operation. +**See Also** a sample TUI Script of an :ref:`Edit Mesh ` operation. diff --git a/doc/salome/gui/SMESH/input/extrusion.rst b/doc/salome/gui/SMESH/input/extrusion.rst index 44f9f14e8..023d900fa 100644 --- a/doc/salome/gui/SMESH/input/extrusion.rst +++ b/doc/salome/gui/SMESH/input/extrusion.rst @@ -4,13 +4,13 @@ Extrusion ********* -Extrusion is used to build mesh elements of plus one dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Extrusion can be used to create a :ref:`extrusion_struct`:"structured mesh from scratch". +Extrusion is used to build mesh elements of plus one dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Extrusion can be used to create a :ref:`structured mesh from scratch `. .. image:: ../images/extrusion_box.png :align: center .. centered:: - "If you extrude several quadrangles, you get exactly the same mesh as if you meshed a geometrical box (except for that the initial quadrangles can be incorrectly oriented): quadrangles and segments are created on the boundary of the generated mesh" + If you extrude several quadrangles, you get exactly the same mesh as if you meshed a geometrical box (except for that the initial quadrangles can be incorrectly oriented): quadrangles and segments are created on the boundary of the generated mesh Any node, segment or 2D element can be extruded. Each type of elements is extruded into a corresponding type of result elements: @@ -37,40 +37,31 @@ When 2D elements are extruded, in addition to 3D elements segments are created o :align: center .. centered:: - "Two triangles extruded: no vertical rib segments generated from nodes #2 and #3 as they are shared by both triangles" + Two triangles extruded: no vertical rib segments generated from nodes #2 and #3 as they are shared by both triangles -**To use extrusion:** +*To use extrusion:* -#. From the **Modification** menu choose the **Extrusion** item or click **"Extrusion"** button in the toolbar. +.. |img| image:: ../images/image91.png +.. |sel_img| image:: ../images/image120.png - .. image:: ../images/image91.png - :align: center - - .. centered:: - **"Extrusion" button** +#. From the **Modification** menu choose the **Extrusion** item or click *"Extrusion"* button |img| in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/extrusionalongaline1.png :align: center - #. In this dialog: - * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - .. image:: ../images/image120.png - :align: center - - .. centered:: - **"Selection" button** + * Use *Selection* button |sel_img| to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. * Specify **Nodes**, **Edges** and **Faces**, which will be extruded, by one of following means: * **Select the whole mesh, sub-mesh or group** activating the corresponding check-box. * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame. * Input the element IDs directly in **Node IDs**, **Edge IDs** and **Face IDs** fields. The selected elements will be highlighted in the viewer, if the mesh is shown there. - * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements`:"Selection filters" page. + * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements` page. * If the **Extrusion to Distance** radio button is selected * specify the translation vector by which the elements will be extruded. @@ -101,44 +92,33 @@ When 2D elements are extruded, in addition to 3D elements segments are created o :align: center .. centered:: - "'Along average normal' activated (to the left) and deactivated (to the right)" + 'Along average normal' activated (to the left) and deactivated (to the right) * **Use only input elements** check-box specifies what elements will be used to compute the average normal. - * If it is *activated* only selected faces, among faces sharing the node, are used to compute the average normal at the node. - * Else all faces sharing the node are used. - The picture below shows a cross-section of a 2D mesh the upper plane of which is extruded with **Use only input elements** activated (to the left) and deactivated (to the right). + * If it is *activated* only selected faces, among faces sharing the node, are used to compute the average normal at the node. + * Else all faces sharing the node are used. + + The picture below shows a cross-section of a 2D mesh the upper plane of which is extruded with **Use only input elements** activated (to the left) and deactivated (to the right). .. image:: ../images/extrusionbynormal_useonly.png :align: center .. centered:: - "'Use only input elements' activated (to the left) and deactivated (to the right)" + 'Use only input elements' activated (to the left) and deactivated (to the right) + .. |add| image:: ../images/add.png + .. |rm| image:: ../images/remove.png + * Specify the **Number of steps**. * Optionally specify **Scale Factors**. Each scale factor in the list is applied to nodes of a corresponding extrusion step unless **Linear Variation of Scale Factors** is checked, is which case the scale factors are spread over all extrusion steps. * **Scaling Center** can be defined either using spin boxes or by picking a node in the Viewer or by picking a geometrical vertex in the Object Browser. - * **Add** button adds a scale factor to the list. - - .. image:: ../images/add.png - :align: center - - .. centered:: - **"Add" button** - - * **Remove** button removes selected scale factors from the list. - - .. image:: ../images/remove.png - :align: center - - .. centered:: - **"Remove" button** - - + * **Add** button |add| adds a scale factor to the list. + * **Remove** button |rm| removes selected scale factors from the list. * If you activate **Generate Groups** check-box, the **result elements** created from **selected elements** contained in groups will be included into new groups named by pattern "_extruded" and "_top". For example if a selected quadrangle is included in *g_Faces* group (see figures below) then result hexahedra will be included in *g_Faces_extruded* group and a quadrangle created at the "top" of extruded mesh will be included in *g_Faces_top group*. @@ -148,7 +128,7 @@ When 2D elements are extruded, in addition to 3D elements segments are created o .. image:: ../images/extrusion_groups_res.png :align: center - This check-box is active only if there are some groups in the mesh. + This check-box is active only if there are some groups in the mesh. @@ -163,19 +143,19 @@ Example: creation of a structured mesh from scratch :align: center .. centered:: - "A node is extruded into a line of segments" + A node is extruded into a line of segments .. image:: ../images/image76.jpg :align: center .. centered:: - "The line of segments is extruded into a quadrangle mesh" + The line of segments is extruded into a quadrangle mesh .. image:: ../images/image77.jpg :align: center .. centered:: - "The quadrangle mesh is revolved into a hexahedral mesh" + The quadrangle mesh is revolved into a hexahedral mesh **See Also** a sample TUI Script of an :ref:`tui_extrusion` operation. diff --git a/doc/salome/gui/SMESH/input/extrusion_along_path.rst b/doc/salome/gui/SMESH/input/extrusion_along_path.rst index fb9866f8a..71851c8ef 100644 --- a/doc/salome/gui/SMESH/input/extrusion_along_path.rst +++ b/doc/salome/gui/SMESH/input/extrusion_along_path.rst @@ -63,13 +63,13 @@ In this example the path mesh has been built on a wire containing 3 edges. Node :align: center .. centered:: - **Meshed wire** + Meshed wire .. image:: ../images/extr_along_wire_after.png :align: center .. centered:: - **The resulting extrusion** + The resulting extrusion Extrusion of 2d elements along a closed path ############################################ @@ -95,31 +95,21 @@ Extrusion of 2d elements along a closed path The same, but using angles {45, -45, 45, -45, 45, -45, 45, -45} -**To use Extrusion along Path:** +*To use Extrusion along Path:* -#. From the **Modification** menu choose the **Extrusion along a path** item or click **"Extrusion along a path"** button in the toolbar. +.. |img| image:: ../images/image101.png +.. |sel| image:: ../images/image120.png - .. image:: ../images/image101.png - :align: center - - .. centered:: - **"Extrusion along a path" button** +#. From the **Modification** menu choose the **Extrusion along a path** item or click *"Extrusion along a path"* button |img| in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/extrusion_along_path_dlg.png - #. In this dialog: - * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - - .. image:: ../images/image120.png - :align: center + * Use *Selection* button |sel| to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - .. centered:: - **"Selection" button** - * Specify **Nodes**, **Edges** and **Faces**, which will be extruded, by one of following means: * **Select the whole mesh, sub-mesh or group** activating this check-box. @@ -148,23 +138,15 @@ Extrusion of 2d elements along a closed path #. There are two optional parameters, which can be very useful: -#. If the path of extrusion is curvilinear, at each iteration the extruded elements are rotated to keep its initial angularity to the curve. By default, the **Base Point** around which the elements are rotated is the mass center of the elements (note that it can differ from the gravity center computed by *Geometry* module for the underlying shape), however, you can specify any point as the **Base Point** and the elements will be rotated with respect to this point. Note that only the displacement of the **Base Point** exactly equals to the path, and all other extruded elements simply keep their position relatively to the **Base Point** at each iteration. - -#. The elements can also be rotated around the path to get the resulting mesh in a helical fashion. You can set the values of angles at the right, add them to the list of angles at the left by pressing the **"Add"** button and remove them from the list by pressing the **"Remove"** button. + * If the path of extrusion is curvilinear, at each iteration the extruded elements are rotated to keep its initial angularity to the curve. By default, the **Base Point** around which the elements are rotated is the mass center of the elements (note that it can differ from the gravity center computed by *Geometry* module for the underlying shape), however, you can specify any point as the **Base Point** and the elements will be rotated with respect to this point. Note that only the displacement of the **Base Point** exactly equals to the path, and all other extruded elements simply keep their position relatively to the **Base Point** at each iteration. - .. image:: ../images/add.png - :align: center + .. |add| image:: ../images/add.png + .. |rem| image:: ../images/remove.png - .. centered:: - **"Add" button** - - .. image:: ../images/remove.png - :align: center + * The elements can also be rotated around the path to get the resulting mesh in a helical fashion. You can set the values of angles at the right, add them to the list of angles at the left by pressing the *"Add"* button |add| and remove them from the list by pressing the *"Remove"* button |rem|. - .. centered:: - **"Remove" button** - **Linear variation of the angles** option allows defining the angle of gradual rotation for the whole path. At each step the elements will be rotated by *( angle / nb. of steps )*. + **Linear variation of the angles** option allows defining the angle of gradual rotation for the whole path. At each step the elements will be rotated by *( angle / nb. of steps )*. diff --git a/doc/salome/gui/SMESH/input/find_element_by_point.rst b/doc/salome/gui/SMESH/input/find_element_by_point.rst index 0ecee32eb..1fd4ba710 100644 --- a/doc/salome/gui/SMESH/input/find_element_by_point.rst +++ b/doc/salome/gui/SMESH/input/find_element_by_point.rst @@ -6,17 +6,15 @@ Find Element by Point This functionality allows you to find all mesh elements to which belongs a certain point. -**To find the elements:** -#. Select a mesh or a group -#. Select from the Mesh menu or from the context menu the Find Element by Point item. +*To find the elements:* - .. image:: ../images/findelement3.png - :align: center +.. |img| image:: ../images/findelement3.png + +#. Select a mesh or a group +#. Select from the Mesh menu or from the context menu the Find Element by Point item |img|. - .. centered:: - **"Find Element by Point" button** - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/findelement2.png :align: center @@ -25,7 +23,7 @@ This functionality allows you to find all mesh elements to which belongs a certa #. In this dialog box you should select: * the coordinates of the point; * the type of elements to be found; it is also possible to find elements of all types related to the reference point. Choose type "All" to find elements of any type except for nodes and 0D elements. -#. Click the **Find** button. +#. Click the **Find** button. IDs of found entities will be shown. .. image:: ../images/findelement1.png :align: center diff --git a/doc/salome/gui/SMESH/input/free_borders.rst b/doc/salome/gui/SMESH/input/free_borders.rst index f4ddfa57e..fc076f3ab 100644 --- a/doc/salome/gui/SMESH/input/free_borders.rst +++ b/doc/salome/gui/SMESH/input/free_borders.rst @@ -11,6 +11,6 @@ This mesh quality control highlights 1D elements (segments) belonging to one ele In this picture the free borders are displayed in red. (Faces are explicitly shown via **Display Entity** menu as all elements but segments are hidden upon this control activation). -**See Also** a sample TUI Script of a :ref:`tui_free_borders` operation. +**See Also** a sample TUI Script of a :ref:`tui_free_borders` filter. diff --git a/doc/salome/gui/SMESH/input/free_edges.rst b/doc/salome/gui/SMESH/input/free_edges.rst index 59b95054d..feeb58e4f 100644 --- a/doc/salome/gui/SMESH/input/free_edges.rst +++ b/doc/salome/gui/SMESH/input/free_edges.rst @@ -10,8 +10,6 @@ This mesh quality control highlights borders of faces (links between nodes, not :align: center .. centered:: - In this picture some elements of mesh have been deleted and the "holes" are outlined in red. - -**See Also** a sample TUI Script of a :ref:`tui_free_edges` operation. - + Some elements of mesh have been deleted and the "holes" are outlined in red. +**See Also** a sample TUI Script of a :ref:`tui_free_edges` filter. diff --git a/doc/salome/gui/SMESH/input/free_faces.rst b/doc/salome/gui/SMESH/input/free_faces.rst index d634301bf..cd8ca0588 100644 --- a/doc/salome/gui/SMESH/input/free_faces.rst +++ b/doc/salome/gui/SMESH/input/free_faces.rst @@ -11,6 +11,4 @@ This mesh quality control highlights the faces connected to less than two mesh v In this picture some volume mesh elements have been removed, as a result some faces became connected only to one volume. i.e. became free. -**See also:** A sample TUI Script of a :ref:`tui_free_faces` operation. - - +**See also:** A sample TUI Script of a :ref:`tui_free_faces` filter. diff --git a/doc/salome/gui/SMESH/input/free_nodes.rst b/doc/salome/gui/SMESH/input/free_nodes.rst index 723ec6720..451699c02 100644 --- a/doc/salome/gui/SMESH/input/free_nodes.rst +++ b/doc/salome/gui/SMESH/input/free_nodes.rst @@ -11,6 +11,4 @@ This mesh quality control highlights the nodes which are not connected to any m In this picture some nodes are not connected to any mesh element after deleting some elements and adding several isolated nodes. -**See also:** A sample TUI Script of a :ref:`tui_free_nodes` operation. - - +**See also:** A sample TUI Script of a :ref:`tui_free_nodes` filter. diff --git a/doc/salome/gui/SMESH/input/grouping_elements.rst b/doc/salome/gui/SMESH/input/grouping_elements.rst index 06341bdb4..e0e259ffa 100644 --- a/doc/salome/gui/SMESH/input/grouping_elements.rst +++ b/doc/salome/gui/SMESH/input/grouping_elements.rst @@ -9,10 +9,11 @@ In Mesh module it is possible to create groups of mesh entities: nodes, edges, f There are three types of groups different by their internal organization: #. **Standalone group** is a static set of mesh entities. Its contents can be explicitly controlled by the user. Upon removal of the entities included into the group, e.g. due to modification of meshing parameter, the group becomes empty and its content can be restored only manually. Hence it is reasonable to create standalone groups when the mesh generation is finished and mesh quality is verified. - .. warning:: Creation and edition of large standalone groups in :ref:`creating_groups_page` dialog using manual edition is problematic due to poor performance of the dialog. + .. warning:: Creation and edition of large standalone groups in :ref:`Create group ` dialog using manual edition is problematic due to poor performance of the dialog. #. **Group on geometry** is associated to a sub-shape or a group of sub-shapes of the main shape and includes mesh entities generated on these geometrical entities. The association to a geometry is established at group construction and cannot be changed. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. -#. **Group on filter** encapsulates a :ref:`filters_page`, which is used to select mesh entities composing the group from the whole mesh. Criteria of the filter can be changed at any time. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. + +#. **Group on filter** encapsulates a :ref:`filter `, which is used to select mesh entities composing the group from the whole mesh. Criteria of the filter can be changed at any time. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. The group on geometry and group on filter can be converted to a standalone group. @@ -20,26 +21,23 @@ The group on geometry and group on filter can be converted to a standalone group :align: center .. centered:: - "Groups of different types look differently in the Object Browser" + Groups of different types look differently in the Object Browser The following ways of group creation are possible: -* :ref:`creating_groups_page` dialog allows creation of a group of any type: - :ref:`standalone_group`, - :ref:`group_on_geom` and - :ref:`group_on_filter` using dedicated tabs. -* :ref:`create_groups_from_geometry_page` dialog allows creation of several groups on geometry at once. +* :ref:`Create group ` dialog allows creation of a group of any type: :ref:`Standalone group`, :ref:`Group on geometry ` and :ref:`Group on filter ` using dedicated tabs. +* :ref:`Create Groups from Geometry ` dialog allows creation of several groups on geometry at once. * Standalone groups of all nodes and elements of the chosen sub-mesh (type of elements depends on dimension of sub-mesh geometry) can be created using **Mesh -> Construct Group** menu item (available from the context menu as well). -* Standalone groups of any element type can be created basing on nodes of other groups - using :ref:`group_of_underlying_elements_page` dialog. -* Standalone groups can be created by applying :ref:`using_operations_on_groups_page` to other groups. -* Creation of standalone groups is an option of many :ref:`modifying_meshes_page` operations. +* Standalone groups of any element type can be created basing on nodes of other groups - using :ref:`Group based on nodes of other groups ` dialog. +* Standalone groups can be created by applying :ref:`Boolean operations ` to other groups. +* Creation of standalone groups is an option of many :ref:`mesh modification ` operations. The created groups can be later: -* :ref:`editing_groups_page` -* :ref:`deleting_groups_page`, either as an object or together with contained elements. -* The group on geometry and group on filter can be :ref:`convert_to_standalone` group. -* :ref:`importing_exporting_meshes_page` into a file as a whole mesh. +* :ref:`Edited ` +* :ref:`Deleted `, either as an object or together with contained elements. +* The group on geometry and group on filter can be :ref:`converted into the standalone ` group. +* :ref:`Exported ` into a file as a whole mesh. In the Object Browser, if an item contains more than one child group, it is possible to sort the groups by name in ascending order using **Sort children** context menu item. @@ -47,10 +45,11 @@ In the Object Browser, if an item contains more than one child group, it is poss :align: center .. centered:: - "Sorting groups" + Sorting groups An important tool, providing filters for creation of standalone groups and groups on filter is :ref:`selection_filter_library_page`. +**Table of Contents** .. toctree:: :maxdepth: 2 diff --git a/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst b/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst index 18d2c21a4..e17080d06 100644 --- a/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst +++ b/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst @@ -5,9 +5,18 @@ Importing and exporting meshes ****************************** -In MESH there is a functionality allowing import/export of meshes from/to **MED**, **UNV** (I-DEAS 10), **DAT** (simple ascii format), **STL**, **GMF** (internal format of DISTENE products, namely MG-CADSurf, MG-Tetra and MG-Hexa algorithms) and **CGNS** format files. You can also export a group as a whole mesh. +In MESH there is a functionality allowing import/export of meshes in follwing formats: -**To import a mesh:** +* **MED**, +* **UNV** (I-DEAS 10), +* **DAT** (simple ascii format), +* **STL**, +* **GMF** (internal format of DISTENE products from the MeshGems suite), +* **CGNS**. + +You can also export a group as a whole mesh. + +*To import a mesh:* #. From the **File** menu choose the **Import** item, from its sub-menu select the corresponding format (MED, UNV, STL, GMF and CGNS) of the file containing your mesh. #. In the standard **Search File** dialog box find the file for import. It is possible to select multiple files to be imported all at once. @@ -16,7 +25,7 @@ In MESH there is a functionality allowing import/export of meshes from/to **MED* .. image:: ../images/meshimportmesh.png :align: center -**To export a mesh or a group:** +*To export a mesh or a group:* #. Select the object you wish to export. #. From the **File** menu choose the **Export** item, from its sub-menu select the format (MED, UNV, DAT, STL, GMF and CGNS) of the file which will contain your exported mesh. @@ -31,20 +40,18 @@ If you try to export a group, the warning will be shown: .. image:: ../images/meshexportgroupwarning.png :align: center -* **Don't show this warning anymore** check-box allows to switch off the warning. You can re-activate the warning in :ref:`group_export_warning_pref`. +* **Don't show this warning anymore** check-box allows to switch off the warning. You can re-activate the warning in :ref:`Preferences `. There are additional parameters available at export to MED and SAUV format files. .. _export_auto_groups: -Auto Groups -=========== +* **Automatically create groups** check-box specifies whether to create groups of all mesh entities of available dimensions or not. The created groups have names like "Group_On_All_Nodes", "Group_On_All_Faces", etc. A default state of this check-box can be set in :ref:`Preferences `. +* **Automatically define space dimension** check-box specifies whether to define space dimension for export by mesh configuration or not. Usually the mesh is exported as a mesh in 3D space, just as it is in Mesh module. The mesh can be exported as a mesh of a lower dimension in the following cases, provided that this check-box is checked: - * **Automatically create groups** check-box specifies whether to create groups of all mesh entities of available dimensions or not. The created groups have names like "Group_On_All_Nodes", "Group_On_All_Faces", etc. A default state of this check-box can be set in :ref:`export_auto_groups_pref`. - * **Automatically define space dimension** check-box specifies whether to define space dimension for export by mesh configuration or not. Usually the mesh is exported as a mesh in 3D space, just as it is in Mesh module. The mesh can be exported as a mesh of a lower dimension in the following cases, provided that this check-box is checked: - * **1D**: if all mesh nodes lie on OX coordinate axis. - * **2D**: if all mesh nodes lie in XOY coordinate plane. + * **1D**: if all mesh nodes lie on OX coordinate axis. + * **2D**: if all mesh nodes lie in XOY coordinate plane. -**See Also** a sample TUI Script of an :ref:`tui_export_mesh` operation. +**See Also** a sample TUI Script of an :ref:`Export Mesh ` operation. diff --git a/doc/salome/gui/SMESH/input/index.rst b/doc/salome/gui/SMESH/input/index.rst index b660a2ed3..c6a2ade37 100644 --- a/doc/salome/gui/SMESH/input/index.rst +++ b/doc/salome/gui/SMESH/input/index.rst @@ -3,23 +3,58 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to SMESH's documentation! -================================= +*************************** +Introduction to Mesh module +*************************** -.. toctree:: - :maxdepth: 3 - - introduction.rst - about_meshes.rst - modifying_meshes.rst - grouping_elements.rst - about_filters.rst - viewing_meshes_overview.rst - about_quality_controls.rst - measurements.rst - using_notebook_smesh_page.rst - mesh_preferences.rst - smeshpy_interface.rst - tools.rst +.. image:: ../images/a-viewgeneral.png + :align: center + +**Mesh** module of SALOME is destined for: + +* :ref:`creating meshes ` in different ways: + + * by meshing geometrical models previously created or imported by the Geometry component; + * bottom-up, using :ref:`mesh edition `, especially :ref:`extrusion ` and :ref:`revolution `; + * by generation of the 3D mesh from the 2D mesh not based on the geometry (:ref:`imported ` for example); + +* :ref:`importing and exporting meshes ` in various formats; +* :ref:`modifying meshes ` with a vast array of dedicated operations; +* :ref:`creating groups ` of mesh elements; +* filtering mesh entities (nodes or elements) using :ref:`Filters ` functionality for :ref:`creating groups ` and applying :ref:`mesh modifications `; +* :ref:`viewing meshes ` in the VTK viewer and :ref:`getting info ` on mesh and its sub-objects; +* applying to meshes :ref:`Quality Controls `, allowing to highlight important elements; +* taking various :ref:`measurements ` of the mesh objects. + +There is a set of :ref:`tools ` plugged-in the module to extend the basic functionality listed above. + +Almost all mesh module functionalities are accessible via :ref:`smeshpy_interface_page`. + +It is possible to use the variables predefined in :ref:`Salome notebook ` to set parameters of operations. +Mesh module preferences are described in the :ref:`mesh_preferences_page` section of SALOME Mesh Help. + +.. image:: ../images/image7.jpg + :align: center + +.. centered:: + Example of MESH module usage for engineering tasks + + +**Table of Contents** + +.. toctree:: + :titlesonly: + :maxdepth: 3 + about_meshes + modifying_meshes + grouping_elements + about_filters + about_quality_controls + measurements + viewing_meshes_overview + smeshpy_interface + tools + mesh_preferences + using_notebook_smesh_page diff --git a/doc/salome/gui/SMESH/input/introduction.rst b/doc/salome/gui/SMESH/input/introduction.rst deleted file mode 100644 index 9d94c31f2..000000000 --- a/doc/salome/gui/SMESH/input/introduction.rst +++ /dev/null @@ -1,50 +0,0 @@ -*************************** -Introduction to Mesh module -*************************** - -.. image:: ../images/a-viewgeneral.png - :align: center - -**Mesh** module of SALOME is destined for: - -* :ref:`creating meshes ` in different ways: - * by meshing geometrical models previously created or imported by the Geometry component; - * bottom-up, using :ref:`modifying_meshes_page`, especially :ref:`extrusion_page` and :ref:`revolution_page`; - * by generation of the 3D mesh from the 2D mesh not based on the geometry (:ref:`importing_exporting_meshes_page` for example); - -* :ref:`importing_exporting_meshes_page` in various formats; -* :ref:`modifying_meshes_page` with a vast array of dedicated operations; -* :ref:`grouping_elements_page` of mesh elements; -* filtering mesh entities (nodes or elements) using :ref:`filters_page` functionality for :ref:`grouping_elements_page` and applying :ref:`modifying_meshes_page`; -* :ref:`viewing_meshes_overview_page` in the VTK viewer and :ref:`mesh_infos_page` on mesh and its sub-objects; -* applying to meshes :ref:`quality_page`, allowing to highlight important elements; -* taking various :ref:`measurements_page` of the mesh objects. - - -It is possible to use the variables predefined in :ref:`using_notebook_mesh_page` to set parameters of operations. -Mesh module preferences are described in the :ref:`mesh_preferences_page` section of SALOME Mesh Help. -Almost all mesh module functionalities are accessible via :ref:`smeshpy_interface_page`. -There is a set of :ref:`tools_page` plugged-in the module to extend the basic functionality listed above. - -.. image:: ../images/image7.jpg - :align: center - -.. centered:: - "Example of MESH module usage for engineering tasks" - - -.. toctree:: - :maxdepth: 3 - :hidden: - - about_meshes.rst - modifying_meshes.rst - grouping_elements.rst - about_filters.rst - viewing_meshes_overview.rst - about_quality_controls.rst - measurements.rst - using_notebook_smesh_page.rst - mesh_preferences.rst - smeshpy_interface.rst - tools.rst diff --git a/doc/salome/gui/SMESH/input/length.rst b/doc/salome/gui/SMESH/input/length.rst index a3462857d..a873984c8 100644 --- a/doc/salome/gui/SMESH/input/length.rst +++ b/doc/salome/gui/SMESH/input/length.rst @@ -9,5 +9,5 @@ Length quality control criterion returns a value of length of edge. .. image:: ../images/length-crit.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_length_1d` operation. +**See Also** a sample TUI Script of a :ref:`tui_length_1d` filter. diff --git a/doc/salome/gui/SMESH/input/length_2d.rst b/doc/salome/gui/SMESH/input/length_2d.rst index eb586a8e6..7a1f81113 100644 --- a/doc/salome/gui/SMESH/input/length_2d.rst +++ b/doc/salome/gui/SMESH/input/length_2d.rst @@ -6,16 +6,13 @@ Length 2D This quality control criterion consists of calculation of length of the links between corner nodes of mesh faces. -**To apply the Length 2D quality criterion to your mesh:** +*To apply the Length 2D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Length 2D** or click **"Length 2D"** button in the toolbar. +.. |img| image:: ../images/image34.png -.. image:: ../images/image34.png - :align: center +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Length 2D** or click *"Length 2D"* button |img| in the toolbar. -.. centered:: - **"Length 2D" button** Your mesh will be displayed in the viewer with links colored according to the applied mesh quality control criterion: @@ -23,6 +20,4 @@ Your mesh will be displayed in the viewer with links colored according to the ap :align: center -**See Also** a sample TUI Script of a :ref:`tui_length_2d` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_length_2d` filter. diff --git a/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst b/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst index d10985f77..a88c20f72 100644 --- a/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst +++ b/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst @@ -10,35 +10,29 @@ This functionality allows to generate mesh elements on the borders of elements o :align: center .. centered:: - "Missing 2D elements were generated" + Missing 2D elements were generated -**To generate border elements:** +*To generate border elements:* -#. Select a mesh or group in the Object Browser or in the 3D Viewer -#. From the Modification menu choose "Create boundary elements" item, or click "Create boundary elements" button in the toolbar - - .. image:: ../images/2d_from_3d_ico.png - :align: center - - .. centered:: - "Create boundary elements icon" +.. |img| image:: ../images/2d_from_3d_ico.png +#. Select a mesh or group in the Object Browser or in the 3D Viewer +#. From the **Modification** menu choose **Create boundary elements** item, or click "Create boundary elements" button |img| in the toolbar - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/2d_from_3d_dlg.png :align: center .. centered:: - "Create boundary elements dialog box". - + Create boundary elements dialog box #. Check in the dialog box one of two radio buttons corresponding to the type of operation you would like to perform. #. Fill the other fields available in the dialog box. #. Click the **Apply** or **Apply and Close** button to perform the operation. -"Create boundary elements" dialog allows creation of boundary elements of two types. +*Create boundary elements* dialog allows creation of boundary elements of two types. * **2D from 3D** creates missing mesh faces on free facets of volume elements * **1D from 2D** creates missing mesh edges on free edges of mesh faces diff --git a/doc/salome/gui/SMESH/input/max_element_length_2d.rst b/doc/salome/gui/SMESH/input/max_element_length_2d.rst index 645807205..6e2fa0374 100644 --- a/doc/salome/gui/SMESH/input/max_element_length_2d.rst +++ b/doc/salome/gui/SMESH/input/max_element_length_2d.rst @@ -6,22 +6,16 @@ Element Diameter 2D This quality control criterion consists in calculation of the maximal length of edges and diagonals of 2D mesh elements (triangles and quadrangles). For polygons the value is always zero. -**To apply the Element Diameter 2D quality criterion to your mesh:** +*To apply the Element Diameter 2D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Element Diameter 2D** or click **"Element Diameter 2D"** button in the toolbar. - - .. image:: ../images/image42.png - :align: center +.. |img| image:: ../images/image42.png - .. centered:: - **"Element Diameter 2D" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Element Diameter 2D** or click *"Element Diameter 2D"* button |img| in the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/max_element_length_2d.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_max_element_length_2d` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_max_element_length_2d` filter. diff --git a/doc/salome/gui/SMESH/input/max_element_length_3d.rst b/doc/salome/gui/SMESH/input/max_element_length_3d.rst index 0e65c41be..9e2adb803 100644 --- a/doc/salome/gui/SMESH/input/max_element_length_3d.rst +++ b/doc/salome/gui/SMESH/input/max_element_length_3d.rst @@ -6,23 +6,17 @@ Element Diameter 3D This quality control criterion consists in calculation of the maximal length of edges and diagonals of 3D mesh elements (tetrahedrons, pyramids, etc). For polyhedra the value is always zero. -**To apply the Element Diameter 3D quality criterion to your mesh:** +*To apply the Element Diameter 3D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Volume Controls > Element Diameter 3D** or click **"Element Diameter 3D"** button in the toolbar. - - .. image:: ../images/image43.png - :align: center +.. |img| image:: ../images/image43.png - .. centered:: - **"Element Diameter 3D" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Element Diameter 3D** or click *"Element Diameter 3D"* button |img| in the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/max_element_length_3d.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_max_element_length_3d` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_max_element_length_3d` filter. diff --git a/doc/salome/gui/SMESH/input/merging_elements.rst b/doc/salome/gui/SMESH/input/merging_elements.rst index 5c9b80f95..43a27090e 100644 --- a/doc/salome/gui/SMESH/input/merging_elements.rst +++ b/doc/salome/gui/SMESH/input/merging_elements.rst @@ -10,7 +10,7 @@ This functionality allows to merge coincident elements of a mesh. Two elements a :align: center .. centered:: - "Merge elements menu button" + *"Merge elements"* menu button To merge elements choose in the main menu **Modification** -> **Transformation** -> **Merge elements** item. The following dialog box shall appear: @@ -19,9 +19,10 @@ To merge elements choose in the main menu **Modification** -> **Transformation** In this dialog: - * Name is the name of the mesh object whose elements will be merged. + * **Name** is the name of the mesh object whose elements will be merged. * **Automatic** or **Manual** Mode allows choosing how the elements are processed. In the **Automatic** Mode all elements created on the same nodes will be merged. In **Manual** mode you can adjust groups of coincident elements detected by the program. - If the **Manual** Mode is selected, additional controls are available: + + If the **Manual** Mode is selected, additional controls are available: .. image:: ../images/mergeelems.png :align: center @@ -35,30 +36,27 @@ In this dialog: * **Show double elements IDs** check-box shows/hides identifiers of elements of the selected groups in the 3D viewer. * **Edit selected group of coincident elements** list allows editing the selected group: - .. image:: ../images/add.png - :align: center + .. image:: ../images/add.png + :align: center - .. centered:: - adds to the group the elements selected in the viewer. + * adds to the group the elements selected in the viewer. - .. image:: ../images/remove.png - :align: center + .. image:: ../images/remove.png + :align: center - .. centered:: - removes the selected elements from the group. + * removes the selected elements from the group. - .. image:: ../images/sort.png - :align: center + .. image:: ../images/sort.png + :align: center - .. centered:: - moves the selected element to the first position in the group in order to keep it in the mesh. + * moves the selected element to the first position in the group in order to keep it in the mesh. * To confirm your choice click **Apply** or **Apply and Close** button. -In this picture you see a triangle which coincides with one of the elements of the mesh. After we apply **Merge Elements** functionality, the triangle will be completely merged with the mesh. +In the following picture you see a triangle which coincides with one of the elements of the mesh. After we apply **Merge Elements** functionality, the triangle will be completely merged with the mesh. .. image:: ../images/meshtrianglemergeelem1.png :align: center diff --git a/doc/salome/gui/SMESH/input/merging_nodes.rst b/doc/salome/gui/SMESH/input/merging_nodes.rst index 5890279f4..e7bba52d4 100644 --- a/doc/salome/gui/SMESH/input/merging_nodes.rst +++ b/doc/salome/gui/SMESH/input/merging_nodes.rst @@ -10,9 +10,9 @@ This functionality allows user to detect groups of coincident nodes with specifi :align: center .. centered:: - "Merge nodes menu button" + *"Merge nodes"* menu button -**To merge nodes of your mesh:** +*To merge nodes of your mesh:* #. Choose **Modification** -> **Transformation** -> **Merge nodes** menu item. The following dialog box shall appear: @@ -53,37 +53,32 @@ This functionality allows user to detect groups of coincident nodes with specifi * **Edit selected group of coincident nodes** list allows editing the selected group: - .. image:: ../images/add.png - :align: center + .. image:: ../images/add.png + :align: center - .. centered:: - adds to the group the nodes selected in the viewer. + * adds to the group the nodes selected in the viewer. - .. image:: ../images/remove.png - :align: center + .. image:: ../images/remove.png + :align: center - .. centered:: - removes from the group the selected nodes. + * removes from the group the selected nodes. - .. image:: ../images/sort.png - :align: center + .. image:: ../images/sort.png + :align: center - .. centered:: - moves the selected node to the first position in the group in order to keep it in the mesh. + * moves the selected node to the first position in the group in order to keep it in the mesh. #. To confirm your choice click **Apply** or **Apply and Close** button. -.. image:: ../images/merging_nodes1.png - :align: center +.. figure:: ../images/merging_nodes1.png + :align: center -.. centered:: - The initial object. Nodes 25, 26 and 5 are added to **Nodes to keep during the merge** group. + The initial object. Nodes 25, 26 and 5 are added to **Nodes to keep during the merge** group. -.. image:: ../images/merging_nodes2.png - :align: center +.. figure:: ../images/merging_nodes2.png + :align: center -.. centered:: - The object has been merged + The object has been merged **See Also** a sample TUI Script of a :ref:`tui_merging_nodes` operation. diff --git a/doc/salome/gui/SMESH/input/mesh_infos.rst b/doc/salome/gui/SMESH/input/mesh_infos.rst index 738623d90..c12109aa5 100644 --- a/doc/salome/gui/SMESH/input/mesh_infos.rst +++ b/doc/salome/gui/SMESH/input/mesh_infos.rst @@ -6,27 +6,24 @@ Mesh Information The user can obtain information about the selected mesh object (mesh, sub-mesh or group) using **Mesh Information** dialog box. -To view the **Mesh Information**, select your mesh, sub-mesh or group in the **Object Browser** and invoke **Mesh Information** item from the **Mesh** menu or from the context menu, or click **"Mesh Information"** button in the toolbar. +.. |img| image:: ../images/image49.png -.. image:: ../images/image49.png - :align: center +To view the **Mesh Information**, select your mesh, sub-mesh or group in the **Object Browser** and invoke **Mesh Information** item from the **Mesh** menu or from the context menu, or click *"Mesh Information"* button |img| in the toolbar. -.. centered:: - **"Mesh Information" button** The **Mesh Information** dialog box provides three tab pages: -* :ref:`advanced_mesh_infos_anchor` - to show base and quantitative information about the selected mesh object. -* :ref:`mesh_element_info_anchor` - to show detailed information about the selected mesh nodes or elements. -* :ref:`mesh_addition_info_anchor` - to show additional information available for the selected mesh, sub-mesh or group object. -* :ref:`mesh_quality_info_anchor` - to show overall quality information about the selected mesh, sub-mesh or group object. +* :ref:`Base Info ` - to show base and quantitative information about the selected mesh object. +* :ref:`Element Info ` - to show detailed information about the selected mesh nodes or elements. +* :ref:`Additional Info ` - to show additional information available for the selected mesh, sub-mesh or group object. +* :ref:`Quality Info ` - to show overall quality information about the selected mesh, sub-mesh or group object. .. _dump_mesh_infos: Dump Mesh Infos ############### -The button **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` preferences. +The button **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 ` preferences. .. _advanced_mesh_infos_anchor: @@ -39,7 +36,7 @@ The **Base Info** tab page of the dialog box provides general information on the :align: center .. centered:: - **"Base Info" page** + *"Base Info"* page .. _mesh_element_info_anchor: @@ -59,7 +56,7 @@ The **Element Info** tab page of the dialog box gives detailed information about :align: center .. centered:: - **"Element Info" page, node information** + *"Element Info"* page, node information * For an element: @@ -75,13 +72,14 @@ The **Element Info** tab page of the dialog box gives detailed information about :align: center .. centered:: - **"Element Info" page, element information** + *"Element Info"* page, element information The user can either input the ID of a node or element he wants to analyze directly in the dialog box or select the node(s) or element(s) in the 3D viewer. + If **Show IDs** is activated, IDs of selected nodes or elements are displayed in the 3D viewer. .. 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 rasons, this information is shown in a short form (group names only). The detailed information on groups can be switched on via :ref:`group_detail_info_pref` option of :ref:`mesh_preferences_page`. + 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 rasons, this information is shown in a short form (group names only). The detailed information on groups can be switched on via :ref:`Show details on groups in element information tab ` option of :ref:`mesh_preferences_page`. .. _mesh_addition_info_anchor: @@ -103,7 +101,7 @@ For a mesh object, the following information is shown: :align: center .. centered:: - **"Additional Info" page, mesh information** + *"Additional Info"* page, mesh information For a sub-mesh object, the following information is shown: @@ -116,7 +114,7 @@ For a sub-mesh object, the following information is shown: :align: center .. centered:: - **"Additional Info" page, sub-mesh information** + *"Additional Info"* page, sub-mesh information .. _mesh_addition_info_group_anchor: @@ -138,11 +136,11 @@ For a group object, the following information is shown: :align: center .. centered:: - **"Additional Info" page, group information** + *"Additional Info"* page, group information .. note:: - For the performance reasons, the number of underlying nodes is computed only by demand. For this, the user should press the "Compute" button (see picture). Also, the number of underlying nodes is automatically calculated if the size of the group does not exceed the :ref:`nb_nodes_limit_pref` preference value (zero value means no limit). + For the performance reasons, the number of underlying nodes is computed only by demand. For this, the user should press the "Compute" button (see picture). Also, the number of underlying nodes is automatically calculated if the size of the group does not exceed the :ref:`Automatic nodes compute limit ` preference value (zero value means no limit). .. _mesh_quality_info_anchor: @@ -171,18 +169,18 @@ The **Quality Info** tab provides overall information about mesh quality control :align: center .. centered:: - **"Quality Info" page** + *"Quality Info"* page .. note:: - It is possible to change **Double nodes tolerance**, which will be used upon consequent pressing *Compute* button. The default value of the tolerance can be set via the :ref:`dbl_nodes_tol_pref` preferences. + It is possible to change **Double nodes tolerance**, which will be used upon consequent pressing *Compute* button. The default value of the tolerance can be set via the :ref:`Quality controls ` preferences. .. note:: - For performance reasons, all quality control values for big meshes are computed only by demand. For this, press the *Compute* button. Also, values are automatically computed if the number of nodes / elements does not exceed the :ref:`auto_control_limit_pref` set via the :ref:`mesh_information_pref` preferences (zero value means that there is no limit). + For performance reasons, all quality control values for big meshes are computed only by demand. For this, press the *Compute* button. Also, values are automatically computed if the number of nodes / elements does not exceed the :ref:`Automatic controls compute limit ` set via the :ref:`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). -See the :ref:`tui_viewing_mesh_infos`. +See the :ref:`TUI Example `. diff --git a/doc/salome/gui/SMESH/input/mesh_preferences.rst b/doc/salome/gui/SMESH/input/mesh_preferences.rst index 001056b44..ccf0f7636 100644 --- a/doc/salome/gui/SMESH/input/mesh_preferences.rst +++ b/doc/salome/gui/SMESH/input/mesh_preferences.rst @@ -14,142 +14,111 @@ General Preferences .. _automatic_update_pref: -Automatic Update -================= - * **Automatic Update** - * **Automatic Update** - if activated, the mesh in your viewer will be automatically updated after it's computation, depending on values of additional preferences specified below. - * **Size limit (elements)** - allows specifying the maximum number of elements in the resulting mesh for which the automatic updating of the presentation is performed. This option affects only :ref:`compute_anchor` operation. Zero value means "no limit". Default value is 500 000 mesh elements. - * **Incremental limit check** - if activated, the mesh size limit check is not applied to the total number of elements in the resulting mesh, it is applied iteratively to each entity type in the following order: 0D elements, edges, faces, volumes, balls. At each step the number of entities of a certain type is added to the total number of elements computed at the previous step - if the resulting 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. + * **Automatic Update** - if activated, the mesh in your viewer will be automatically updated after it's computation, depending on values of additional preferences specified below. + * **Size limit (elements)** - allows specifying the maximum number of elements in the resulting mesh for which the automatic updating of the presentation is performed. This option affects only :ref:`Compute ` operation. Zero value means "no limit". Default value is 500 000 mesh elements. + * **Incremental limit check** - if activated, the mesh size limit check is not applied to the total number of elements in the resulting mesh, it is applied iteratively to each entity type in the following order: 0D elements, edges, faces, volumes, balls. At each step the number of entities of a certain type is added to the total number of elements computed at the previous step - if the resulting 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. .. _display_mode_pref: -Display mode -============ - * **Display mode** - * **Default display mode** - allows to set Wireframe, Shading, Nodes or Shrink :ref:`display_mode_page` as default. -.. _quadratic_2d_mode_pref: + * **Default display mode** - allows to set Wireframe, Shading, Nodes or Shrink :ref:`presentation mode ` as default. -Quadratic 2D preferences -======================== +.. _quadratic_2d_mode_pref: * **Representation of the 2D quadratic elements** - * **Default mode of the 2D quadratic elements** - allows to select either *Lines* or *Arcs* as a default :ref:`quadratic_2d_mode` of 1D and 2D :ref:`adding_quadratic_elements_page`. - * **Maximum Angle** - maximum deviation angle used by the application to build arcs. + + * **Default mode of the 2D quadratic elements** - allows to select either *Lines* or *Arcs* as a default :ref:`representation ` of 1D and 2D :ref:`quadratic elements `. + * **Maximum Angle** - maximum deviation angle used by the application to build arcs. * **Quality Controls** - * **Display entity** - if activated, only currently :ref:`quality_page` entities are displayed in the viewer and other entities are temporarily hidden. For example if you activate :ref:`length_page` quality control, which controls the length of mesh segments, then only mesh segments are displayed and faces and volumes are hidden. - * **Use precision** - if activated, all quality controls will be computed at precision defined by **Number of digits after point** - as integers by default. -.. _dbl_nodes_tol_pref: + * **Display entity** - if activated, only currently :ref:`controlled ` entities are displayed in the viewer and other entities are temporarily hidden. For example if you activate :ref:`Length ` quality control, which controls the length of mesh segments, then only mesh segments are displayed and faces and volumes are hidden. + * **Use precision** - if activated, all quality controls will be computed at precision defined by **Number of digits after point** - as integers by default. -Double nodes tolerance -====================== +.. _dbl_nodes_tol_pref: - * **Double nodes tolerance** - defines the maximal distance between two mesh nodes, at which they are considered coincident by :ref:`double_nodes_control_page` quality control. This value is also used in :ref:`mesh_quality_info_anchor` tab page of :ref:`mesh_infos_page` dialog. + * **Double nodes tolerance** - defines the maximal distance between two mesh nodes, at which they are considered coincident by :ref:`Double nodes ` quality control. This value is also used in :ref:`Quality Info ` tab page of :ref:`Mesh Information ` dialog. * **Mesh export** .. _export_auto_groups_pref: -Automatically create groups for MED export -========================================== - - * **Automatically create groups for MED export** - defines a default state of a corresponding check-box in :ref:`export_auto_groups` dialog. + * **Automatically create groups for MED export** - defines a default state of a corresponding check-box in :ref:`MED Export ` dialog. .. _group_export_warning_pref: -Show warning when exporting group -================================= - - * **Show warning when exporting group** - if activated, a warning is displayed when exporting a group. + * **Show warning when exporting group** - if activated, a warning is displayed when exporting a group. .. _show_comp_result_pref: -Mesh computation -================ - * **Mesh computation** - * **Show a computation result notification** - allows to select the notification mode about a :ref:`compute_anchor` result. There are 3 possible modes: - * **Never** - not to show the :ref:`meshing_result_anchor` at all; + + * **Show a computation result notification** - allows to select the notification mode about a :ref:`mesh computation ` result. There are 3 possible modes: + * **Never** - not to show the :ref:`result dialog ` at all; * **Errors only** - the result dialog will be shown if there were some errors during a mesh computation; * **Always** - show the result dialog after each mesh computation. This is a default mode. .. _mesh_information_pref: -Mesh information -================ - * **Mesh information** - * **Mesh element information** - allows changing the way :ref:`mesh_element_info_anchor` is shown: + * **Mesh element information** - allows changing the way :ref:`mesh element information ` is shown: * **Simple** - as a plain text * **Tree** - in a tree-like form .. _nb_nodes_limit_pref: -Automatic nodes compute limit -============================= - - * **Automatic nodes compute limit** - allows defining the size limit for the :ref:`mesh_addition_info_group_anchor` for which the number of underlying nodes is calculated automatically. If the group size exceeds the value set in the preferences, 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. + * **Automatic nodes compute limit** - allows defining the size limit for the :ref:`mesh groups ` for which the number of underlying nodes is calculated automatically. If the group size exceeds the value set in the preferences, 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. .. _auto_control_limit_pref: -Automatic controls compute limit -================================ - - * **Automatic controls compute limit** - allows defining a maximal number of mesh elements for which the quality controls in the :ref:`mesh_quality_info_anchor` tab page are calculated automatically. If the number of mesh elements exceeds the value set in the preferences, it is necessary to press **Compute** button explicitly to calculate a quality measure. Zero value means "no limit". By default the value is set to 3 000 mesh elements. + * **Automatic controls compute limit** - allows defining a maximal number of mesh elements for which the quality controls in the :ref:`Quality Information ` tab page are calculated automatically. If the number of mesh elements exceeds the value set in the preferences, it is necessary to press **Compute** button explicitly to calculate a quality measure. Zero value means "no limit". By default the value is set to 3 000 mesh elements. .. _group_detail_info_pref: -Detailed info for groups -======================== - - * **Show details on groups in element information tab** - when 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` tab of "Mesh Information" dialog box. If this option is switched on, the detailed information on groups is shown. - * **Dump base information** - allows dumping base mesh information to the file, see :ref:`dump_mesh_infos`. - * **Dump element information** - allows dumping element information to the file, see :ref:`dump_mesh_infos`. - * **Dump additional information** - allows dumping additional mesh information to the file, see :ref:`dump_mesh_infos`. - * **Dump controls information** - allows dumping quality mesh information to the file, see :ref:`dump_mesh_infos`. + * **Show details on groups in element information tab** - when this option is switched off (default), only the names of groups, to which the node or element belongs, are shown in the :ref:`Element Info ` tab of "Mesh Information" dialog box. If this option is switched on, the detailed information on groups is shown. + * **Dump base information** - allows dumping base mesh information to the file, see :ref:`Mesh Information `. + * **Dump element information** - allows dumping element information to the file, see :ref:`Mesh Information `. + * **Dump additional information** - allows dumping additional mesh information to the file, see :ref:`Mesh Information `. + * **Dump controls information** - allows dumping quality mesh information to the file, see :ref:`Mesh Information `. * **Automatic Parameters** .. _diagonal_size_ratio_pref: -Ratio Bounding Box Diagonal -=========================== - - * **Ratio Bounding Box Diagonal / Max Size** - defines the ratio between the bounding box of the meshed object and the Max Size of segments. It is used as a default value of :ref:`a1d_meshing_hypo_page` defining length of segments, especially by :ref:`max_length_anchor` hypothesis. + * **Ratio Bounding Box Diagonal / Max Size** - defines the ratio between the bounding box of the meshed object and the Max Size of segments. It is used as a default value of :ref:`1D Meshing Hypotheses ` defining length of segments, especially by :ref:`Max Size ` hypothesis. .. _nb_segments_pref: -Default Number of Segments -========================== - - * **Default Number of Segments** - defines the default number of segments in :ref:`number_of_segments_anchor` hypothesis. + * **Default Number of Segments** - defines the default number of segments in :ref:`Number of Segments ` hypothesis. * **Mesh loading** - * **No mesh loading from study file at hypothesis modification** - if activated, the mesh data will not be loaded from the study file 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. + * **No mesh loading from study file at hypothesis modification** - if activated, the mesh data will not be loaded from the study file 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. * **Input fields precision** - allows to adjust input precision of different parameters. The semantics of the precision values is described in detail in **Using input widgets** chapter of GUI documentation (Introduction to Salome Platform / Introduction to GUI / Using input widgets). In brief: **positive** precision value is the maximum allowed number of digits after the decimal point in the fixed-point format; **negative** precision value is the maximum allowed number of significant digits in mantissa in either the fixed-point or scientific format. - * **Length precision** - allows to adjust input precision of coordinates and dimensions. - * **Angular precision** - allows to adjust input precision of angles. - * **Length tolerance precision** - allows to adjust input precision of tolerance of coordinates and dimensions. - * **Parametric precision** - allows to adjust input precision of parametric values. - * **Area precision** - allows to adjust input precision of mesh element area. - * **Volume precision** - allows to adjust input precision of mesh element volume. + * **Length precision** - allows to adjust input precision of coordinates and dimensions. + * **Angular precision** - allows to adjust input precision of angles. + * **Length tolerance precision** - allows to adjust input precision of tolerance of coordinates and dimensions. + * **Parametric precision** - allows to adjust input precision of parametric values. + * **Area precision** - allows to adjust input precision of mesh element area. + * **Volume precision** - allows to adjust input precision of mesh element volume. * **Preview** - * **Sub-shapes preview chunk size** - allows to limit the number of previewed sub-shapes shown in the hypotheses creation dialog boxes, for example "Reverse Edges" parameter of :ref:`number_of_segments_anchor` hypothesis. + +.. _chunk_size_pref: + + * **Sub-shapes preview chunk size** - allows to limit the number of previewed sub-shapes shown in the hypotheses creation dialog boxes, for example "Reverse Edges" parameter of :ref:`Number of Segments ` hypothesis. * **Python Dump** - * **Historical python dump** - allows switching between *Historical* and *Snapshot* dump mode: - * In *Historical* mode, Python Dump script includes all commands performed by SMESH engine. - * In *Snapshot* mode, the commands relating to objects removed from the Study as well as the commands not influencing the current state of meshes are excluded from the script. + + * **Historical python dump** - allows switching between *Historical* and *Snapshot* dump mode: + * In *Historical* mode, Python Dump script includes all commands performed by SMESH engine. + * In *Snapshot* mode, the commands relating to objects removed from the Study as well as the commands not influencing the current state of meshes are excluded from the script. .. _mesh_tab_preferences: @@ -161,40 +130,45 @@ Mesh Preferences .. image:: ../images/pref22.png :align: center -* **Nodes** - allows to define default parameters for nodes, which will be applied for a newly created mesh only. Existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. - * **Color** - allows to select the color of nodes. Click on the downward arrow near the colored line to access to the **Select Color** dialog box. - * **Type of marker** - allows to define the shape of nodes. - * **Scale of marker** - allows to define the size of nodes. - -* **Elements** - allows to define default parameters for different elements, which will be applied to a newly created mesh only. Existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. - * **Surface color** - allows to select the surface color of 2D elements (seen in Shading mode). Click on the downward arrow near the colored line to access to the **Select Color** dialog box. - * **Back surface color** - allows to select the back surface color of 2D elements. This is useful to differ 2d elements with reversed orientation. Use the slider to select the color generated basing on the **Surface color** by changing its brightness and saturation. - * **Volume color** - allows to select the surface color of 3D elements (seen in Shading mode). - * **Reversed volume color** - allows to select the surface color of reversed 3D elements. Use the slider to select the color generated basing on the **Volume color** by changing its brightness and saturation. - * **0D element color** - allows to choose color of 0D mesh elements. - * **Ball color** - allows to choose color of discrete mesh elements (balls). - * **Outline color** - allows to select the color of element borders. - * **Wireframe color** - allows to select the color of borders of elements in the wireframe mode. - * **Preview color** - allows to select the preview color of the elements, which is used while :ref:`adding_nodes_and_elements_page`. - * **Size of 0D elements** - specifies default size of 0D elements. - * **Size of ball elements** - specifies default size of discrete elements (balls). - * **Scale factor of ball elements** - specifies default scale factor of discrete elements (balls) allowing to adjust their size in the Viewer. - * **Line width** - allows to define the width of 1D elements (segments). - * **Outline width** - allows to define the width of borders of 2D and 3D elements (shown in the Shading mode). - * **Shrink coef.** - allows to define relative size of a shrunk element compared a non-shrunk element in percents in the shrink mode. +* **Nodes** - allows to define default parameters for nodes, which will be applied for a newly created mesh only. Existing meshes can be customized using :ref:`Properties dialog box ` available from the context menu of a mesh. + + * **Color** - allows to select the color of nodes. Click on the downward arrow near the colored line to access to the **Select Color** dialog box. + * **Type of marker** - allows to define the shape of nodes. + * **Scale of marker** - allows to define the size of nodes. + +* **Elements** - allows to define default parameters for different elements, which will be applied to a newly created mesh only. Existing meshes can be customized using :ref:`Properties dialog box ` available from the context menu of a mesh. + + * **Surface color** - allows to select the surface color of 2D elements (seen in Shading mode). Click on the downward arrow near the colored line to access to the **Select Color** dialog box. + * **Back surface color** - allows to select the back surface color of 2D elements. This is useful to differ 2d elements with reversed orientation. Use the slider to select the color generated basing on the **Surface color** by changing its brightness and saturation. + * **Volume color** - allows to select the surface color of 3D elements (seen in Shading mode). + * **Reversed volume color** - allows to select the surface color of reversed 3D elements. Use the slider to select the color generated basing on the **Volume color** by changing its brightness and saturation. + * **0D element color** - allows to choose color of 0D mesh elements. + * **Ball color** - allows to choose color of discrete mesh elements (balls). + * **Outline color** - allows to select the color of element borders. + * **Wireframe color** - allows to select the color of borders of elements in the wireframe mode. + * **Preview color** - allows to select the preview color of the elements, which is used while :ref:`manual creation of elements `. + * **Size of 0D elements** - specifies default size of 0D elements. + * **Size of ball elements** - specifies default size of discrete elements (balls). + * **Scale factor of ball elements** - specifies default scale factor of discrete elements (balls) allowing to adjust their size in the Viewer. + * **Line width** - allows to define the width of 1D elements (segments). + * **Outline width** - allows to define the width of borders of 2D and 3D elements (shown in the Shading mode). + * **Shrink coef.** - allows to define relative size of a shrunk element compared a non-shrunk element in percents in the shrink mode. * **Groups** - * **Names color** - specifies color of group names to be used in the 3D viewer. - * **Default color** - specifies the default group color, which is used to create a new mesh group (see :ref:`creating_groups_page`). + + * **Names color** - specifies color of group names to be used in the 3D viewer. + * **Default color** - specifies the default group color, which is used to create a new mesh group (see :ref:`Create Group dialog box `). * **Numbering** allows to define properties of numbering functionality: - * **Nodes** - specifies text properties of nodes numbering (font family, size, attributes, color). - * **Elements** - same for elements. -* **Orientation of Faces** - allows to define default properties of orientation vectors. These preferences will be applied to the newly created meshes only; properties of existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. - * **Color** - allows to define the color of orientation vectors; - * **Scale** - allows to define the size of orientation vectors; - * **3D Vector** - allows to choose between 2D planar and 3D vectors. + * **Nodes** - specifies text properties of nodes numbering (font family, size, attributes, color). + * **Elements** - same for elements. + +* **Orientation of Faces** - allows to define default properties of orientation vectors. These preferences will be applied to the newly created meshes only; properties of existing meshes can be customized using :ref:`Properties dialog box ` available from the context menu of a mesh. + + * **Color** - allows to define the color of orientation vectors; + * **Scale** - allows to define the size of orientation vectors; + * **3D Vector** - allows to choose between 2D planar and 3D vectors. Selection Preferences ##################### @@ -203,11 +177,13 @@ Selection Preferences :align: center * **Selection** - performed with mouse-indexing (preselection) and left-clicking on an object, whose appearance changes as defined in the **Preferences**. - * **Object color** - allows to select the color of mesh (edges and borders of meshes) of the selected entity. Click on the colored line to access to the **Select Color** dialog box. - * **Element color** - allows to select the color of surface of selected elements (seen in Shading mode). Click on the colored line to access to the **Select Color** dialog box. + + * **Object color** - allows to select the color of mesh (edges and borders of meshes) of the selected entity. Click on the colored line to access to the **Select Color** dialog box. + * **Element color** - allows to select the color of surface of selected elements (seen in Shading mode). Click on the colored line to access to the **Select Color** dialog box. * **Preselection** - performed with mouse-indexing on an object, whose appearance changes as defined in the **Preferences**. - * **Highlight color** - allows to select the color of mesh (edges and borders of meshes) of the entity. Click on the colored line to access to the **Select Color** dialog box. + + * **Highlight color** - allows to select the color of mesh (edges and borders of meshes) of the entity. Click on the colored line to access to the **Select Color** dialog box. * **Precision** - in this menu you can set the value of precision used for **Nodes**, **Elements** and **Objects**. @@ -218,7 +194,7 @@ Scalar Bar Preferences :align: center .. note:: - The following settings are default and will be applied to a newly created mesh only. Existing meshes can be customized using local :ref:`scalar_bar_dlg` available from the context menu of a mesh. + The following settings are default and will be applied to a newly created mesh only. Existing meshes can be customized using local :ref:`Scalar Bar Properties dialog box ` available from the context menu of a mesh. * **Font** - in this menu you can set type, face and color of the font of **Title** and **Labels**. diff --git a/doc/salome/gui/SMESH/input/mesh_through_point.rst b/doc/salome/gui/SMESH/input/mesh_through_point.rst index 1a788c725..0065e2478 100644 --- a/doc/salome/gui/SMESH/input/mesh_through_point.rst +++ b/doc/salome/gui/SMESH/input/mesh_through_point.rst @@ -5,33 +5,34 @@ Moving nodes ************ In mesh you can define a node at a certain point either + * by movement of the node closest to the point or * by movement of a selected node to the point. -**To displace a node:** +*To displace a node:* -#. From the **Modification** menu choose the **Move node** item or click **"Move Node"** button in the toolbar. +#. From the **Modification** menu choose the **Move node** item or click *"Move Node"* button in the toolbar. .. image:: ../images/image67.png :align: center .. centered:: - **"Move Node" button** + *"Move Node"* button - The following dialog will appear: + The following dialog will appear: .. image:: ../images/meshtopass1.png :align: center .. centered:: - "Manual node selection" + Manual node selection .. image:: ../images/meshtopass2.png :align: center .. centered:: - "Automatic node selection" + Automatic node selection @@ -45,13 +46,13 @@ In mesh you can define a node at a certain point either :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/moving_nodes2.png :align: center .. centered:: - "The modified mesh" + The modified mesh **See Also** a sample TUI Script of a :ref:`tui_moving_nodes` operation. diff --git a/doc/salome/gui/SMESH/input/minimum_angle.rst b/doc/salome/gui/SMESH/input/minimum_angle.rst index 403c960b4..9eb9ae1aa 100644 --- a/doc/salome/gui/SMESH/input/minimum_angle.rst +++ b/doc/salome/gui/SMESH/input/minimum_angle.rst @@ -6,21 +6,17 @@ Minimum angle **Minimum angle** mesh quality criterion consists of calculation of the minimum value of angle between two adjacent sides of a 2D meshing element (triangle or quadrangle). -**To apply the Minimum angle quality criterion to your mesh:** +*To apply the Minimum angle quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Minimum angle** or click **"Minimum Angle"** button. - - .. image:: ../images/image38.png - :align: center +.. |img| image:: ../images/image38.png - .. centered:: - **"Minimum Angle" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Minimum angle** or click *"Minimum Angle"* button |img|. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image92.jpg :align: center -**See Also** a sample TUI Script of a :ref:`tui_minimum_angle` operation. +**See Also** a sample TUI Script of a :ref:`tui_minimum_angle` filter. diff --git a/doc/salome/gui/SMESH/input/modifying_meshes.rst b/doc/salome/gui/SMESH/input/modifying_meshes.rst index 73614e4f0..62c41498a 100644 --- a/doc/salome/gui/SMESH/input/modifying_meshes.rst +++ b/doc/salome/gui/SMESH/input/modifying_meshes.rst @@ -6,75 +6,76 @@ Modifying meshes Salome provides a vast specter of mesh modification and transformation operations, giving the possibility to: -* :ref:`adding_nodes_and_elements_page` mesh elements from nodes to polyhedrons at an arbitrary place in the mesh. -* :ref:`adding_quadratic_elements_page` mesh elements from quadratic segments to quadratic hexahedrons at an arbitrary place in the mesh. -* :ref:`removing_nodes_and_elements_page` any existin" mesh elements and nodes. -* :ref:`translation_page` in the indicated direction the mesh or some of its elements. -* :ref:`rotation_page` by the indicated axis and angle the mesh or some of its elements. -* :ref:`scale_page` the mesh or some of its elements. -* :ref:`symmetry_page` the mesh through a point, a vector or a plane of symmetry. +* :ref:`Add ` mesh elements from nodes to polyhedrons at an arbitrary place in the mesh. +* :ref:`Add quadratic ` mesh elements from quadratic segments to quadratic hexahedrons at an arbitrary place in the mesh. +* :ref:`Remove ` any existin" mesh elements and nodes. +* :ref:`Translate ` in the indicated direction the mesh or some of its elements. +* :ref:`Rotate ` by the indicated axis and angle the mesh or some of its elements. +* :ref:`Scale ` the mesh or some of its elements. +* :ref:`Mirror ` the mesh through a point, a vector or a plane of symmetry. * :ref:`double_nodes_page`. Duplication of nodes can be useful to emulate a crack in the model. -* Unite meshes by :ref:`sewing_meshes_page` free borders, border to side or side elements. -* :ref:`merging_nodes_page`, coincident within the indicated tolerance. -* :ref:`merging_elements_page` based on the same nodes. -* :ref:`mesh_through_point_page` to an arbitrary location with consequent transformation of all adjacent elements. -* :ref:`diagonal_inversion_of_elements_page` between neighboring triangles. -* :ref:`uniting_two_triangles_page`. -* :ref:`uniting_set_of_triangles_page`. -* :ref:`changing_orientation_of_elements_page` of the selected elements. -* :ref:`reorient_faces_page` by several means. -* :ref:`cutting_quadrangles_page` into two triangles. -* :ref:`split_to_tetra_page` volumic elements into tetrahedra or prisms. -* :ref:`split_biquad_to_linear_page` elements into linear ones without creation of additional nodes. -* :ref:`smoothing_page` elements, reducung distortions in them by adjusting the locations of nodes. -* Create an :ref:`extrusion_page` along a vector or by normal to a discretized surface. -* Create an :ref:`extrusion_along_path_page`. -* Create elements by :ref:`revolution_page` of the selected nodes and elements. -* Apply :ref:`pattern_mapping_page`. -* :ref:`convert_to_from_quadratic_mesh_page`, or vice versa. -* :ref:`make_2dmesh_from_3d_page`. +* Unite meshes by :ref:`sewing ` free borders, border to side or side elements. +* :ref:`Merge Nodes` coincident within the indicated tolerance. +* :ref:`Merge Elements ` based on the same nodes. +* :ref:`Move Nodes ` to an arbitrary location with consequent transformation of all adjacent elements. +* :ref:`Invert an edge ` between neighboring triangles. +* :ref:`Unite two triangles `. +* :ref:`Unite several adjacent triangles `. +* :ref:`Change orientation ` of the selected elements. +* :ref:`Orient faces ` by several means. +* :ref:`Cut a quadrangle ` into two triangles. +* :ref:`Split ` volumic elements into tetrahedra or prisms. +* :ref:`Split bi-quadratic ` elements into linear ones without creation of additional nodes. +* :ref:`Smooth ` elements, reducung distortions in them by adjusting the locations of nodes. +* Create an :ref:`extrusion ` along a vector or by normal to a discretized surface. +* Create an :ref:`extrusion along a path `. +* Create elements by :ref:`revolution ` of the selected nodes and elements. +* Apply :ref:`pattern mapping `. +* :ref:`Convert linear mesh to quadratic `, or vice versa. +* :ref:`Generate boundary elements `. * :ref:`generate_flat_elements_page`. * :ref:`cut_mesh_by_plane_page`. .. note:: - It is possible to :ref:`edit_anchor` of a lower dimension before generation of the mesh of a higher dimension. - + It is possible to :ref:`modify the mesh ` of a lower dimension before generation of the mesh of a higher dimension. .. note:: It is possible to use the variables defined in the SALOME **NoteBook** to specify the numerical parameters used for modification of any object. +**Table of Contents** + .. toctree:: - :maxdepth: 2 + :titlesonly: - adding_nodes_and_elements.rst - adding_quadratic_elements.rst - removing_nodes_and_elements.rst - translation.rst - rotation.rst - scale.rst - symmetry.rst - double_nodes_page.rst - sewing_meshes.rst - merging_nodes.rst - merging_elements.rst - mesh_through_point.rst - diagonal_inversion_of_elements.rst - uniting_two_triangles.rst - uniting_set_of_triangles.rst - changing_orientation_of_elements.rst - reorient_faces.rst - cutting_quadrangles.rst - split_to_tetra.rst - split_biquad_to_linear.rst - smoothing.rst - extrusion.rst - extrusion_along_path.rst - revolution.rst - pattern_mapping.rst - convert_to_from_quadratic_mesh.rst - make_2dmesh_from_3d.rst - generate_flat_elements.rst - cut_mesh_by_plane.rst + adding_nodes_and_elements.rst + adding_quadratic_elements.rst + removing_nodes_and_elements.rst + translation.rst + rotation.rst + scale.rst + symmetry.rst + double_nodes_page.rst + sewing_meshes.rst + merging_nodes.rst + merging_elements.rst + mesh_through_point.rst + diagonal_inversion_of_elements.rst + uniting_two_triangles.rst + uniting_set_of_triangles.rst + changing_orientation_of_elements.rst + reorient_faces.rst + cutting_quadrangles.rst + split_to_tetra.rst + split_biquad_to_linear.rst + smoothing.rst + extrusion.rst + extrusion_along_path.rst + revolution.rst + pattern_mapping.rst + convert_to_from_quadratic_mesh.rst + make_2dmesh_from_3d.rst + generate_flat_elements.rst + cut_mesh_by_plane.rst diff --git a/doc/salome/gui/SMESH/input/modules.rst b/doc/salome/gui/SMESH/input/modules.rst index c9365d7a7..35349ee00 100644 --- a/doc/salome/gui/SMESH/input/modules.rst +++ b/doc/salome/gui/SMESH/input/modules.rst @@ -1,967 +1,523 @@ -.. _modules_page: - -####### -Modules -####### - -******************************** -Auxiliary methods and structures -******************************** - -Functions: - -:meth:`def ParseParameters ` - -:meth:`def ParseAngles ` - -:meth:`def __initPointStruct ` - -:meth:`def __initAxisStruct ` - -:meth:`def IsEqual ` - -:meth:`def GetName ` - -:meth:`def TreatHypoStatus ` - -:meth:`def AssureGeomPublished ` - -:meth:`def FirstVertexOnCurve ` - -:meth:`def DumpPython ` - -:meth:`def SetDumpPythonHistorical ` - -:meth:`def init_smesh ` - -:meth:`def EnumToLong ` - -:meth:`def ColorToString ` - -:meth:`def GetPointStruct ` - -:meth:`def GetDirStruct ` - -:meth:`def MakeDirStruct ` - -:meth:`def GetAxisStruct ` - -:meth:`def SetName ` - -:meth:`def SetEmbeddedMode ` - -:meth:`def IsEmbeddedMode ` - -:meth:`def SetCurrentStudy ` - -:meth:`def GetCurrentStudy ` - -:meth:`def GetSubShapesId ` - -:meth:`def SetBoundaryBoxSegmentation ` - -:meth:`def GetSubShapeName ` - -:meth:`def GetLog ` - -:meth:`def ClearLog ` - -:meth:`def GetId ` - -:meth:`def GetStudyId ` - -:meth:`def GetIDSource ` +######################## +Structured documentation +######################## +.. contents:: +.. currentmodule:: smeshBuilder *************** -Creating Meshes +Creating meshes *************** -Functions: - -:meth:`def Concatenate ` +.. autosummary:: -:meth:`def CopyMesh ` + smeshBuilder.Concatenate + smeshBuilder.CopyMesh Importing and exporting meshes -############################## - -Functions: - -:meth:`def CreateMeshesFromUNV ` - -:meth:`def CreateMeshesFromMED ` - -:meth:`def CreateMeshesFromSAUV ` - -:meth:`def CreateMeshesFromSTL ` +============================== -:meth:`def CreateMeshesFromCGNS ` +.. autosummary:: -:meth:`def CreateMeshesFromGMF ` - -:meth:`def ExportMED ` - -:meth:`def ExportSAUV ` - -:meth:`def ExportDAT ` - -:meth:`def ExportUNV ` - -:meth:`def ExportSTL ` - -:meth:`def ExportCGNS ` - -:meth:`def ExportGMF ` - -:meth:`def ExportToMED ` + smeshBuilder.CreateMeshesFromUNV + smeshBuilder.CreateMeshesFromMED + smeshBuilder.CreateMeshesFromSTL + smeshBuilder.CreateMeshesFromCGNS + smeshBuilder.CreateMeshesFromGMF + smeshBuilder.CreateMeshesFromSAUV + Mesh.ExportMED + Mesh.ExportUNV + Mesh.ExportSTL + Mesh.ExportCGNS + Mesh.ExportDAT + Mesh.ExportSAUV + Mesh.ExportGMF Constructing meshes -################### - -Functions: - -:meth:`def Mesh ` - -:meth:`def __init__ ` - -:meth:`def SetMesh ` - -:meth:`def GetMesh ` - -:meth:`def SetName ` - -:meth:`def GetShape ` - -:meth:`def SetShape ` - -:meth:`def IsReadyToCompute ` - -:meth:`def GetAlgoState ` - -:meth:`def Evaluate ` - -:meth:`def Compute ` - -:meth:`def GetComputeErrors ` - -:meth:`def GetFailedShapes ` - -:meth:`def GetMeshOrder ` - -:meth:`def SetMeshOrder ` - -:meth:`def Clear ` - +=================== + +.. autosummary:: + + smeshBuilder.Mesh + Mesh.SetName + Mesh.SetMeshOrder + Mesh.Compute + Mesh.Evaluate + Mesh.Clear + Mesh.GetMesh + Mesh.GetShape + Mesh.GetComputeErrors + Mesh.GetAlgoState + Mesh.GetFailedShapes + Mesh.GetMeshOrder Defining Algorithms -################### - -Basic meshing algorithms -======================== - -Data Structures: - -:class:`class StdMeshersBuilder_Segment ` - -:class:`class StdMeshersBuilder_Segment_Python ` - -:class:`class StdMeshersBuilder_Triangle_MEFISTO ` - -:class:`class StdMeshersBuilder_Quadrangle ` - -:class:`class StdMeshersBuilder_Hexahedron ` - -:class:`class StdMeshersBuilder_UseExistingElements_1D ` - -:class:`class StdMeshersBuilder_UseExistingElements_1D2D ` - -:class:`class StdMeshersBuilder_Cartesian_3D ` - -:class:`class StdMeshersBuilder_UseExisting_1D ` - -:class:`class StdMeshersBuilder_UseExisting_2D ` - -Functions: - -:meth:`def AutomaticTetrahedralization ` - -:meth:`def AutomaticHexahedralization ` - - - - -Projection algorithms -===================== - -Data Structures: - -:class:`class StdMeshersBuilder_Projection1D ` - -:class:`class StdMeshersBuilder_Projection2D ` - -:class:`class StdMeshersBuilder_Projection1D2D ` - -:class:`class StdMeshersBuilder_Projection3D ` - - -Segments around vertex -====================== - -Functions: - -:meth:`def LengthNearVertex ` - -3D extrusion meshing algorithms -=============================== - -Data Structures: - -:class:`class StdMeshersBuilder_Prism3D ` - -:class:`class StdMeshersBuilder_RadialPrism3D ` - - -Mesh_Algorithm -============== - -:class:`class Mesh_Algorithm ` - +=================== + +.. autosummary:: + + Mesh.Segment + Mesh.Triangle + Mesh.Quadrangle + Mesh.Hexahedron + Mesh.Prism + Mesh.BodyFitted + Mesh.Projection1D + Mesh.Projection2D + Mesh.Projection1D2D + Mesh.Projection3D + Mesh.UseExisting1DElements + Mesh.UseExisting2DElements + Mesh.UseExistingSegments + Mesh.UseExistingFaces + Mesh.AutomaticTetrahedralization + Mesh.AutomaticHexahedralization + smesh_algorithm.Mesh_Algorithm Defining hypotheses -################### - -1D Meshing Hypotheses -===================== - -Functions: - -:meth:`def ReversedEdgeIndices ` - -:meth:`def LocalLength ` +=================== -:meth:`def MaxSize ` - -:meth:`def NumberOfSegments ` - -:meth:`def Adaptive ` - -:meth:`def Arithmetic1D ` - -:meth:`def GeometricProgression ` - -:meth:`def FixedPoints1D ` - -:meth:`def StartEndLength ` - -:meth:`def Deflection1D ` - -:meth:`def AutomaticLength ` - -:meth:`def PythonSplit1D ` +.. currentmodule:: StdMeshersBuilder +1D Meshing Hypotheses +--------------------- + +.. autosummary:: + + StdMeshersBuilder_Segment.NumberOfSegments + StdMeshersBuilder_Segment.LocalLength + StdMeshersBuilder_Segment.MaxSize + StdMeshersBuilder_Segment.Arithmetic1D + StdMeshersBuilder_Segment.GeometricProgression + StdMeshersBuilder_Segment.FixedPoints1D + StdMeshersBuilder_Segment.StartEndLength + StdMeshersBuilder_Segment.Adaptive + StdMeshersBuilder_Segment.Deflection1D + StdMeshersBuilder_Segment.AutomaticLength + StdMeshersBuilder_Segment_Python.PythonSplit1D 2D Meshing Hypotheses -===================== - -Functions: - -:meth:`def MaxElementArea ` - -:meth:`def LengthFromEdges ` - - -Quadrangle Hypotheses -===================== - -Functions: - -:meth:`def QuadrangleParameters ` - -:meth:`def QuadranglePreference ` - -:meth:`def TrianglePreference ` - -:meth:`def Reduced ` - -:meth:`def TriangleVertex ` +--------------------- +.. autosummary:: + StdMeshersBuilder_Triangle_MEFISTO.MaxElementArea + StdMeshersBuilder_Triangle_MEFISTO.LengthFromEdges + StdMeshersBuilder_Quadrangle.QuadrangleParameters + StdMeshersBuilder_Quadrangle.QuadranglePreference + StdMeshersBuilder_Quadrangle.TrianglePreference + StdMeshersBuilder_Quadrangle.Reduced + StdMeshersBuilder_Quadrangle.TriangleVertex Additional Hypotheses -===================== +--------------------- -Functions: - -:meth:`def ViscousLayers ` - -:meth:`def ViscousLayers2D ` - -:meth:`def Propagation ` - -:meth:`def PropagationOfDistribution ` - -:meth:`def QuadraticMesh ` +.. autosummary:: + smesh_algorithm.Mesh_Algorithm.ViscousLayers + smesh_algorithm.Mesh_Algorithm.ViscousLayers2D + StdMeshersBuilder.StdMeshersBuilder_Segment.Propagation + StdMeshersBuilder.StdMeshersBuilder_Segment.PropagationOfDistribution + StdMeshersBuilder.StdMeshersBuilder_Segment.QuadraticMesh Constructing sub-meshes -####################### - -Functions: - -:meth:`def GetSubMesh ` - -:meth:`def ClearSubMesh ` - -:meth:`def Compute ` - - - -Editing meshes -############## - -Functions: - -:meth:`def AddHypothesis ` - -:meth:`def IsUsedHypothesis ` - -:meth:`def RemoveHypothesis ` - -:meth:`def GetHypothesisList ` - -:meth:`def RemoveGlobalHypotheses ` - - -**************** -Mesh Information -**************** - -Functions: - -:meth:`def GetMeshInfo ` - -:meth:`def GetGeometryByMeshElement ` - -:meth:`def MeshDimension ` - -:meth:`def GetMeshInfo ` - -:meth:`def NbNodes ` - -:meth:`def NbElements ` - -:meth:`def Nb0DElements ` - -:meth:`def NbBalls ` - -:meth:`def NbEdges ` - -:meth:`def NbEdgesOfOrder ` - -:meth:`def NbFaces ` - -:meth:`def NbFacesOfOrder ` - -:meth:`def NbTriangles ` - -:meth:`def NbTrianglesOfOrder ` - -:meth:`def NbBiQuadTriangles ` - -:meth:`def NbQuadrangles ` - -:meth:`def NbQuadranglesOfOrder ` - -:meth:`def NbBiQuadQuadrangles ` - -:meth:`def NbPolygons ` - -:meth:`def NbVolumes ` - -:meth:`def NbVolumesOfOrder ` - -:meth:`def NbTetras ` - -:meth:`def NbTetrasOfOrder ` - -:meth:`def NbHexas ` - -:meth:`def NbHexasOfOrder ` - -:meth:`def NbTriQuadraticHexas ` - -:meth:`def NbPyramids ` - -:meth:`def NbPyramidsOfOrder ` - -:meth:`def NbPrisms ` - -:meth:`def NbPrismsOfOrder ` - -:meth:`def NbHexagonalPrisms ` - -:meth:`def NbPolyhedrons ` - -:meth:`def NbSubMesh ` - -:meth:`def GetElementsId ` - -:meth:`def GetElementsByType ` - -:meth:`def GetNodesId ` - -:meth:`def GetElementType ` - -:meth:`def GetElementGeomType ` - -:meth:`def GetElementShape ` - -:meth:`def GetSubMeshElementsId ` - -:meth:`def GetSubMeshNodesId ` - -:meth:`def GetSubMeshElementType ` - -:meth:`def Dump ` - -:meth:`def GetNodeXYZ ` - -:meth:`def GetNodeInverseElements ` - -:meth:`def GetNodePosition ` - -:meth:`def GetElementPosition ` - -:meth:`def GetShapeID ` - -:meth:`def GetShapeIDForElem ` - -:meth:`def GetElemNbNodes ` - -:meth:`def GetElemNode ` - -:meth:`def GetElemNodes ` - -:meth:`def IsMediumNode ` - -:meth:`def IsMediumNodeOfAnyElem ` - -:meth:`def ElemNbEdges ` - -:meth:`def ElemNbFaces ` - -:meth:`def GetElemFaceNodes ` - -:meth:`def GetFaceNormal ` - -:meth:`def FindElementByNodes ` - -:meth:`def GetElementsByNodes ` - -:meth:`def IsPoly ` - -:meth:`def IsQuadratic ` - -:meth:`def GetBallDiameter ` - -:meth:`def BaryCenter ` - -:meth:`def FindNodeClosestTo ` - -:meth:`def FindElementsByPoint ` +======================= -:meth:`def GetPointState ` +.. currentmodule:: smeshBuilder +.. autosummary:: -****************************** -Quality controls and Filtering -****************************** - -Functions: - -:meth:`def GetEmptyCriterion ` - -:meth:`def GetCriterion ` - -:meth:`def GetFilter ` + Mesh.GetSubMesh + Mesh.ClearSubMesh -:meth:`def GetFilterFromCriteria ` - -:meth:`def GetFunctor ` - -:meth:`def GetIdsFromFilter ` - -:meth:`def IsManifold ` - -:meth:`def IsCoherentOrientation2D ` +Editing Meshes +============== +.. autosummary:: + Mesh.AddHypothesis + Mesh.RemoveHypothesis + Mesh.RemoveGlobalHypotheses + Mesh.GetHypothesisList + Mesh.IsUsedHypothesis ***************** Grouping elements ***************** -Functions: - -:meth:`def SetAutoColor ` - -:meth:`def GetAutoColor ` - -:meth:`def HasDuplicatedGroupNamesMED ` - +.. autosummary:: + Mesh.SetAutoColor + Mesh.GetAutoColor + Mesh.HasDuplicatedGroupNamesMED + Creating groups -############### - -Functions: - -:meth:`def CreateEmptyGroup ` - -:meth:`def Group ` - -:meth:`def GroupOnGeom ` - -:meth:`def GroupOnFilter ` - -:meth:`def MakeGroupByIds ` - -:meth:`def MakeGroup ` - -:meth:`def MakeGroupByCriterion ` - -:meth:`def MakeGroupByCriteria ` - -:meth:`def MakeGroupByFilter ` - -:meth:`def GetGroups ` - -:meth:`def NbGroups ` +=============== -:meth:`def GetGroupNames ` +.. autosummary:: -:meth:`def GetGroupByName ` + Mesh.CreateEmptyGroup + Mesh.Group + Mesh.GroupOnGeom + Mesh.GroupOnFilter + Mesh.MakeGroupByIds + Mesh.MakeGroup + Mesh.MakeGroupByCriterion + Mesh.MakeGroupByCriteria + Mesh.MakeGroupByFilter + Mesh.GetGroups + Mesh.NbGroups + Mesh.GetGroupNames + Mesh.GetGroupByName Using operations on groups -########################## +========================== -Functions: +.. autosummary:: -:meth:`def UnionGroups ` + Mesh.UnionGroups + Mesh.UnionListOfGroups + Mesh.IntersectGroups + Mesh.IntersectListOfGroups + Mesh.CutGroups + Mesh.CutListOfGroups + Mesh.CreateDimGroup + Mesh.ConvertToStandalone -:meth:`def UnionListOfGroups ` +Deleting Groups +=============== -:meth:`def IntersectGroups ` +.. autosummary:: -:meth:`def IntersectListOfGroups ` - -:meth:`def CutGroups ` - -:meth:`def CutListOfGroups ` - -:meth:`def CreateDimGroup ` - -:meth:`def ConvertToStandalone ` + Mesh.RemoveGroup + Mesh.RemoveGroupWithContents +**************** +Mesh Information +**************** -Deleting groups -############### +.. autosummary:: + + smeshBuilder.GetMeshInfo + Mesh.GetGeometryByMeshElement + Mesh.MeshDimension + Mesh.GetMeshInfo + Mesh.NbNodes + Mesh.NbElements + Mesh.Nb0DElements + Mesh.NbBalls + Mesh.NbEdges + Mesh.NbEdgesOfOrder + Mesh.NbFaces + Mesh.NbFacesOfOrder + Mesh.NbTriangles + Mesh.NbTrianglesOfOrder + Mesh.NbBiQuadTriangles + Mesh.NbQuadrangles + Mesh.NbQuadranglesOfOrder + Mesh.NbBiQuadQuadrangles + Mesh.NbPolygons + Mesh.NbVolumes + Mesh.NbVolumesOfOrder + Mesh.NbTetras + Mesh.NbTetrasOfOrder + Mesh.NbHexas + Mesh.NbHexasOfOrder + Mesh.NbTriQuadraticHexas + Mesh.NbPyramids + Mesh.NbPyramidsOfOrder + Mesh.NbPrisms + Mesh.NbPrismsOfOrder + Mesh.NbHexagonalPrisms + Mesh.NbPolyhedrons + Mesh.NbSubMesh + Mesh.GetNodesId + Mesh.GetElementsId + Mesh.GetElementsByType + Mesh.GetElementType + Mesh.GetElementGeomType + Mesh.GetElementShape + Mesh.GetSubMeshElementsId + Mesh.GetSubMeshNodesId + Mesh.GetSubMeshElementType + Mesh.GetNodeXYZ + Mesh.GetNodeInverseElements + Mesh.GetNodePosition + Mesh.GetElementPosition + Mesh.GetShapeID + Mesh.GetShapeIDForElem + Mesh.GetElemNbNodes + Mesh.GetElemNode + Mesh.GetElemNodes + Mesh.IsMediumNode + Mesh.IsMediumNodeOfAnyElem + Mesh.ElemNbEdges + Mesh.ElemNbFaces + Mesh.GetElemFaceNodes + Mesh.GetFaceNormal + Mesh.FindElementByNodes + Mesh.GetElementsByNodes + Mesh.IsPoly + Mesh.IsQuadratic + Mesh.GetBallDiameter + Mesh.BaryCenter + Mesh.FindNodeClosestTo + Mesh.FindElementsByPoint + Mesh.GetPointState + Mesh.Dump -Functions: +****************************** +Quality controls and Filtering +****************************** -:meth:`def RemoveGroup ` +.. autosummary:: + + smeshBuilder.GetEmptyCriterion + smeshBuilder.GetCriterion + smeshBuilder.GetFilter + smeshBuilder.GetFilterFromCriteria + smeshBuilder.GetFunctor + Mesh.GetIdsFromFilter + Mesh.GetMaxElementLength + Mesh.GetAspectRatio + Mesh.GetWarping + Mesh.GetMinimumAngle + Mesh.GetTaper + Mesh.GetSkew + Mesh.GetMinMax + Mesh.IsManifold + Mesh.IsCoherentOrientation2D -:meth:`def RemoveGroupWithContents ` +************ +Measurements +************ +.. autosummary:: + + smeshBuilder.MinDistance + smeshBuilder.GetMinDistance + smeshBuilder.BoundingBox + smeshBuilder.GetBoundingBox + smeshBuilder.GetLength + smeshBuilder.GetArea + smeshBuilder.GetVolume + Mesh.GetFreeBorders + Mesh.MinDistance + Mesh.GetMinDistance + Mesh.BoundingBox + Mesh.GetBoundingBox + Mesh.GetFunctor + Mesh.FunctorValue + Mesh.GetLength + Mesh.GetArea + Mesh.GetVolume **************** Modifying meshes **************** -Functions: - -:meth:`def GetPattern ` - -:meth:`def GetMeshEditor ` +.. autosummary:: + smeshBuilder.GetPattern + Mesh.GetMeshEditor Adding nodes and elements -######################### - -Functions: - -:meth:`def AddNode ` - -:meth:`def Add0DElement ` - -:meth:`def Add0DElementsToAllNodes ` - -:meth:`def AddBall ` - -:meth:`def AddEdge ` - -:meth:`def AddFace ` - -:meth:`def AddPolygonalFace ` - -:meth:`def AddQuadPolygonalFace ` - -:meth:`def AddVolume ` - -:meth:`def AddPolyhedralVolume ` - -:meth:`def AddPolyhedralVolumeByFaces ` - -:meth:`def SetNodeOnVertex ` - -:meth:`def SetNodeOnEdge ` - -:meth:`def SetNodeOnFace ` - -:meth:`def SetNodeInVolume ` - -:meth:`def SetMeshElementOnShape ` - -:meth:`def Make2DMeshFrom3D ` - -:meth:`def MakeBoundaryMesh ` - -:meth:`def MakeBoundaryElements ` - -:meth:`def GetLastCreatedNodes ` - -:meth:`def GetLastCreatedElems ` - -:meth:`def ClearLastCreated ` - +========================= + +.. autosummary:: + + Mesh.AddNode + Mesh.Add0DElement + Mesh.Add0DElementsToAllNodes + Mesh.AddBall + Mesh.AddEdge + Mesh.AddFace + Mesh.AddPolygonalFace + Mesh.AddQuadPolygonalFace + Mesh.AddVolume + Mesh.AddPolyhedralVolume + Mesh.AddPolyhedralVolumeByFaces + Mesh.SetNodeOnVertex + Mesh.SetNodeOnEdge + Mesh.SetNodeOnFace + Mesh.SetNodeInVolume + Mesh.SetMeshElementOnShape + Mesh.Make2DMeshFrom3D + Mesh.MakeBoundaryMesh + Mesh.MakeBoundaryElements + Mesh.GetLastCreatedNodes + Mesh.GetLastCreatedElems + Mesh.ClearLastCreated Removing nodes and elements -########################### - -Functions: - -:meth:`def RemoveElements ` - -:meth:`def RemoveNodes ` +=========================== -:meth:`def RemoveOrphanNodes ` +.. autosummary:: + Mesh.RemoveElements + Mesh.RemoveNodes + Mesh.RemoveOrphanNodes Modifying nodes and elements -############################ +============================ -functions: +.. autosummary:: -:meth:`def MoveNode ` + Mesh.MoveNode + Mesh.MoveClosestNodeToPoint + Mesh.MeshToPassThroughAPoint + Mesh.ChangeElemNodes -:meth:`def MoveClosestNodeToPoint ` - -:meth:`def MeshToPassThroughAPoint ` - -:meth:`def ChangeElemNodes ` - - -Renumbering nodes and elements -############################## +Convert to/from Quadratic Mesh +============================== -Functions: +.. autosummary:: -:meth:`def RenumberNodes ` + Mesh.ConvertToQuadratic + Mesh.ConvertFromQuadratic -:meth:`def RenumberElements ` +Extrusion and Revolution +======================== +.. autosummary:: + + Mesh.RotationSweepObjects + Mesh.RotationSweep + Mesh.RotationSweepObject + Mesh.RotationSweepObject1D + Mesh.RotationSweepObject2D + Mesh.ExtrusionSweepObjects + Mesh.ExtrusionSweep + Mesh.ExtrusionByNormal + Mesh.ExtrusionSweepObject + Mesh.ExtrusionSweepObject1D + Mesh.ExtrusionSweepObject2D + Mesh.AdvancedExtrusion + Mesh.ExtrusionAlongPathObjects + Mesh.ExtrusionAlongPathX + Mesh.ExtrusionAlongPath + Mesh.ExtrusionAlongPathObject + Mesh.ExtrusionAlongPathObject1D + Mesh.ExtrusionAlongPathObject2D Transforming meshes (Translation, Rotation, Symmetry, Sewing, Merging) -###################################################################### - -Functions: - -:meth:`def Mirror ` - -:meth:`def MirrorMakeMesh ` - -:meth:`def MirrorObject ` - -:meth:`def MirrorObjectMakeMesh ` - -:meth:`def Translate ` +====================================================================== + +.. autosummary:: + + Mesh.Mirror + Mesh.MirrorMakeMesh + Mesh.MirrorObject + Mesh.MirrorObjectMakeMesh + Mesh.Translate + Mesh.TranslateMakeMesh + Mesh.TranslateObject + Mesh.TranslateObjectMakeMesh + Mesh.Rotate + Mesh.RotateMakeMesh + Mesh.RotateObject + Mesh.RotateObjectMakeMesh + Mesh.FindCoincidentNodes + Mesh.FindCoincidentNodesOnPart + Mesh.MergeNodes + Mesh.FindEqualElements + Mesh.MergeElements + Mesh.MergeEqualElements + Mesh.FindFreeBorders + Mesh.FillHole + Mesh.FindCoincidentFreeBorders + Mesh.SewCoincidentFreeBorders + Mesh.SewFreeBorders + Mesh.SewConformFreeBorders + Mesh.SewBorderToSide + Mesh.SewSideElements -:meth:`def TranslateMakeMesh ` - -:meth:`def TranslateObject ` - -:meth:`def TranslateObjectMakeMesh ` - -:meth:`def Rotate ` - -:meth:`def RotateMakeMesh ` - -:meth:`def RotateObject ` - -:meth:`def RotateObjectMakeMesh ` - -:meth:`def FindCoincidentNodes ` - -:meth:`def FindCoincidentNodesOnPart ` - -:meth:`def MergeNodes ` - -:meth:`def FindEqualElements ` - -:meth:`def MergeElements ` - -:meth:`def MergeEqualElements ` - -:meth:`def FindFreeBorders ` - -:meth:`def FillHole ` - -:meth:`def FindCoincidentFreeBorders ` - -:meth:`def SewCoincidentFreeBorders ` - -:meth:`def SewFreeBorders ` - -:meth:`def SewConformFreeBorders ` - -:meth:`def SewBorderToSide ` - -:meth:`def SewSideElements ` +Changing orientation of elements +================================ +.. autosummary:: + Mesh.Reorient + Mesh.ReorientObject + Mesh.Reorient2D + Mesh.Reorient2DBy3D Uniting triangles -################# - -Functions: - -:meth:`def DeleteDiag ` - -:meth:`def TriToQuad ` - -:meth:`def TriToQuadObject ` +================= +.. autosummary:: + Mesh.DeleteDiag + Mesh.TriToQuad + Mesh.TriToQuadObject Cutting elements -################ - -Functions: - -:meth:`def InverseDiag ` - -:meth:`def QuadToTri ` - -:meth:`def QuadToTriObject ` - -:meth:`def QuadTo4Tri ` - -:meth:`def SplitQuad ` - -:meth:`def SplitQuadObject ` - -:meth:`def BestSplit ` - -:meth:`def SplitVolumesIntoTetra ` - -:meth:`def SplitBiQuadraticIntoLinear ` - -:meth:`def SplitHexahedraIntoPrisms ` - -:meth:`def SplitQuadsNearTriangularFacets ` - -:meth:`def SplitHexaToTetras ` - -:meth:`def SplitHexaToPrisms ` - - - -Changing orientation of elements -################################ - -Functions: - -:meth:`def Reorient ` - -:meth:`def ReorientObject ` - -:meth:`def Reorient2D ` - -:meth:`def Reorient2DBy3D ` - - +================ + +.. autosummary:: + + Mesh.InverseDiag + Mesh.QuadToTri + Mesh.QuadToTriObject + Mesh.QuadTo4Tri + Mesh.SplitQuad + Mesh.SplitQuadObject + Mesh.BestSplit + Mesh.SplitVolumesIntoTetra + Mesh.SplitBiQuadraticIntoLinear + Mesh.SplitHexahedraIntoPrisms + Mesh.SplitQuadsNearTriangularFacets + Mesh.SplitHexaToTetras + Mesh.SplitHexaToPrisms Smoothing -######### - -Functions: - -:meth:`def Smooth ` - -:meth:`def SmoothObject ` - -:meth:`def SmoothParametric ` - -:meth:`def SmoothParametricObject ` - - - -Extrusion and Revolution -######################## - -Functions: - -:meth:`def RotationSweepObjects ` - -:meth:`def RotationSweep ` - -:meth:`def RotationSweepObject ` - -:meth:`def RotationSweepObject1D ` - -:meth:`def RotationSweepObject2D ` - -:meth:`def ExtrusionSweepObjects ` - -:meth:`def ExtrusionSweep ` - -:meth:`def ExtrusionByNormal ` - -:meth:`def ExtrusionSweepObject ` - -:meth:`def ExtrusionSweepObject1D ` - -:meth:`def ExtrusionSweepObject2D ` - -:meth:`def AdvancedExtrusion ` - -:meth:`def ExtrusionAlongPathObjects ` - -:meth:`def ExtrusionAlongPathX ` - -:meth:`def ExtrusionAlongPath ` - -:meth:`def ExtrusionAlongPathObject ` - -:meth:`def ExtrusionAlongPathObject1D ` - -:meth:`def ExtrusionAlongPathObject2D ` - - - -Convert to/from Quadratic Mesh -############################## - -Functions: - -:meth:`def ConvertToQuadratic ` - -:meth:`def ConvertFromQuadratic ` +========= +.. autosummary:: + Mesh.Smooth + Mesh.SmoothObject + Mesh.SmoothParametric + Mesh.SmoothParametricObject Duplication of nodes and elements (to emulate cracks) -##################################################### - -Functions: - -:meth:`def DoubleElements ` - -:meth:`def DoubleNodes ` - -:meth:`def DoubleNode ` - -:meth:`def DoubleNodeGroup ` - -:meth:`def DoubleNodeGroups ` - -:meth:`def DoubleNodeElem ` - -:meth:`def DoubleNodeElemInRegion ` - -:meth:`def DoubleNodeElemGroup ` - -:meth:`def DoubleNodeElemGroupInRegion ` - -:meth:`def DoubleNodeElemGroups ` - -:meth:`def DoubleNodeElemGroupsInRegion ` - -:meth:`def AffectedElemGroupsInRegion ` - -:meth:`def DoubleNodesOnGroupBoundaries ` - -:meth:`def CreateFlatElementsOnFacesGroups ` - - - -************ -Measurements -************ - -Functions: - - -:meth:`def MinDistance ` - -:meth:`def GetMinDistance ` - -:meth:`def BoundingBox ` - -:meth:`def GetBoundingBox ` - -:meth:`def GetLength ` - -:meth:`def GetArea ` - -:meth:`def GetVolume ` - -:meth:`def GetFreeBorders ` - -:meth:`def MinDistance ` - -:meth:`def GetMinDistance ` - -:meth:`def BoundingBox ` - -:meth:`def GetBoundingBox ` - -:meth:`def GetFunctor ` - -:meth:`def FunctorValue ` - -:meth:`def GetLength ` - -:meth:`def GetArea ` - -:meth:`def GetVolume ` - -:meth:`def GetMaxElementLength ` - -:meth:`def GetAspectRatio ` - -:meth:`def GetWarping ` - -:meth:`def GetMinimumAngle ` - -:meth:`def GetTaper ` - -:meth:`def GetSkew ` - -:meth:`def GetMinMax ` - - -******************************* -Accessing SMESH object in study -******************************* +===================================================== + +.. autosummary:: + + Mesh.DoubleElements + Mesh.DoubleNodes + Mesh.DoubleNode + Mesh.DoubleNodeGroup + Mesh.DoubleNodeGroups + Mesh.DoubleNodeElem + Mesh.DoubleNodeElemInRegion + Mesh.DoubleNodeElemGroup + Mesh.DoubleNodeElemGroupInRegion + Mesh.DoubleNodeElemGroups + Mesh.DoubleNodeElemGroupsInRegion + Mesh.AffectedElemGroupsInRegion + Mesh.DoubleNodesOnGroupBoundaries + Mesh.CreateFlatElementsOnFacesGroups + +Renumbering nodes and elements +============================== -Data Structures: +.. autosummary:: -:class:`SMeshStudyTools ` + Mesh.RenumberNodes + Mesh.RenumberElements +***************** +Auxiliary methods +***************** +.. autosummary:: + GetName + DegreesToRadians + New diff --git a/doc/salome/gui/SMESH/input/numbering.rst b/doc/salome/gui/SMESH/input/numbering.rst index c540b9057..16cc06f15 100644 --- a/doc/salome/gui/SMESH/input/numbering.rst +++ b/doc/salome/gui/SMESH/input/numbering.rst @@ -9,7 +9,7 @@ Displaying node numbers In MESH you can display the ID numbers of all nodes of your mesh in the viewer. -**To display ID numbers of nodes:** +*To display ID numbers of nodes:* #. Display your mesh in the viewer #. Right-click on the mesh in the 3D viewer and from the associated pop-up menu choose **Numbering > Display Nodes #**. @@ -18,7 +18,7 @@ In MESH you can display the ID numbers of all nodes of your mesh in the viewer. :align: center .. centered:: - "Displayed node numbers" + Displayed node numbers Displaying element numbers @@ -26,7 +26,7 @@ Displaying element numbers In MESH you can display the ID numbers of all meshing elements composing your mesh in the viewer. -**To display ID numbers of elements:** +*To display ID numbers of elements:* #. Display your mesh in the viewer #. Right-click on the mesh in the 3D viewer and from the associated pop-up menu choose **Numbering > Display Elements #**. @@ -35,7 +35,4 @@ In MESH you can display the ID numbers of all meshing elements composing your me :align: center .. centered:: - "Displayed element numbers" - - - + Displayed element numbers diff --git a/doc/salome/gui/SMESH/input/over_constrained_faces.rst b/doc/salome/gui/SMESH/input/over_constrained_faces.rst index c670ec941..2ff5bacb6 100644 --- a/doc/salome/gui/SMESH/input/over_constrained_faces.rst +++ b/doc/salome/gui/SMESH/input/over_constrained_faces.rst @@ -15,7 +15,7 @@ the free border of the 2D mesh are highlighted. :align: center .. centered:: - In this picture the over-constrained face is displayed in red. + Over-constrained face is displayed in red **See Also** a sample TUI Script of a :ref:`tui_over_constrained_faces` filter. diff --git a/doc/salome/gui/SMESH/input/over_constrained_volumes.rst b/doc/salome/gui/SMESH/input/over_constrained_volumes.rst index dca1c8d4b..29c9416c3 100644 --- a/doc/salome/gui/SMESH/input/over_constrained_volumes.rst +++ b/doc/salome/gui/SMESH/input/over_constrained_volumes.rst @@ -14,8 +14,6 @@ In other words, the volumes having all their nodes on the external border of the :align: center .. centered:: - In this picture the over-constrained volume is displayed in red. + Over-constrained volume is displayed in red. **See Also** a sample TUI Script of a :ref:`tui_over_constrained_volumes` filter. - - diff --git a/doc/salome/gui/SMESH/input/pattern_mapping.rst b/doc/salome/gui/SMESH/input/pattern_mapping.rst index c687ddb61..d505dca6f 100644 --- a/doc/salome/gui/SMESH/input/pattern_mapping.rst +++ b/doc/salome/gui/SMESH/input/pattern_mapping.rst @@ -85,16 +85,13 @@ The image below provides a preview of the above pattern: Application of pattern mapping ############################## -**To apply pattern mapping to a geometrical object or mesh elements:** +*To apply pattern mapping to a geometrical object or mesh elements:* -From the **Modification** menu choose the **Pattern Mapping** item or click -**"Pattern mapping"** button in the toolbar. +.. |img| image:: ../images/image98.png -.. image:: ../images/image98.png - :align: center +From the **Modification** menu choose the **Pattern Mapping** item or click +*"Pattern mapping"* button |img| in the toolbar. -.. centered:: - **"Pattern mapping" button** The following dialog box will appear: diff --git a/doc/salome/gui/SMESH/input/point_marker.rst b/doc/salome/gui/SMESH/input/point_marker.rst index ddf7e2eb0..2110fe306 100644 --- a/doc/salome/gui/SMESH/input/point_marker.rst +++ b/doc/salome/gui/SMESH/input/point_marker.rst @@ -8,7 +8,8 @@ You can change the representation of points in the 3D viewer either by selecting one of the predefined shapes or by loading a custom texture from an external file. -- Standard point markers +Standard point markers +---------------------- The Mesh module provides a set of predefined point marker shapes which can be used to display points in the 3D viewer. @@ -23,9 +24,10 @@ form) and scale factor (defines shape size). :align: center .. centered:: - "Mesh presentation with standard point markers" + Mesh presentation with standard point markers -- Custom point markers +Custom point markers +-------------------- It is also possible to load a point marker shape from an external file. This file should provide a description of the point texture as a set @@ -57,7 +59,4 @@ Here is a texture file sample: :align: center .. centered:: - "Mesh presentation with custom point markers" - - - + Mesh presentation with custom point markers diff --git a/doc/salome/gui/SMESH/input/prism_3d_algo.rst b/doc/salome/gui/SMESH/input/prism_3d_algo.rst index 3ce7a4db9..03dd68ab1 100644 --- a/doc/salome/gui/SMESH/input/prism_3d_algo.rst +++ b/doc/salome/gui/SMESH/input/prism_3d_algo.rst @@ -12,7 +12,7 @@ edges. These two faces should be connected by quadrangle "side" faces. :align: center .. centered:: - "Clipping view of a mesh of a prism with non-planar base and top faces" + Clipping view of a mesh of a prism with non-planar base and top faces The prism is allowed to have sides composed of several faces. (A prism side is a row of faces (or one face) connecting the corresponding edges of @@ -24,7 +24,7 @@ picture below. :align: center .. centered:: - "A suitable and an unsuitable prism" + A suitable and an unsuitable prism In this picture, the left prism is suitable for meshing with 3D extrusion algorithm: it has six sides, two of which are split @@ -36,17 +36,19 @@ The algorithm can propagate 2D mesh not only between horizontal (i.e. base and top) faces of one prism but also between faces of prisms organized in a stack and between stacks sharing prism sides. +.. _prism_stacks: + .. image:: ../images/prism_stack.png :align: center .. centered:: - "Prism stacks" + Prism stacks This picture shows four neighboring prism stacks, each comprising two prisms. The shown sub-mesh is used by the algorithm to mesh all eight prisms in the stacks. -To use **Extrusion 3D** algorithm you need to assign algorithms +To use *Extrusion 3D* algorithm you need to assign algorithms and hypotheses of lower dimensions as follows. (A sample picture below shows algorithms and hypotheses used to mesh a cylinder with prismatic volumes). @@ -63,20 +65,19 @@ The **Global** algorithms and hypotheses to be chosen at The **Local** algorithms and hypotheses to be chosen at :ref:`constructing_submeshes_page` are: -* 1D and 2D algorithms and hypotheses that will be applied for meshing the top and the base prism :ref:`submesh_shape_section`. These faces can be meshed with any type of 2D elements: quadrangles, triangles, polygons or their mix. It is enough to define a sub-mesh on either the top or the base face. In the sample picture above, "NETGEN_1D2D" algorithm meshes "bottom disk" face with triangles. (1D algorithm is not assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.) +* 1D and 2D algorithms and hypotheses that will be applied for meshing the top and the base prism :ref:`faces `. These faces can be meshed with any type of 2D elements: quadrangles, triangles, polygons or their mix. It is enough to define a sub-mesh on either the top or the base face. In the sample picture above, "NETGEN_1D2D" algorithm meshes "bottom disk" face with triangles. (1D algorithm is not assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.) -* Optionally you can define a 1D sub-mesh on some vertical :ref:`submesh_shape_section` of stacked prisms, which will override the global 1D hypothesis mentioned above. In the **Prism stacks** picture, the vertical division is not equidistant on the whole length because a "Number Of Segments" hypothesis with Scale Factor=3 is assigned to the highlighted edge. +* Optionally you can define a 1D sub-mesh on some vertical :ref:`edges ` of stacked prisms, which will override the global 1D hypothesis mentioned above. In the :ref:`Prism stacks ` picture, the vertical division is not equidistant on the whole length because a "Number Of Segments" hypothesis with Scale Factor=3 is assigned to the highlighted edge. -If **Extrusion 3D** algorithm is assigned to a sub-mesh in a mesh +If *Extrusion 3D* algorithm is assigned to a sub-mesh in a mesh with multiple sub-meshes, the described above approach may not work as expected. For example the bottom face may be meshed by other algorithm -before **Extrusion 3D** have a chance to project a mesh from the +before *Extrusion 3D* have a chance to project a mesh from the 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. - In such a case, it's necessary to explicitly define algorithms -that **Extrusion 3D** implicitly applies in a simple case: +that *Extrusion 3D* implicitly applies in a simple case: * assign :ref:`projection_1D2D` algorithm to the top face and * assign a 1D algorithm to a group of all vertical edges. @@ -85,9 +86,8 @@ that **Extrusion 3D** implicitly applies in a simple case: :align: center .. centered:: - "Prism with Extrusion 3D meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned." + Prism with Extrusion 3D meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned -**See Also** a sample TUI Script of -:ref:`tui_prism_3d_algo`. +**See Also** a sample TUI Script of :ref:`tui_prism_3d_algo`. diff --git a/doc/salome/gui/SMESH/input/projection_algos.rst b/doc/salome/gui/SMESH/input/projection_algos.rst index 3b4de91db..ff0cbbbca 100644 --- a/doc/salome/gui/SMESH/input/projection_algos.rst +++ b/doc/salome/gui/SMESH/input/projection_algos.rst @@ -30,7 +30,7 @@ by the projection of another already meshed edge (or group of edges). To apply this algorithm select the edge to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Projection1D** in the list of 1D algorithms and click the -**"Add Hypothesis"** button. +*"Add Hypothesis"* button. The following dialog box will appear: .. image:: ../images/projection_1d.png @@ -41,7 +41,7 @@ In this dialog you can define * the **Name** of the algorithm, * the already meshed **Source Edge** and * the **Source Mesh** (It can be omitted only when projecting a sub-mesh on another one of the same Mesh). -* It could also be necessary to define the orientation of edges, which is done by indicating the **Source Vertex** being the first point of the **Source Edge **and the **Target Vertex** being the first point of the edge being meshed. +* It could also be necessary to define the orientation of edges, which is done by indicating the **Source Vertex** being the first point of the **Source Edge** and the **Target Vertex** being the first point of the edge being meshed. For a group of edges, **Source** and **Target** vertices should be @@ -64,7 +64,7 @@ segments as corresponding edges of the source face. To apply this algorithm select the face to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Projection -2D** in the list of 2D algorithms and click the **"Add Hypothesis"** button. The following dialog box will appear: +2D** in the list of 2D algorithms and click the *"Add Hypothesis"* button. The following dialog box will appear: .. image:: ../images/projection_2d.png :align: center diff --git a/doc/salome/gui/SMESH/input/python_api.rst b/doc/salome/gui/SMESH/input/python_api.rst deleted file mode 100644 index 635ecd044..000000000 --- a/doc/salome/gui/SMESH/input/python_api.rst +++ /dev/null @@ -1,24 +0,0 @@ -===================== -Mesh Python interface -===================== - -smeshstudytools module -====================== -.. automodule:: smeshstudytools - :members: - -StdMeshersBuilder module -======================== -.. automodule:: StdMeshersBuilder - :members: - -smeshBuilder module -=================== -.. automodule:: smeshBuilder - :members: - -smesh_algorithm module -====================== -.. automodule:: smesh_algorithm - :members: - diff --git a/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst b/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst index c2a8b8a46..92413e496 100644 --- a/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst +++ b/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst @@ -10,14 +10,14 @@ difficult to define 1D hypotheses such that to obtain a good shape of resulting quadrangles. The algorithm can be also applied to faces with ring topology, which can be viewed as a closed 'channel'. In the latter case radial discretization of a ring can be specified by -using **Number of Layers** or **Distribution of Layers** +using *Number of Layers* or *Distribution of Layers* hypothesis. .. image:: ../images/quad_from_ma_mesh.png :align: center .. centered:: - "A mesh of a river model to the left and of a ring-face to the right" + A mesh of a river model to the left and of a ring-face to the right The algorithm provides proper shape of quadrangles by constructing Medial Axis between sinuous borders of the face and using it to @@ -28,7 +28,7 @@ locations where opposite sides of a 'channel' are far from being parallel.) :align: center .. centered:: - "Medial Axis between two blue sinuous borders" + Medial Axis between two blue sinuous borders The Medial Axis is used in two ways: @@ -39,5 +39,4 @@ The Medial Axis is used in two ways: :align: center .. centered:: - "Mesh depends on defined sub-meshes: to the left - sub-meshes on both wires, to the right - a sub-mesh on internal wire only" - + Mesh depends on defined sub-meshes: to the left - sub-meshes on both wires, to the right - a sub-mesh on internal wire only diff --git a/doc/salome/gui/SMESH/input/quad_ijk_algo.rst b/doc/salome/gui/SMESH/input/quad_ijk_algo.rst index f6b4d3883..fdc610185 100644 --- a/doc/salome/gui/SMESH/input/quad_ijk_algo.rst +++ b/doc/salome/gui/SMESH/input/quad_ijk_algo.rst @@ -20,7 +20,7 @@ validity depend on two factors: .. centered:: "Invalid mesh on quadrilateral concave faces" -The algorithm uses **Transfinite Interpolation** technique in the +The algorithm uses *Transfinite Interpolation* technique in the parametric space of a face to locate nodes inside the face. The algorithm treats any face as quadrangle. If a face is bound by @@ -34,7 +34,7 @@ quadrangle. :align: center .. centered:: - "Algorithm generates a structured mesh on complex faces provided that edges are properly discretized" + Algorithm generates a structured mesh on complex faces provided that edges are properly discretized To get an all-quadrangle mesh you have to carefully define 1D hypotheses on edges of a face. To get a **structured** mesh you have to provide @@ -51,7 +51,5 @@ of segments on one pair of opposite sides. The following hypotheses help to create quadrangle meshes. -* :ref:`propagation_anchor` additional 1D hypotheses help to get an equal number of segments on the opposite sides of a quadrilateral face. -* :ref:`a1d_algos_anchor` algorithm is useful to discretize several C1 continuous edges as one quadrangle side. - - +* :ref:`Propagation ` additional 1D hypotheses help to get an equal number of segments on the opposite sides of a quadrilateral face. +* :ref:`Composite Side Discretization ` algorithm is useful to discretize several C1 continuous edges as one quadrangle side. diff --git a/doc/salome/gui/SMESH/input/radial_prism_algo.rst b/doc/salome/gui/SMESH/input/radial_prism_algo.rst index 029fb400f..c81d77cdb 100644 --- a/doc/salome/gui/SMESH/input/radial_prism_algo.rst +++ b/doc/salome/gui/SMESH/input/radial_prism_algo.rst @@ -7,7 +7,7 @@ Radial Prism This algorithm applies to the meshing of a hollow 3D shape, i.e. such shape should be composed of two meshed shells: an outer shell and an internal shell without intersection with the outer -shell. One of the shells should be a 2D Projection of the other +shell. One of the shells should be a :ref:`2D Projection ` of the other shell. The meshes of the shells can consist both of triangles and quadrangles. @@ -18,17 +18,26 @@ with prisms. :align: center .. centered:: - "Cut-view of a hollow sphere meshed by Radial Prism algorithm" + Cut-view of a hollow sphere meshed by Radial Prism algorithm This algorithm also needs the information concerning the number and distribution of mesh layers between the inner and the outer shapes. +This information can be defined using either of two hypotheses: .. image:: ../images/number_of_layers.png :align: center -Distribution of layers can be set with any of 1D Hypotheses. +.. centered:: + *"Number of layers"* hypothesis .. image:: ../images/distribution_of_layers.png :align: center +.. centered:: + *"Distribution of layers"* hypothesis + +*Distribution of layers* hypothesis allows using any of +:ref:`1D Hypotheses ` to define +the distribution of mesh layers. +**See also** a sample :ref:`TUI script `. diff --git a/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst index 2c55149b3..817695b72 100644 --- a/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst +++ b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst @@ -24,7 +24,7 @@ If no own hypothesis of the algorithm is assigned, any local or global hypothesis is used by the algorithm to discretize edges. If no 1D hypothesis is assigned to an edge, -:ref:`nb_segments_pref` preferences +:ref:`Default Number of Segments ` preferences parameter is used to discretize the edge. .. image:: ../images/hypo_radquad_dlg.png @@ -34,14 +34,14 @@ parameter is used to discretize the edge. :align: center .. centered:: - "Radial Quadrangle 2D mesh on the top and the bottom faces of a cylinder" + Radial Quadrangle 2D mesh on the top and the bottom faces of a cylinder .. image:: ../images/mesh_radquad_02.png :align: center .. centered:: - "Radial Quadrangle 2D mesh on a part of circle" + Radial Quadrangle 2D mesh on a part of circle -**See also** A sample :ref:`tui_radial_quadrangle`. +**See also** a sample :ref:`TUI Script `. diff --git a/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst b/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst index 3fcb4840a..bfbb16d0c 100644 --- a/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst +++ b/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst @@ -20,28 +20,23 @@ Removing nodes **To remove a node:** -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Nodes**, or just click **"Remove nodes"** button in the toolbar. - - .. image:: ../images/remove_nodes_icon.png - :align: center +.. |rmn| image:: ../images/remove_nodes_icon.png - .. centered:: - **"Remove nodes" button** - - The following dialog box will appear: +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Nodes**, or just click *"Remove nodes"* button |rmn| in the toolbar. + The following dialog box will appear: .. image:: ../images/removenodes.png :align: center - In this dialog box you can specify one or several nodes: - -#. choose mesh nodes with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or -#. input the node IDs directly in **ID Elements** field. The selected nodes will be highlighted in the viewer; or -#. apply Filters. **Set filter** button allows to apply a filter to the selection of nodes. See more about filters in the :ref:`selection_filter_library_page` page. + In this dialog box you can specify one or several nodes: + * choose mesh nodes with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the node IDs directly in **ID Elements** field. The selected nodes will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of nodes. See more about filters in the :ref:`selection_filter_library_page` page. +#. Click **Apply** or **Apply and Close** to confirm deletion of the specified nodes. .. note:: Be careful while removing nodes because if you remove a definite node of your mesh all adjacent elements will be also deleted. @@ -54,24 +49,18 @@ Removing orphan nodes There is a quick way to remove all orphan (free) nodes. -**To remove orphan nodes:** +*To remove orphan nodes:* -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the **Modification** menu choose **Remove** and from the associated submenu select **Orphan Nodes**, or just click **"Remove orphan nodes"** button in the toolbar. - - .. image:: ../images/remove_orphan_nodes_icon.png - :align: center +.. |rmon| image:: ../images/remove_orphan_nodes_icon.png - .. centered:: - **"Remove orphan nodes" button** - -The following Warning message box will appear: +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select **Orphan Nodes**, or just click *"Remove orphan nodes"* button |rmon| in the toolbar. + The following Warning message box will appear: .. image:: ../images/removeorphannodes.png :align: center - -Confirm nodes removal by pressing "Yes" button. +#. Confirm nodes removal by pressing "Yes" button. .. _removing_elements_anchor: @@ -79,40 +68,37 @@ Confirm nodes removal by pressing "Yes" button. Removing elements ################# -**To remove an element:** - -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Elements**, or just click **"Remove elements"** button in the toolbar. +*To remove an element:* - .. image:: ../images/remove_elements_icon.png - :align: center +.. |rme| image:: ../images/remove_elements_icon.png - .. centered:: - **"Remove elements" button** +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Elements**, or just click *"Remove elements"* button |rme| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/removeelements.png :align: center - In this dialog box you can specify one or several elements + In this dialog box you can specify one or several elements: + + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. -#. choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or -#. input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or -#. apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. #. Click **Apply** or **Apply and Close** to confirm deletion of the specified elements. .. image:: ../images/remove_nodes1.png :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/remove_nodes2.png :align: center .. centered:: - "The mesh with some elements removed" + The mesh with some elements removed .. _clear_mesh_anchor: @@ -120,21 +106,17 @@ Removing elements Clearing Mesh Data ################## -**To remove all nodes and all types of cells in your mesh at once:** +*To remove all nodes and all types of cells in your mesh at once:* -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the Modification menu choose Remove and from the associated submenu select the Clear Mesh Data, or just click **"Clear Mesh Data"** button in the toolbar. You can also right-click on the mesh in the Object Browser and select Clear Mesh Data in the pop-up menu. - -.. image:: ../images/mesh_clear.png - :align: center +.. |clr| image:: ../images/mesh_clear.png -.. centered:: - **"Clear Mesh Data" button** +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Clear Mesh Data**, or just click *"Clear Mesh Data"* button |clr| in the toolbar. You can also right-click on the mesh in the Object Browser and select **Clear Mesh Data** in the pop-up menu. .. note:: - This command works in a different way in different situations: - * if the mesh is computed on a geometry, then "Clear Mesh Data" removes all elements and nodes. - * if the mesh is not based on a geometry (imported, compound, created from scratch etc.), then "Clear Mesh Data" removes only the elements and nodes computed by algorithms. If no such elements or nodes have been created, can remove nothing. + This command works in a different way in different situations: + * if the mesh is computed on a geometry, then *Clear Mesh Data* removes all elements and nodes. + * if the mesh is not based on a geometry (imported, compound, created from scratch etc.), then *Clear Mesh Data* removes only the elements and nodes computed by algorithms. If no such elements or nodes have been created, can remove nothing. **See Also** a sample TUI Script of a :ref:`tui_removing_nodes_and_elements` operation. diff --git a/doc/salome/gui/SMESH/input/reorient_faces.rst b/doc/salome/gui/SMESH/input/reorient_faces.rst index 142a707d2..82982dd9a 100644 --- a/doc/salome/gui/SMESH/input/reorient_faces.rst +++ b/doc/salome/gui/SMESH/input/reorient_faces.rst @@ -14,21 +14,15 @@ This operation allows fixing the orientation of a set of faces in the following The orientation of a face is changed by reverting the order of its nodes. -**To set orientation of faces:** - -#. In the **Modification** menu select **Reorient faces** item or click **Reorient faces** button in the toolbar. - - .. image:: ../images/reorient_faces_face.png - :align: center - - .. centered:: - **"Reorient faces" button** - +*To set orientation of faces:* +.. |img| image:: ../images/reorient_faces_face.png +#. In the **Modification** menu select **Reorient faces** item or click *"Reorient faces"* button |img| in the toolbar. #. In the "Reorient faces" dialog box -#. Select the **Object** (mesh, sub-mesh or group) containing faces to reorient, in the Object Browser or in the 3D Viewer. -#. To reorient by direction of the face normal: + + * Select the **Object** (mesh, sub-mesh or group) containing faces to reorient, in the Object Browser or in the 3D Viewer. + * To reorient by direction of the face normal: * Specify the coordinates of the **Point** by which the control face will be found. You can specify the **Point** by picking a node in the 3D Viewer or selecting a vertex in the Object Browser. * Set up the **Direction** vector to be compared with the normal of the control face. There are following options: @@ -41,27 +35,27 @@ The orientation of a face is changed by reverting the order of its nodes. :align: center .. centered:: - "The orientation of adjacent faces is chosen according to a vector. The control face is found by point." + The orientation of adjacent faces is chosen according to a vector. The control face is found by point. - * In the second mode it is possible to pick the **Face** by mouse in the 3D Viewer or directly input the **Face** ID in the corresponding field. + * In the second mode it is possible to pick the **Face** by mouse in the 3D Viewer or directly input the **Face** ID in the corresponding field. .. image:: ../images/reorient_2d_face.png :align: center .. centered:: - "The orientation of adjacent faces is chosen according to a vector. The control face is explicitly given." + The orientation of adjacent faces is chosen according to a vector. The control face is explicitly given. - * In the third mode, the faces can be reoriented according to volumes: + * In the third mode, the faces can be reoriented according to volumes: - * Select an object (mesh, sub-mesh or group) containing reference **Volumes**, in the Object Browser or in the 3D Viewer. - * Specify whether face normals should point outside or inside the reference volumes using **Face normal outside volume** check-box. + * Select an object (mesh, sub-mesh or group) containing reference **Volumes**, in the Object Browser or in the 3D Viewer. + * Specify whether face normals should point outside or inside the reference volumes using **Face normal outside volume** check-box. .. image:: ../images/reorient_2d_volume.png :align: center .. centered:: - "The orientation of faces is chosen relatively to adjacent volumes." + The orientation of faces is chosen relatively to adjacent volumes. #. Click the **Apply** or **Apply and Close** button to confirm the operation. diff --git a/doc/salome/gui/SMESH/input/revolution.rst b/doc/salome/gui/SMESH/input/revolution.rst index 9d13d3de4..ef70b407b 100644 --- a/doc/salome/gui/SMESH/input/revolution.rst +++ b/doc/salome/gui/SMESH/input/revolution.rst @@ -8,21 +8,18 @@ Revolution is used to build mesh elements of plus one dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Revolution can be used to create -a :ref:`extrusion_struct`. +a :ref:`structured mesh from scratch `. See :ref:`extrusion_page` page for general information on Revolution, which can be viewed as extrusion along a circular path. -**To apply revolution:** +*To apply revolution:* -#. From the **Modification** menu choose the **Revolution** item or click **"Revolution"** button in the toolbar. - - .. image:: ../images/image92.png - :align: center +.. |img| image:: ../images/image92.png +.. |sel| image:: ../images/image120.png - .. centered:: - **"Revolution" button** +#. From the **Modification** menu choose the **Revolution** item or click **"Revolution"** button in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/revolution1.png :align: center @@ -30,14 +27,8 @@ which can be viewed as extrusion along a circular path. #. In this dialog: - * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. + * Use *Selection* button |sel| to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - .. image:: ../images/image120.png - :align: center - - .. centered:: - **"Selection" button** - * Specify **Nodes**, **Edges** and **Faces**, which will be revolved, by one of following means: * **Select the whole mesh, sub-mesh or group** activating this check-box. * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame. @@ -56,7 +47,7 @@ which can be viewed as extrusion along a circular path. :align: center .. centered:: - "Example of Revolution with Angle by Step. Angle=30 and Number of Steps=3" + Example of Revolution with Angle by Step. Angle=30 and Number of Steps=3 * **Total Angle** - the elements are revolved by the specified angle only once and the number of steps defines the number of iterations (i.e. for Angle=30 and Number of Steps=3, the elements will be revolved by 30/3=10 degrees twice for a total of 30). @@ -64,7 +55,7 @@ which can be viewed as extrusion along a circular path. :align: center .. centered:: - "Example of Revolution with Total Angle. Angle=30 and Number of Steps=3" + Example of Revolution with Total Angle. Angle=30 and Number of Steps=3 @@ -84,5 +75,3 @@ which can be viewed as extrusion along a circular path. #. Click **Apply** or **Apply and Close** button to confirm the operation. **See Also** a sample TUI Script of a :ref:`tui_revolution` operation. - - diff --git a/doc/salome/gui/SMESH/input/rotation.rst b/doc/salome/gui/SMESH/input/rotation.rst index d84abab6c..85eb11d12 100644 --- a/doc/salome/gui/SMESH/input/rotation.rst +++ b/doc/salome/gui/SMESH/input/rotation.rst @@ -6,17 +6,12 @@ Rotation This operation allows to rotate in space the mesh or some of its elements. -**To rotate the mesh:** +*To rotate the mesh:* -#. From the **Modification** menu choose **Transformation** -> **Rotation** item or click **"Rotation"** button in the toolbar. - - .. image:: ../images/rotation_ico.png - :align: center - - .. centered:: - "Rotation button" +.. |img| image:: ../images/rotation_ico.png - The following dialog will appear: +#. From the **Modification** menu choose **Transformation** -> **Rotation** item or click *"Rotation"* button |img| in the toolbar. + The following dialog will appear: .. image:: ../images/rotation.png :align: center @@ -51,13 +46,13 @@ This operation allows to rotate in space the mesh or some of its elements. :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/rotation2.png :align: center .. centered:: - "The rotated mesh" + The rotated mesh **See Also** a sample TUI Script of a :ref:`tui_rotation` operation. diff --git a/doc/salome/gui/SMESH/input/scalar_bar.rst b/doc/salome/gui/SMESH/input/scalar_bar.rst index a4219cdf9..fa1961e7d 100644 --- a/doc/salome/gui/SMESH/input/scalar_bar.rst +++ b/doc/salome/gui/SMESH/input/scalar_bar.rst @@ -27,8 +27,3 @@ In this dialog you can specify the properties of the scalar bar * **Distribution** - in this menu you can Show/Hide distribution histogram of the values of the **Scalar Bar** and specify histogram properties * **Multicolor** the histogram is colored as **Scalar Bar** * **Monocolor** the histogram is colored as selected with **Distribution color** selector - - - - - diff --git a/doc/salome/gui/SMESH/input/scale.rst b/doc/salome/gui/SMESH/input/scale.rst index c8b201cea..9ff8b37e8 100644 --- a/doc/salome/gui/SMESH/input/scale.rst +++ b/doc/salome/gui/SMESH/input/scale.rst @@ -6,17 +6,18 @@ Scale This geometrical operation allows to scale in space your mesh or some of its elements. -**To scale a mesh:** +*To scale a mesh:* #. From the **Modification** menu choose **Transformation** -> **Scale Transform** item. - One of the following dialogs will appear: - With one scale factor: + The following dialogs will appear, where you can select how to scale: + + * with one scale factor: .. image:: ../images/scale01.png :align: center - Or with different scale factors for axes: + * or with different scale factors for axes: .. image:: ../images/scale02.png :align: center @@ -50,7 +51,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scaleinit01.png :align: center - and union 3 faces (along axis Z) to group "gr_faces" + and union 3 faces (along axis Z) to group "gr_faces" .. image:: ../images/scaleinit02.png :align: center @@ -62,7 +63,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale03.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres03.png :align: center @@ -72,7 +73,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale04.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres04.png :align: center @@ -82,7 +83,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale06.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres06.png :align: center @@ -94,7 +95,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale07.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres07.png :align: center @@ -106,7 +107,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale09.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres09.png :align: center diff --git a/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst b/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst index 73cdd6378..811ba0254 100644 --- a/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst +++ b/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst @@ -11,8 +11,8 @@ vertex. If we assign this algorithm to a geometrical object of higher dimension, it applies to all its vertices. Length of segments near vertex is defined by **Length Near Vertex** hypothesis. -This hypothesis is used by :ref:`a1d_algos_anchor` "Wire Discretization" or -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms as +This hypothesis is used by :ref:`Wire Discretization ` or +:ref:`Composite Side Discretization ` algorithms as follows: a geometrical edge is discretized according to a 1D hypotheses and then nodes near vertices are modified to assure the segment length required by **Length Near Vertex** hypothesis. diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.rst b/doc/salome/gui/SMESH/input/selection_filter_library.rst index cb92bd189..928678c66 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.rst +++ b/doc/salome/gui/SMESH/input/selection_filter_library.rst @@ -6,7 +6,7 @@ Selection filter library Selection filter library allows creating and storing in files the filters that can be later reused for operations on meshes. You can -access it from the Main Menu via **Tools / Selection filter library**. +access it via menu **Tools > Selection filter library**. It is also possible to save/load a filter by invoking the filter library from :ref:`filtering_elements` launched from any mesh operation. @@ -53,6 +53,7 @@ operator *Not* and you should specify logical relations between criteria using **Binary** operators *Or* and *And*. Some criteria have the additional parameter of **Tolerance**. + Switching on **Insert filter in viewer** check-box limits selection of elements in the Viewer to the current filter. @@ -100,43 +101,46 @@ The following criteria are applicable to Entities of **all** types except for *V The following criteria allow selecting mesh **Nodes**: * **Free nodes** selects nodes not belonging to any mesh element. -* **Double nodes** selects a node coincident with other nodes (within a given **Tolerance**). See also :ref:`tui_double_nodes_control`. -* **Connectivity number** selects nodes with a number of connected elements, which is more, less or equal to the predefined **Threshold Value**. Elements of the highest dimension are countered only. +* **Double nodes** selects a node coincident with other nodes (within a given **Tolerance**). See also :ref:`Double Nodes quality control `. +* **Connectivity number** selects nodes with a number of connected elements, which is more, less or equal to **Threshold Value**. Elements of the highest dimension are countered only. The following criteria allow selecting mesh **Edges**: -* **Free Borders** selects free 1D mesh elements, i.e. edges belonging to one element (face or volume) only. See also a :ref:`free_borders_page`. -* **Double edges** selects 1D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` . -* **Borders at Multi-Connections** selects edges belonging to several faces. The number of faces should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_page`. -* **Length** selects edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_page` . +* **Free Borders** selects free 1D mesh elements, i.e. edges belonging to one element (face or volume) only. See also a :ref:`Free Borders quality control `. +* **Double edges** selects 1D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control. +* **Borders at Multi-Connections** selects edges belonging to several faces. The number of faces should be more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`borders_at_multi_connection_page` quality control. +* **Length** selects edges with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`length_page` quality control. The following criteria allow selecting mesh **Faces**: -* **Aspect ratio** selects 2D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Warping** selects quadrangles with warping angle (see also a :ref:`warping_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Minimum angle** selects triangles and quadrangles with minimum angle (see also a :ref:`minimum_angle_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Taper** selects quadrangles cells with taper value (see also a :ref:`taper_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Skew** selects triangles and quadrangles with skew value (see also a :ref:`skew_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Area** selects triangles and quadrangles with a value of area (see also an :ref:`area_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Free edges** selects 2D mesh elements having at least one edge, which is not shared with other faces. See also a :ref:`free_edges_page`. +* **Aspect ratio** selects 2D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Warping** selects quadrangles with warping angle (see also a :ref:`warping_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Minimum angle** selects triangles and quadrangles with minimum angle (see also a :ref:`minimum_angle_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Taper** selects quadrangles cells with taper value (see also a :ref:`taper_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Skew** selects triangles and quadrangles with skew value (see also a :ref:`skew_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Area** selects triangles and quadrangles with a value of area (see also an :ref:`area_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Free edges** selects 2D mesh elements having at least one edge, which is not shared with other faces. See also a :ref:`free_edges_page` quality control. * **Free faces** selects 2D mesh elements, which belong to less than two volumes. -* **Double faces** selects 2D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`. -* **Faces with bare border** selects 2D mesh elements having a free border without an edge on it. See also :ref:`bare_border_faces_page`. -* **Over-constrained faces** selects 2D mesh elements having only one border shared with other 2D elements. See also :ref:`over_constrained_faces_page`. -* **Borders at Multi-Connections 2D** selects cells consisting of edges belonging to several elements of mesh. The number of mesh elements should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_2d_page`. -* **Length 2D** selects triangles and quadrangles combining of the edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_2d_page`. +* **Double faces** selects 2D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control. +* **Faces with bare border** selects 2D mesh elements having a free border without an edge on it. See also :ref:`bare_border_faces_page` quality control. +* **Over-constrained faces** selects 2D mesh elements having only one border shared with other 2D elements. See also :ref:`over_constrained_faces_page` quality control. +* **Borders at Multi-Connections 2D** selects cells consisting of edges belonging to several elements of mesh. The number of mesh elements should be more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`borders_at_multi_connection_2d_page` quality control. +* **Length 2D** selects triangles and quadrangles combining of the edges with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`length_2d_page` quality control. * **Coplanar faces** selects mesh faces neighboring the one selected by ID in **Threshold Value** field, if the angle between the normal to the neighboring face and the normal to the selected face is less then the angular tolerance (defined in degrees). Selection continues among all neighbor faces of already selected ones. -* **Element Diameter 2D** selects triangles and quadrangles composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_2d_page`. +* **Element Diameter 2D** selects triangles and quadrangles composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`max_element_length_2d_page` quality control. The following criteria allow selecting mesh **Volumes**: -* **Aspect ratio 3D** selects 3D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_3d_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Volume** selects 3D mesh elements with a value of volume (see also a :ref:`volume_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Element Diameter 3D** selects 3D mesh elements composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_3d_page`. -* **Double volumes** selects 3D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`. +* **Aspect ratio 3D** selects 3D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_3d_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Volume** selects 3D mesh elements with a value of volume (see also a :ref:`volume_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Element Diameter 3D** selects 3D mesh elements composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`max_element_length_3d_page` quality control. +* **Double volumes** selects 3D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control. * **Bad oriented volume** selects mesh volumes, which are incorrectly oriented from the point of view of MED convention. -* **Over-constrained volumes** selects mesh volumes having only one facet shared with other volumes. See also :ref:`over_constrained_volumes_page`. -* **Volumes with bare border** selects 3D mesh elements having a free border without a face on it. See also :ref:`bare_border_volumes_page`. +* **Over-constrained volumes** selects mesh volumes having only one facet shared with other volumes. See also :ref:`over_constrained_volumes_page` quality control. +* **Volumes with bare border** selects 3D mesh elements having a free border without a face on it. See also :ref:`bare_border_volumes_page` quality control. + + +**See also** sample scripts of :ref:`tui_filters_page`. diff --git a/doc/salome/gui/SMESH/input/sewing_meshes.rst b/doc/salome/gui/SMESH/input/sewing_meshes.rst index 704504627..26e7a1408 100644 --- a/doc/salome/gui/SMESH/input/sewing_meshes.rst +++ b/doc/salome/gui/SMESH/input/sewing_meshes.rst @@ -4,8 +4,7 @@ Sewing meshes ************* -In SMESH you can sew elements of a mesh. The current -functionality allows you to sew: +In SMESH you can sew elements of a mesh. The current functionality allows you to sew: * :ref:`free_borders_anchor` * :ref:`conform_free_borders_anchor` @@ -17,9 +16,9 @@ functionality allows you to sew: :align: center .. centered:: - "Sewing button" + *"Sewing"* button -**To sew elements of a mesh:** +*To sew elements of a mesh:* #. From the **Modification** menu choose the **Transformation** item and from its sub-menu select the **Sewing** item. #. Check in the dialog box one of the radio buttons corresponding to the type of sewing operation you would like to perform. @@ -35,13 +34,14 @@ Sew free borders This functionality allows you to unite free borders of a 2D mesh. -There are two working modes: *Automatic* and *Manual*. In the -**Automatic** mode, the program finds free borders coincident within the -specified tolerance and sews them. Optionally it is possible to -visually check and correct if necessary the found free borders before -sewing. -In the **Manual** mode you are to define borders to sew by picking -three nodes of each of two borders. +There are two working modes: *Automatic* and *Manual*. + +* In the **Automatic** mode, the program finds free borders coincident within the + specified tolerance and sews them. Optionally it is possible to + visually check and correct if necessary the found free borders before + sewing. +* In the **Manual** mode you are to define borders to sew by picking + three nodes of each of two borders. .. image:: ../images/sewing1.png :align: center @@ -70,26 +70,25 @@ To use **Automatic** sewing: .. image:: ../images/sort.png :align: center - .. centered:: - **Set First** button moves the selected border to the first position in the group, as a result other borders will be moved to this border during sewing. + * **Set First** button moves the selected border to the first position in the group, as a result other borders will be moved to this border during sewing. .. image:: ../images/remove.png :align: center - .. centered:: - **Remove Border** button removes the selected borders from the group. It is active if there are more than two borders in the group. + * **Remove Border** button removes the selected borders from the group. It is active if there are more than two borders in the group. -* Selection of a border in the list allows changing its first and last nodes whose IDs appear in two fields below the list. *Arrow* buttons near each field move the corresponding end node by the number of nodes defined by **Step** field. +* Selection of a border in the list allows changing its first and last nodes whose IDs appear in two fields below the list. + + * *Arrow* buttons near each field move the corresponding end node by the number of nodes defined by **Step** field. .. image:: ../images/swap.png :align: center - .. centered:: - **Swap** button swaps the first and last nodes of a selected border. + * **Swap** button swaps the first and last nodes of a selected border. -* For sewing free borders manually you should switch the **Mode** to **Manual** and define three points on each border: the first, the second and the last node: +For sewing free borders manually you should switch the **Mode** to **Manual** and define three points on each border: the first, the second and the last node: .. image:: ../images/sewing_manual.png :align: center @@ -112,20 +111,20 @@ In practice the borders to sew often coincide and in this case it is difficult to specify the first and the last nodes of a border since they coincide with the first and the last nodes of the other border. To cope with this, -:ref:`merging_nodes_page` coincident nodes into one +:ref:`merge ` coincident nodes into one beforehand. Two figures below illustrate this approach. .. image:: ../images/sew_using_merge.png :align: center .. centered:: - "Merge coincident nodes, which are difficult to distinguish" + Merge coincident nodes, which are difficult to distinguish .. image:: ../images/sew_after_merge.png :align: center .. centered:: - "After merging nodes it is easy to specify border nodes" + After merging nodes it is easy to specify border nodes The sewing algorithm is as follows: @@ -137,7 +136,7 @@ The sewing algorithm is as follows: :align: center .. centered:: - "Sewing free borders" + Sewing free borders **See Also** a sample TUI Script of a :ref:`tui_sew_free_borders` operation. @@ -153,7 +152,7 @@ This functionality can be used to unite two free borders of a 2D mesh. .. image:: ../images/sewing2.png :align: center -The borders of meshes for sewing are defined as for "Sew free borders" +The borders of meshes for sewing are defined as for :ref:`free_borders_anchor` except that the second free border is not limited and can be defined by the first and the second nodes only. The first nodes of two borders can be the same. @@ -171,7 +170,7 @@ second border. :align: center .. centered:: - "Sewing conform free borders" + Sewing conform free borders **See Also** a sample TUI Script of a :ref:`tui_sew_conform_free_borders` operation. @@ -182,11 +181,9 @@ second border. Sew border to side ################## -"Sew border to side" is intended to sew a free border to a mesh -surface. +*Sew border to side* is intended to sew a free border to a mesh surface. -.. note:: - The free border is defined as for "Sewing of free borders". The place where to sew the border is defined by two nodes, between which the border faces are placed, so that the first border node is merged with the first node on the side and the last node of the border is merged with the second specified node on the side. +The free border is defined as for :ref:`free_borders_anchor`. The place where to sew the border is defined by two nodes, between which the border faces are placed, so that the first border node is merged with the first node on the side and the last node of the border is merged with the second specified node on the side. .. image:: ../images/sewing3.png :align: center @@ -194,7 +191,7 @@ surface. The algorithm is following. #. Find a sequence of linked nodes on the side such that the found links to be most co-directed with the links of the free border. -#. Sew two sequences of nodes using algorithm of "Sewing of free berders". +#. Sew two sequences of nodes using algorithm of :ref:`free_borders_anchor`. .. note:: For sewing border to side you should define three points on the border and two points on the side. User can select these nodes in 3D viewer or define node by its id. @@ -203,7 +200,7 @@ The algorithm is following. :align: center .. centered:: - "Sewing border to side" + Sewing border to side **See Also** a sample TUI Script of a :ref:`tui_sew_meshes_border_to_side` operation. @@ -226,7 +223,7 @@ set must have a corresponding node in the other element set and corresponding nodes must be equally linked. If there are 3d elements in a set, only their free faces must obey to that rule. -.. note:: Two corresponding nodes on each side must be specified. They must belong to one element and must be located on an element set boundary. +Two corresponding nodes on each side must be specified. They must belong to one element and must be located on an element set boundary. Sewing algorithm finds and merges the corresponding nodes starting from the specified ones. @@ -235,13 +232,13 @@ from the specified ones. :align: center .. centered:: - "Step-by-step sewing process" + Step-by-step sewing process .. image:: ../images/image32.jpg :align: center .. centered:: - "The result of side elements sewing" + The result of side elements sewing For sewing side elements you should define elements for sewing and two nodes for merging on the each side. User can select these elements and diff --git a/doc/salome/gui/SMESH/input/skew.rst b/doc/salome/gui/SMESH/input/skew.rst index 726e07e7b..ed9dfa2c5 100644 --- a/doc/salome/gui/SMESH/input/skew.rst +++ b/doc/salome/gui/SMESH/input/skew.rst @@ -13,27 +13,17 @@ criterion can be applied to elements composed of 4 and 3 nodes .. image:: ../images/image27.jpg :align: center -.. centered:: - **To apply the Skew quality criterion to your mesh:** +*To apply the Skew quality criterion to your mesh:* +.. |img| image:: ../images/image40.png #. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Skew** or click **"Skew"** button of the toolbar. - - .. image:: ../images/image40.png - :align: center - - .. centered:: - **"Skew" button** +#. Choose **Controls > Face Controls > Skew** or click *"Skew"* button |img| of the toolbar. - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image93.jpg :align: center -**See Also** a sample TUI Script of a -:ref:`tui_skew` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_skew` filter. diff --git a/doc/salome/gui/SMESH/input/smeshBuilder.rst b/doc/salome/gui/SMESH/input/smeshBuilder.rst new file mode 100644 index 000000000..5631ecd6f --- /dev/null +++ b/doc/salome/gui/SMESH/input/smeshBuilder.rst @@ -0,0 +1,21 @@ + +smeshBuilder module +=================== + +.. contents:: + +.. automodule:: smeshBuilder + :synopsis: + :members: GetName, DegreesToRadians, New + +smeshBuilder class +------------------ + +.. autoclass:: smeshBuilder + :members: + +Mesh class +------------------ +.. autoclass:: Mesh + :members: + diff --git a/doc/salome/gui/SMESH/input/smesh_migration.rst b/doc/salome/gui/SMESH/input/smesh_migration.rst index 30993717d..5a2202486 100644 --- a/doc/salome/gui/SMESH/input/smesh_migration.rst +++ b/doc/salome/gui/SMESH/input/smesh_migration.rst @@ -8,97 +8,85 @@ In SALOME 7.2, the Python interface for Mesh has been slightly modified to offer Scripts generated for SALOME 6 and older versions must be adapted to work in SALOME 7.2 with full functionality. - The compatibility mode allows old scripts to work in almost all cases, but with a warning. -See also :ref:`geompy_migration_page` - -**Salome initialisation must always be done as shown below** +* **Salome initialisation** must always be done as shown below. -*salome_init()* can be invoked safely several times): -:: + (*salome_init()* can be invoked safely several times):: import salome salome.salome_init() -**smesh initialisation is modified.** -the old mode (from dump): -:: +* **smesh initialisation** is modified. + + The old mode (from dump):: import smesh, SMESH, SALOMEDS smesh.SetCurrentStudy(salome.myStudy) -the new mode: -:: + The new mode:: import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) -**Of course,** from smesh import ***is no more possible.** +* Of course, **from smesh import** * is **no more possible.** -You have to explicitely write **smesh.some_method()**. + You have to explicitely write *smesh.some_method()*. -**All algorithms have been transferred from the namespace **smesh** to the namespace **smeshBuilder**.** +* All **algorithms** have been transferred from the namespace *smesh* to the namespace *smeshBuilder*. -For instance: -:: + For instance:: MEFISTO_2D_1 = Mesh_1.Triangle(algo=smesh.MEFISTO,geom=Face_1) -is replaced by: -:: + is replaced by:: MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1) -StdMeshers algorithms concerned are **REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD**. + StdMeshers algorithms concerned are *REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD*. -SMESH Plugins provide such algorithms as: **NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D**. + SMESH Plugins provide such algorithms as: *NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D*. -If you use DISTENE plugins, you also have **BLSURF, GHS3D, GHS3DPRL, Hexotic**. + If you use DISTENE plugins, you also have *BLSURF, GHS3D, GHS3DPRL, Hexotic*. -**Some variables were available in both namespaces **smesh** and **SMESH**. +* Some **variables** were available in both namespaces *smesh* and *SMESH*. Now they are available only in namespace *SMESH*. -Now they are available only in namespace **SMESH****. + The dump function used only the namespace *SMESH*, + so, if your script was built with the help of the dump function, it should be already OK in this respect. -The dump function used only the namespace **SMESH**, -so, if your script was built with the help of the dump function, it should be already OK in this respect. + The most used variables concerned are: -The most used variables concerned are: - **NODE, EDGE, FACE, VOLUME, ALL.** - **FT_xxx, geom_xxx, ADD_xxx...** + * *NODE, EDGE, FACE, VOLUME, ALL.* + * *FT_xxx, geom_xxx, ADD_xxx...* -For instance: -:: + For instance:: srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", smesh.FACE ) mesh.MakeGroup("Tetras",smesh.VOLUME,smesh.FT_ElemGeomType,"=",smesh.Geom_TETRA) filter = smesh.GetFilter(smesh.FACE, smesh.FT_AspectRatio, smesh.FT_MoreThan, 6.5) -is replaced by: -:: + is replaced by:: srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", SMESH.FACE ) mesh.MakeGroup("Tetras",SMESH.VOLUME,SMESH.FT_ElemGeomType,"=",SMESH.Geom_TETRA) filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_AspectRatio, SMESH.FT_MoreThan, 6.5) -**The namespace **smesh.smesh** does not exist any more, use **smesh** instead.** -For instance: -:: +* The namespace **smesh.smesh** does not exist any more, use **smesh** instead. + + For instance:: Compound1 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, 1, 1e-05) -is replaced by: -:: + is replaced by:: Compound1 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, 1, 1e-05) -**If you need to import a %SMESH Plugin explicitely, keep in mind that they are now located in separate namespaces.** +* If you need to **import a SMESH Plugin** explicitely, keep in mind that they are now located in separate namespaces. -For instance: -:: + For instance:: import StdMeshers import NETGENPlugin @@ -106,8 +94,7 @@ For instance: import GHS3DPlugin import HexoticPLUGIN -is replaced by: -:: + is replaced by:: from salome.StdMeshers import StdMeshersBuilder from salome.NETGENPlugin import NETGENPluginBuilder diff --git a/doc/salome/gui/SMESH/input/smesh_module.rst b/doc/salome/gui/SMESH/input/smesh_module.rst new file mode 100644 index 000000000..32bae118b --- /dev/null +++ b/doc/salome/gui/SMESH/input/smesh_module.rst @@ -0,0 +1,958 @@ +SMESH module +============ + +.. contents:: + +.. py:module:: SMESH + +DriverMED_ReadStatus +-------------------- + +.. py:class:: DriverMED_ReadStatus + + Enumeration for mesh read status + + .. py:attribute:: DRS_OK + + Ok + + .. py:attribute:: DRS_EMPTY + + a file contains no mesh with the given name + + .. py:attribute:: DRS_WARN_RENUMBER + + a MED file has overlapped ranges of element numbers, + so the numbers from the file are ignored + + .. py:attribute:: DRS_WARN_SKIP_ELEM + + some elements were skipped due to incorrect file data + + .. py:attribute:: DRS_WARN_DESCENDING + + some elements were skipped due to descending connectivity + + .. py:attribute:: DRS_FAIL + + general failure (exception etc.) + +ComputeErrorName +---------------- + +.. py:class:: ComputeErrorName + + Enumeration of computation errors + + .. py:attribute:: COMPERR_OK + + Ok + + .. py:attribute:: COMPERR_BAD_INPUT_MESH + + wrong mesh of lower sub-mesh + + .. py:attribute:: COMPERR_STD_EXCEPTION + + some std exception raised + + .. py:attribute:: COMPERR_OCC_EXCEPTION + + OCC exception raised + + .. py:attribute:: COMPERR_SLM_EXCEPTION + + SALOME exception raised + + .. py:attribute:: COMPERR_EXCEPTION + + other exception raised + + .. py:attribute:: COMPERR_MEMORY_PB + + memory allocation problem + + .. py:attribute:: COMPERR_ALGO_FAILED + + computation failed + + .. py:attribute:: COMPERR_BAD_SHAPE + + bad geometry + + .. py:attribute:: COMPERR_WARNING + + algo reports error but sub-mesh is computed anyway + + .. py:attribute:: COMPERR_CANCELED + + compute canceled + + .. py:attribute:: COMPERR_NO_MESH_ON_SHAPE + + no mesh elements assigned to sub-mesh + + .. py:attribute:: COMPERR_BAD_PARMETERS + + incorrect hypotheses parameters + + +ComputeError +------------ + +.. py:class:: ComputeError + + Error details + + .. py:attribute:: code + + ``int`` - :class:`ComputeErrorName` or, if negative, algo specific code + + .. py:attribute:: comment + + ``str`` - textual problem description + + .. py:attribute:: algoName + + ``str`` + + .. py:attribute:: subShapeID + + ``int`` - id of sub-shape of a shape to mesh + + .. py:attribute:: hasBadMesh + + ``boolean`` - there are elements preventing computation available for visualization + +Measure +------- + +.. py:class:: Measure + + Data returned by measure operations + + .. py:attribute:: minX, minY, minZ + + ``double`` - coordinates of one point + + .. py:attribute:: maxX, maxY, maxZ + + ``double`` - coordinates of another point + + .. py:attribute:: node1, node2 + + ``long`` - IDs of two nodes + + .. py:attribute:: elem1, elem2 + + ``long`` - IDs of two elements + + .. py:attribute:: value + + ``double`` - distance + +NodePosition +------------ + +.. py:class:: NodePosition + + Node location on a shape + + .. py:attribute:: shapeID + + ``long`` - ID of a shape + + .. py:attribute:: shapeType + + ``GEOM.shape_type`` - type of shape + + .. py:attribute:: params + + ``list of float`` - + + * [U] on EDGE, + * [U,V] on FACE, + * [] on the rest shapes + +ElementPosition +--------------- + +.. py:class:: ElementPosition + + Element location on a shape + + .. py:attribute:: shapeID + + ``long`` - ID of a shape + + .. py:attribute:: shapeType + + ``GEOM.shape_type`` - type of shape + +PolySegment +----------- + +.. py:class:: PolySegment + + Define a cutting plane passing through two points. + Used in :meth:`smeshBuilder.Mesh.MakePolyLine` + + .. py:attribute:: node1ID1, node1ID2 + + ``int,int`` - *point 1*: if *node1ID2* > 0, then the point is in the middle of a face edge defined + by two nodes, else it is at *node1ID1* + + .. py:attribute:: node2ID1, node2ID2 + + ``int,int`` - *point 2*: if *node2ID2* > 0, then the point is in the middle of a face edge defined + by two nodes, else it is at *node2ID1* + + .. py:attribute:: vector + + ``SMESH.DirStruct`` - vector on the plane; to use a default plane set vector = (0,0,0) + + +ElementType +----------- + +.. py:class:: ElementType + + Enumeration for element type, like in SMDS + + .. py:attribute:: + ALL + NODE + EDGE + FACE + VOLUME + ELEM0D + BALL + NB_ELEMENT_TYPES + +EntityType +---------- + +.. py:class:: EntityType + + Enumeration of entity type + + .. py:attribute:: + Entity_Node + Entity_0D + Entity_Edge + Entity_Quad_Edge + Entity_Triangle + Entity_Quad_Triangle + Entity_BiQuad_Triangle + Entity_Quadrangle + Entity_Quad_Quadrangle + Entity_BiQuad_Quadrangle + Entity_Polygon + Entity_Quad_Polygon + Entity_Tetra + Entity_Quad_Tetra + Entity_Pyramid + Entity_Quad_Pyramid + Entity_Hexa + Entity_Quad_Hexa + Entity_TriQuad_Hexa + Entity_Penta + Entity_Quad_Penta + Entity_BiQuad_Penta + Entity_Hexagonal_Prism + Entity_Polyhedra + Entity_Quad_Polyhedra + Entity_Ball + Entity_Last + +GeometryType +------------ + +.. py:class:: GeometryType + + Enumeration of element geometry type + + .. py:attribute:: + Geom_POINT + Geom_EDGE + Geom_TRIANGLE + Geom_QUADRANGLE + Geom_POLYGON + Geom_TETRA + Geom_PYRAMID + Geom_HEXA + Geom_PENTA + Geom_HEXAGONAL_PRISM + Geom_POLYHEDRA + Geom_BALL + Geom_LAST + +Hypothesis_Status +----------------- + +.. py:class:: Hypothesis_Status + + Enumeration of result of hypothesis addition/removal + + .. py:attribute:: HYP_OK + + Ok + + .. py:attribute:: HYP_MISSING + + algo misses a hypothesis + + .. py:attribute:: HYP_CONCURRENT + + several applicable hypotheses + + .. py:attribute:: HYP_BAD_PARAMETER + + hypothesis has a bad parameter value + + .. py:attribute:: HYP_HIDDEN_ALGO + + an algo is hidden by an upper dim algo generating all-dim elements + + .. py:attribute:: HYP_HIDING_ALGO + + an algo hides lower dim algos by generating all-dim elements + + .. py:attribute:: HYP_UNKNOWN_FATAL + + all statuses below should be considered as fatal for Add/RemoveHypothesis operations + + .. py:attribute:: HYP_INCOMPATIBLE + + hypothesis does not fit algorithm + + .. py:attribute:: HYP_NOTCONFORM + + not conform mesh is produced appling a hypothesis + + .. py:attribute:: HYP_ALREADY_EXIST + + such hypothesis already exist + + .. py:attribute:: HYP_BAD_DIM + + bad dimension + + .. py:attribute:: HYP_BAD_SUBSHAPE + + shape is neither the main one, nor its sub-shape, nor a group + + .. py:attribute:: HYP_BAD_GEOMETRY + + geometry mismatches algorithm's expectation + + .. py:attribute:: HYP_NEED_SHAPE + + algorithm can work on shape only + + .. py:attribute:: HYP_INCOMPAT_HYPS + + several additional hypotheses are incompatible one with other + + +FunctorType +----------- + +.. py:class:: FunctorType + + Enumeration of functor types + + .. py:attribute:: + FT_AspectRatio + FT_AspectRatio3D + FT_Warping + FT_MinimumAngle + FT_Taper + FT_Skew + FT_Area + FT_Volume3D + FT_MaxElementLength2D + FT_MaxElementLength3D + FT_FreeBorders + FT_FreeEdges + FT_FreeNodes + FT_FreeFaces + FT_EqualNodes + FT_EqualEdges + FT_EqualFaces + FT_EqualVolumes + FT_MultiConnection + FT_MultiConnection2D + FT_Length + FT_Length2D + FT_Deflection2D + FT_NodeConnectivityNumber + FT_BelongToMeshGroup + FT_BelongToGeom + FT_BelongToPlane + FT_BelongToCylinder + FT_BelongToGenSurface + FT_LyingOnGeom + FT_RangeOfIds + FT_BadOrientedVolume + FT_BareBorderVolume + FT_BareBorderFace + FT_OverConstrainedVolume + FT_OverConstrainedFace + FT_LinearOrQuadratic + FT_GroupColor + FT_ElemGeomType + FT_EntityType + FT_CoplanarFaces + FT_BallDiameter + FT_ConnectedElements + FT_LessThan + FT_MoreThan + FT_EqualTo + FT_LogicalNOT + FT_LogicalAND + FT_LogicalOR + FT_Undefined + +.. py:module:: SMESH.Filter + :noindex: + +Filter.Criterion +---------------- + +.. py:class:: Criterion + + Structure containing information of a criterion + + .. py:attribute:: Type + + ``long`` - value of item of :class:`SMESH.FunctorType` + + .. py:attribute:: Compare + + ``long`` - value of item of :class:`SMESH.FunctorType` in ( FT_LessThan, FT_MoreThan, FT_EqualTo ) + + .. py:attribute:: Threshold + + ``double`` - threshold value + + .. py:attribute:: ThresholdStr + + ``string`` - Threshold value defined as string. Used for: + 1. Diapason of identifiers. Example: "1,2,3,5-10,12,27-29". + 2. Storing name of shape. + 3. Storing group color "0.2;0;0.5". + 4. Storing point coordinates. + + .. py:attribute:: ThresholdID + + ``string`` - One more threshold value defined as string. Used for storing id of shape + + .. py:attribute:: UnaryOp + + ``long`` - unary logical operation: FT_LogicalNOT or FT_Undefined + + .. py:attribute:: BinaryOp + + ``long`` - binary logical operation FT_LogicalAND, FT_LogicalOR etc. + + .. py:attribute:: Tolerance + + ``double`` - Tolerance is used for + 1. Comparison of real values. + 2. Detection of geometrical coincidence. + + .. py:attribute:: TypeOfElement + + ``ElementType`` - type of element :class:`SMESH.ElementType` (SMESH.NODE, SMESH.FACE etc.) + + .. py:attribute:: Precision + + ``long`` - Precision of numerical functors + +.. py:currentmodule:: SMESH + +FreeEdges.Border +---------------- + +.. py:class:: FreeEdges.Border + + Free edge: edge connected to one face only + + .. py:attribute:: myElemId + + ``long`` - ID of a face + + .. py:attribute:: myPnt1,myPnt2 + + ``long`` - IDs of two nodes + +PointStruct +----------- + +.. py:class:: PointStruct + + 3D point. + + Use :meth:`GetPointStruct() ` + to convert a vertex (GEOM.GEOM_Object) to PointStruct + + .. py:attribute:: x,y,z + + ``double`` - point coordinates + +DirStruct +--------- + +.. py:class:: DirStruct + + 3D vector. + + Use :meth:`GetDirStruct() ` + to convert a vector (GEOM.GEOM_Object) to DirStruct + + .. py:attribute:: PS + + :class:`PointStruct` - vector components + +AxisStruct +---------- + +.. py:class:: AxisStruct + + Axis defined by its origin and its vector. + + Use :meth:`GetAxisStruct() ` + to convert a line or plane (GEOM.GEOM_Object) to AxisStruct + + .. py:attribute:: x,y,z + + ``double`` - coordinates of the origin + + .. py:attribute:: vx,vy,vz + + ``double`` - components of the vector + +Filter +------ + +.. py:class:: Filter + + Filter of mesh entities + + .. py:function:: GetElementsId( mesh ) + + Return satisfying elements + + :param SMESH.SMESH_Mesh mesh: the mesh; + it can be obtained via :meth:`smeshBuilder.Mesh.GetMesh` + + :return: list of IDs + + .. py:function:: GetIDs() + + Return satisfying elements. + A mesh to filter must be already set, either via :meth:`SetMesh` method + or via ``mesh`` argument of :meth:`smeshBuilder.smeshBuilder.GetFilter` + + :return: list of IDs + + .. py:function:: SetMesh( mesh ) + + Set mesh to filter + + :param SMESH.SMESH_Mesh mesh: the mesh; + it can be obtained via :meth:`smeshBuilder.Mesh.GetMesh` + + .. py:function:: SetCriteria( criteria ) + + Define filtering criteria + + :param criteria: list of :class:`SMESH.Filter.Criterion` + +NumericalFunctor +---------------- + +.. py:class:: NumericalFunctor + + Calculate value by ID of mesh entity. Base class of various functors + + .. py:function:: GetValue( elementID ) + + Compute a value + + :param elementID: ID of element or node + :return: floating value + +SMESH_Mesh +---------- + +.. py:class:: SMESH_Mesh + + Mesh. It is a Python wrap over a CORBA interface of mesh. + + All its methods are exposed via :class:`smeshBuilder.Mesh` class that you can obtain by calling:: + + smeshBuilder_mesh = smesh.Mesh( smesh_mesh ) + +SMESH_MeshEditor +---------------- + +.. py:class:: SMESH_MeshEditor + + Mesh editor. It is a Python wrap over a CORBA SMESH_MeshEditor interface. + All its methods are exposed via :class:`smeshBuilder.Mesh` class. + + .. py:class:: Extrusion_Error + + Enumeration of errors of :meth:`smeshBuilder.Mesh.ExtrusionAlongPathObjects` + + .. py:attribute:: + EXTR_OK + EXTR_NO_ELEMENTS + EXTR_PATH_NOT_EDGE + EXTR_BAD_PATH_SHAPE + EXTR_BAD_STARTING_NODE + EXTR_BAD_ANGLES_NUMBER + EXTR_CANT_GET_TANGENT + +.. py:class:: SMESH_MeshEditor.Sew_Error + + Enumeration of errors SMESH_MeshEditor.Sewing... methods + + .. py:attribute:: + SEW_OK + SEW_BORDER1_NOT_FOUND + SEW_BORDER2_NOT_FOUND + SEW_BOTH_BORDERS_NOT_FOUND + SEW_BAD_SIDE_NODES + SEW_VOLUMES_TO_SPLIT + SEW_DIFF_NB_OF_ELEMENTS + SEW_TOPO_DIFF_SETS_OF_ELEMENTS + SEW_BAD_SIDE1_NODES + SEW_BAD_SIDE2_NODES + SEW_INTERNAL_ERROR + +SMESH_Pattern +------------- + +.. py:class:: SMESH_Pattern + + Pattern mapper. Use a pattern defined by user for + + * creating mesh elements on geometry, faces or blocks + * refining existing mesh elements, faces or hexahedra + + The pattern is defined by a string as explained :doc:`here `. + + Usage work-flow is: + + * Define a pattern via Load... method + * Compute future positions of nodes via Apply... method + * Create nodes and elements in a mesh via :meth:`MakeMesh` method + + .. py:function:: LoadFromFile( patternFileContents ) + + Load a pattern from the string *patternFileContents* + + :param str patternFileContents: string defining a pattern + :return: True if succeeded + + .. py:function:: LoadFromFace( mesh, geomFace, toProject ) + + Create a 2D pattern from the mesh built on *geomFace*. + + :param SMESH.SMESH_Mesh mesh: source mesh + :param GEOM.GEOM_Object geomFace: geometrical face whose mesh forms a pattern + :param boolean toProject: if True makes override nodes positions + on *geomFace* computed by mesher + :return: True if succeeded + + .. py:function:: LoadFrom3DBlock( mesh, geomBlock ) + + Create a 3D pattern from the mesh built on *geomBlock* + + :param SMESH.SMESH_Mesh mesh: source mesh + :param GEOM.GEOM_Object geomBlock: geometrical block whose mesh forms a pattern + :return: True if succeeded + + .. py:function:: ApplyToFace( geomFace, vertexOnKeyPoint1, toReverse ) + + Compute nodes coordinates by applying + the loaded pattern to *geomFace*. The first key-point + will be mapped into *vertexOnKeyPoint1*, which must + be in the outer wire of *geomFace* + + :param GEOM.GEOM_Object geomFace: the geometrical face to generate faces on + :param GEOM.GEOM_Object vertexOnKeyPoint1: the vertex to be at the 1st key-point + :param boolean toReverse: to reverse order of key-points + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: ApplyTo3DBlock( geomBlock, vertex000, vertex001 ) + + Compute nodes coordinates by applying + the loaded pattern to *geomBlock*. The (0,0,0) key-point + will be mapped into *vertex000*. The (0,0,1) + key-point will be mapped into *vertex001*. + + :param GEOM.GEOM_Object geomBlock: the geometrical block to generate volume elements on + :param GEOM.GEOM_Object vertex000: the vertex to superpose (0,0,0) key-point of pattern + :param GEOM.GEOM_Object vertex001: the vertex to superpose (0,0,1) key-point of pattern + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: ApplyToMeshFaces( mesh, facesIDs, nodeIndexOnKeyPoint1, toReverse ) + + Compute nodes coordinates by applying + the loaded pattern to mesh faces. The first key-point + will be mapped into *nodeIndexOnKeyPoint1* -th node of each mesh face + + :param SMESH.SMESH_Mesh mesh: the mesh where to refine faces + :param list_of_ids facesIDs: IDs of faces to refine + :param int nodeIndexOnKeyPoint1: index of a face node to be at 1-st key-point of pattern + :param boolean toReverse: to reverse order of key-points + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: ApplyToHexahedrons( mesh, volumesIDs, node000Index, node001Index ) + + Compute nodes coordinates by applying + the loaded pattern to hexahedra. The (0,0,0) key-point + will be mapped into *Node000Index* -th node of each volume. + The (0,0,1) key-point will be mapped into *node001Index* -th + node of each volume. + + :param SMESH.SMESH_Mesh mesh: the mesh where to refine hexahedra + :param list_of_ids volumesIDs: IDs of volumes to refine + :param long node000Index: index of a volume node to be at (0,0,0) key-point of pattern + :param long node001Index: index of a volume node to be at (0,0,1) key-point of pattern + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: MakeMesh( mesh, createPolygons, createPolyedrs ) + + Create nodes and elements in *mesh* using nodes + coordinates computed by either of Apply...() methods. + If *createPolygons* is True, replace adjacent faces by polygons + to keep mesh conformity. + If *createPolyedrs* is True, replace adjacent volumes by polyedrs + to keep mesh conformity. + + :param SMESH.SMESH_Mesh mesh: the mesh to create nodes and elements in + :param boolean createPolygons: to create polygons to to keep mesh conformity + :param boolean createPolyedrs: to create polyherda to to keep mesh conformity + :return: True if succeeded + + +SMESH_subMesh +------------- + +.. py:class:: SMESH_subMesh + + :doc:`Sub-mesh ` + + .. py:function:: GetNumberOfElements() + + Return number of elements in the sub-mesh + + .. py:function:: GetNumberOfNodes( all ) + + Return number of nodes in the sub-mesh + + :param boolean all: if True, also return nodes assigned to boundary sub-meshes + + .. py:function:: GetElementsId() + + Return IDs of elements in the sub-mesh + + .. py:function:: GetNodesId() + + Return IDs of nodes in the sub-mesh + + .. py:function:: GetSubShape() + + Return :class:`geom shape ` the sub-mesh is dedicated to + + .. py:function:: GetId() + + Return ID of the :class:`geom shape ` the sub-mesh is dedicated to + + .. py:function:: GetMeshInfo() + + Return number of mesh elements of each :class:`SMESH.EntityType`. + Use :meth:`smeshBuilder.smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. + + :return: array of number of elements per :class:`SMESH.EntityType` + + .. py:function:: GetMesh() + + Return the :class:`SMESH.SMESH_Mesh` + +SMESH_GroupBase +--------------- + +.. py:class:: SMESH_GroupBase + + :doc:`Mesh group ` + + .. py:function:: SetName( name ) + + Set group name + + .. py:function:: GetName() + + Return group name + + .. py:function:: GetType() + + Return :class:`group type ` (type of elements in the group) + + .. py:function:: Size() + + Return the number of elements in the group + + .. py:function:: IsEmpty() + + Return True if the group does not contain any elements + + .. py:function:: Contains( elem_id ) + + Return True if the group contains an element with ID == *elem_id* + + .. py:function:: GetID( elem_index ) + + Return ID of an element at position *elem_index* counted from 1 + + .. py:function:: GetNumberOfNodes() + + Return the number of nodes of cells included to the group. + For a nodal group return the same value as Size() function + + .. py:function:: GetNodeIDs() + + Return IDs of nodes of cells included to the group. + For a nodal group return result of GetListOfID() function + + .. py:function:: SetColor( color ) + + Set group color + + :param SALOMEDS.Color color: color + + .. py:function:: GetColor() + + Return group color + + :return: SALOMEDS.Color + +SMESH_Group +----------- + +.. py:class:: SMESH_Group + + :doc:`Standalone mesh group `. Inherits all methods of :class:`SMESH.SMESH_GroupBase` + + .. py:function:: Clear() + + Clears the group's contents + + .. py:function:: Add( elem_ids ) + + Adds elements or nodes with specified identifiers to the group + + :param list_of_ids elem_ids: IDs to add + + .. py:function:: AddFrom( idSource ) + + Add all elements or nodes from the specified source to the group + + :param SMESH.SMESH_IDSource idSource: an object to retrieve IDs from + + .. py:function:: Remove( elem_ids ) + + Removes elements or nodes with specified identifiers from the group + + :param list_of_ids elem_ids: IDs to remove + +SMESH_GroupOnGeom +----------------- + +.. py:class:: SMESH_GroupOnGeom + + Group linked to geometry. Inherits all methods of :class:`SMESH.SMESH_GroupBase` + + .. py:function:: GetShape() + + Return an associated geometry + + :return: GEOM.GEOM_Object + +SMESH_GroupOnFilter +------------------- + +.. py:class:: SMESH_GroupOnFilter + + Group defined by filter. Inherits all methods of :class:`SMESH.SMESH_GroupBase` + + .. py:function:: SetFilter( filter ) + + Set the :class:`filter ` + + .. py:function:: GetFilter() + + Return the :class:`filter ` + + +SMESH_IDSource +-------------- + +.. py:class:: SMESH_IDSource + + Base class for classes able to return IDs of mesh entities. These classes are: + + * :class:`SMESH.SMESH_Mesh` + * :class:`SMESH.SMESH_subMesh` + * :class:`SMESH.SMESH_GroupBase` + * :class:`SMESH.Filter` + * temporal ID source created by :meth:`smeshBuilder.Mesh.GetIDSource` + + .. py:function:: GetIDs() + + Return a sequence of all element IDs + + .. py:function:: GetMeshInfo() + + Return number of mesh elements of each :class:`SMESH.EntityType`. + Use :meth:`smeshBuilder.smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. + + .. py:function:: GetNbElementsByType() + + Return number of mesh elements of each :class:`SMESH.ElementType`. + Use :meth:`smeshBuilder.smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.ElementType`. + + + .. py:function:: GetTypes() + + Return types of elements it contains. + It's empty if the object contains no IDs + + :return: list of :class:`SMESH.ElementType` + + .. py:function:: GetMesh() + + Return the :class:`SMESH.SMESH_Mesh` + +SMESH_Hypothesis +---------------- + +.. py:class:: SMESH_Hypothesis + + Base class of all :doc:`hypotheses ` + + .. py:function:: GetName() + + Return string of hypothesis type name, something like "Regular_1D" + + .. py:function:: GetLibName() + + Return string of plugin library name diff --git a/doc/salome/gui/SMESH/input/smeshpy_interface.rst b/doc/salome/gui/SMESH/input/smeshpy_interface.rst index 7a71f5cb6..7094b6592 100644 --- a/doc/salome/gui/SMESH/input/smeshpy_interface.rst +++ b/doc/salome/gui/SMESH/input/smeshpy_interface.rst @@ -7,16 +7,14 @@ Python interface Python API of SALOME Mesh module defines several classes that can be used for easy mesh creation and edition. -Documentation of SALOME %Mesh module Python API is available in two forms: +Documentation of SALOME Mesh module Python API is available in two forms: -- :ref:`Structured documentation `, where all methods and classes are grouped by their functionality. +- :doc:`Structured documentation `, where all methods and classes are grouped by their functionality. -- :ref:`Linear documentation ` grouped only by classes, declared in the :mod:`smeshBuilder` and :mod:`StdMeshersBuilder` Python packages. +- :ref:`Linear documentation ` grouped only by classes, declared in the :mod:`smeshBuilder` and :mod:`StdMeshersBuilder` Python packages. With SALOME 7.2, the Python interface for Mesh has been slightly modified to offer new functionality. - You may have to modify your scripts generated with SALOME 6 or older versions. - Please see :ref:`smesh_migration_page`. Class :class:`smeshBuilder.smeshBuilder` provides an interface to create and handle @@ -43,21 +41,21 @@ A usual workflow to generate a mesh on geometry is following: mesh = smesh.Mesh( geometry ) -#. Create and assign :ref:`basic_meshing_algos_page` by calling corresponding methods of the mesh. If a sub-shape is provided as an argument, a :ref:`constructing_submeshes_page` is implicitly created on this sub-shape: +#. Create and assign :ref:`algorithms ` by calling corresponding methods of the mesh. If a sub-shape is provided as an argument, a :ref:`sub-mesh ` is implicitly created on this sub-shape: .. code-block:: python :linenos: - regular1D = smeshBuilder.Mesh.Segment() - mefisto = smeshBuilder.Mesh.Triangle( smeshBuilder.MEFISTO ) + regular1D = mesh.Segment() + mefisto = mesh.Triangle( smeshBuilder.MEFISTO ) # use other triangle algorithm on a face -- a sub-mesh appears in the mesh - netgen = smeshBuilder.Mesh.Triangle( smeshBuilder.NETGEN_1D2D, face ) + netgen = mesh.Triangle( smeshBuilder.NETGEN_1D2D, face ) -#. Create and assign :ref:`about_hypo_page` by calling corresponding methods of algorithms: +#. Create and assign :ref:`hypotheses ` by calling corresponding methods of algorithms: .. code-block:: python :linenos: - segLen10 = StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength( 10. ) - maxArea = StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength( 100. ) + segLen10 = regular1D.LocalLength( 10. ) + maxArea = mefisto.LocalLength( 100. ) netgen.SetMaxSize( 20. ) netgen.SetFineness( smeshBuilder.VeryCoarse ) @@ -65,7 +63,7 @@ A usual workflow to generate a mesh on geometry is following: .. code-block:: python :linenos: - Mesh.Compute() + mesh.Compute() An easiest way to start with Python scripting is to do something in GUI and then to get a corresponding Python script via @@ -83,39 +81,40 @@ generation and for retrieving information on mesh nodes and elements. Example of 3d mesh generation: ############################## -.. _3dmesh.py: - -``3dmesh.py`` - - .. literalinclude:: ../../../examples/3dmesh.py :linenos: :language: python -:download:`../../../examples/3dmesh.py` +:download:`Download this script <../../../examples/3dmesh.py>` Examples of Python scripts for Mesh operations are available by the following links: -- :ref:`tui_creating_meshes_page` -- :ref:`tui_defining_hypotheses_page` -- :ref:`tui_grouping_elements_page` -- :ref:`tui_filters_page` -- :ref:`tui_modifying_meshes_page` -- :ref:`tui_transforming_meshes_page` -- :ref:`tui_viewing_meshes_page` -- :ref:`tui_quality_controls_page` -- :ref:`tui_measurements_page` -- :ref:`tui_work_on_objects_from_gui` -- :ref:`tui_notebook_smesh_page` -- :ref:`tui_cartesian_algo` -- :ref:`tui_use_existing_faces` -- :ref:`tui_prism_3d_algo` -- :ref:`tui_generate_flat_elements_page` - - - .. toctree:: - :maxdepth: 2 + :titlesonly: + + tui_creating_meshes + tui_defining_hypotheses + tui_grouping_elements + tui_filters + tui_modifying_meshes + tui_transforming_meshes + tui_viewing_meshes + tui_quality_controls + tui_measurements + tui_work_on_objects_from_gui + tui_notebook_smesh + tui_cartesian_algo + tui_use_existing_faces + tui_prism_3d_algo + tui_generate_flat_elements - smesh_migration.rst +.. toctree:: + :hidden: + + smesh_migration.rst + smeshBuilder.rst + StdMeshersBuilder.rst + smeshstudytools.rst + modules.rst + smesh_module.rst diff --git a/doc/salome/gui/SMESH/input/smeshstudytools.rst b/doc/salome/gui/SMESH/input/smeshstudytools.rst new file mode 100644 index 000000000..288b72114 --- /dev/null +++ b/doc/salome/gui/SMESH/input/smeshstudytools.rst @@ -0,0 +1,5 @@ +smeshstudytools module +====================== +.. automodule:: smeshstudytools + :members: + diff --git a/doc/salome/gui/SMESH/input/smoothing.rst b/doc/salome/gui/SMESH/input/smoothing.rst index 37e9b189e..79041ad66 100644 --- a/doc/salome/gui/SMESH/input/smoothing.rst +++ b/doc/salome/gui/SMESH/input/smoothing.rst @@ -9,17 +9,13 @@ locations of element corners (nodes). .. note:: Depending on the chosen method and mesh geometry the smoothing can actually decrease the quality of elements and even make some elements inverted. -**To apply smoothing to the elements of your mesh:** +*To apply smoothing to the elements of your mesh:* -#. In the **Modification** menu select the **Smoothing** item or click **"Smoothing"** button in the toolbar. +.. |img| image:: ../images/image84.png - .. image:: ../images/image84.png - :align: center - - .. centered:: - **"Smoothing" button** +#. In the **Modification** menu select the **Smoothing** item or click *"Smoothing"* button |img| in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/smoothing.png :align: center @@ -55,15 +51,14 @@ locations of element corners (nodes). :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/smoothing2.png :align: center .. centered:: - "The smoothed mesh" + The smoothed mesh: mesh quality improved -**See Also** a sample TUI Script of a -:ref:`tui_smoothing` operation. +**See Also** a sample TUI Script of a :ref:`tui_smoothing` operation. diff --git a/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst b/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst index 94b79f3ac..8b27124c1 100644 --- a/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst +++ b/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst @@ -18,19 +18,16 @@ So that :align: center .. centered:: - "Mesh before and after splitting" + Mesh before and after splitting -**To split bi-quadratic elements into linear:** +*To split bi-quadratic elements into linear:* -#. From the **Modification** menu choose the **Split bi-quadratic into linear** item or click **"Split bi-quadratic into linear"** button in the toolbar. +.. |img| image:: ../images/split_biquad_to_linear_icon.png - .. image:: ../images/split_biquad_to_linear_icon.png - :align: center +#. From the **Modification** menu choose the **Split bi-quadratic into linear** item or click *"Split bi-quadratic into linear"* button |img| in the toolbar. - .. centered:: - **"Split bi-quadratic into linear" button** - The following dialog box shall appear: + The following dialog box shall appear: .. image:: ../images/split_biquad_to_linear_dlg.png :align: center diff --git a/doc/salome/gui/SMESH/input/split_to_tetra.rst b/doc/salome/gui/SMESH/input/split_to_tetra.rst index 692e3af3e..775ade4bd 100644 --- a/doc/salome/gui/SMESH/input/split_to_tetra.rst +++ b/doc/salome/gui/SMESH/input/split_to_tetra.rst @@ -7,34 +7,31 @@ Splitting volumes This operation allows to split either any volumic elements into tetrahedra or hexahedra into prisms. 2D mesh is modified accordingly. -**To split volumes:** +*To split volumes:* -#. Select a mesh, a sub-mesh or a group. -#. In the **Modification** menu select the **Split Volumes** item or click **"Split Volumes"** button in the toolbar. - - .. image:: ../images/split_into_tetra_icon.png - :align: center +.. |img| image:: ../images/split_into_tetra_icon.png - .. centered:: - **"Split Volumes" button** +#. Select a mesh, a sub-mesh or a group. +#. In the **Modification** menu select the **Split Volumes** item or click *"Split Volumes"* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/split_into_tetra.png :align: center - First it is possible to select the type of operation: + * First it is possible to select the type of operation: * If **Tetrahedron** button is checked, the operation will split volumes of any type into tetrahedra. * If **Prism** button is checked, the operation will split hexahedra into prisms. - * The main list contains the list of volumes to split. You can click on a volume in the 3D viewer and it will be highlighted (lock Shiftkeyboard button to select several volumes). Click **Add** button and the ID of this volume will be added to the list. To remove the selected element or elements from the list click **Remove** button. **Sort list** button allows to sort the list of IDs. **Filter** button allows applying a filter to the selection of volumes. - **Note:** If you split not all adjacent non-tetrahedral volumes, your mesh becomes non-conform. + + * The main list contains the list of volumes to split. You can click on a volume in the 3D viewer and it will be highlighted (lock Shiftkeyboard button to select several volumes). Click **Add** button and the ID of this volume will be added to the list. To remove the selected element or elements from the list click **Remove** button. **Sort list** button allows to sort the list of IDs. **Filter** button allows applying a filter to the selection of volumes. + + .. note:: If you split not all adjacent non-tetrahedral volumes, your mesh becomes non-conform. - * **Apply to all** radio button allows splitting all volumes of the currently selected mesh. - * If **Tetrahedron** element type is selected, **Split hexahedron** group allows specifying the number of tetrahedra a hexahedron will be split into. If the chosen method does not allow to get a conform mesh, a generic solution is applied: an additional node is created at the gravity center of a hexahedron, serving an apex of tetrahedra, all quadrangle sides of the hexahedron are split into two triangles each serving a base of a new tetrahedron. - - * If **Prism** element type is selected, the **Split hexahedron** group looks as follows: + * **Apply to all** radio button allows splitting all volumes of the currently selected mesh. + * If **Tetrahedron** element type is selected, **Split hexahedron** group allows specifying the number of tetrahedra a hexahedron will be split into. If the chosen method does not allow to get a conform mesh, a generic solution is applied: an additional node is created at the gravity center of a hexahedron, serving an apex of tetrahedra, all quadrangle sides of the hexahedron are split into two triangles each serving a base of a new tetrahedron. + * If **Prism** element type is selected, the **Split hexahedron** group looks as follows: .. image:: ../images/split_into_prisms.png :align: center @@ -48,9 +45,9 @@ tetrahedra or hexahedra into prisms. 2D mesh is modified accordingly. * If **All domains** option is off, the operation stops when all hehexedra adjacent to the start hexahedron are split into prisms. Else the operation tries to continue splitting starting from another hexahedron closest to the **Hexa location**. - * **Select from** set of fields allows choosing a sub-mesh or an existing group whose elements will be added to the list as you click **Add** button. + * **Select from** set of fields allows choosing a sub-mesh or an existing group whose elements will be added to the list as you click **Add** button. #. Click **Apply** or **Apply and Close** button to confirm the operation. - +**See also** a sample TUI script of :ref:`modifying_meshes_split_vol` operation. diff --git a/doc/salome/gui/SMESH/input/symmetry.rst b/doc/salome/gui/SMESH/input/symmetry.rst index c013100d4..c20875a60 100644 --- a/doc/salome/gui/SMESH/input/symmetry.rst +++ b/doc/salome/gui/SMESH/input/symmetry.rst @@ -6,39 +6,29 @@ Symmetry This geometrical operation allows to perform a symmetrical copy of your mesh or some of its elements. -**To create a symmetrical copy:** +*To create a symmetrical copy:* -#. From the **Modification** menu choose **Transformation** -> **Symmetry** item or click **"Symmetry"** button in the toolbar. +.. |img| image:: ../images/symmetry.png - .. image:: ../images/symmetry.png - :align: center - - .. centered:: - "Symmetry button" +#. From the **Modification** menu choose **Transformation** -> **Symmetry** item or click *"Symmetry"* button |img| in the toolbar. - One of the following dialogs will appear: + The following dialogs will appear, where you can choose a way to mirror: - It is possible to mirror a mesh or some of its elements through: + * through a point: .. image:: ../images/symmetry1.png :align: center - .. centered:: - "a point" + * through an axis: .. image:: ../images/symmetry2.png :align: center - .. centered:: - "an axis" + * through a plane (defined by a point and a normal to the plane): .. image:: ../images/symmetry3.png :align: center - .. centered:: - a plane (defined by a point and a normal to the plane)" - - #. In the dialog: @@ -54,20 +44,20 @@ This geometrical operation allows to perform a symmetrical copy of your mesh or * if the mesh is mirrored through a point, specify the coordinates of the point, either directly or by picking a mesh node; * if the mesh is mirrored through an axis: - * specify the coordinates of the start **Point** of the axis, either directly or by picking a mesh node; - * specify the components of axis **Vector**, either directly or by picking a mesh node, in which case **Vector** is defined as a shift between the **Point** and the node; + * specify the coordinates of the start **Point** of the axis, either directly or by picking a mesh node; + * specify the components of axis **Vector**, either directly or by picking a mesh node, in which case **Vector** is defined as a shift between the **Point** and the node; * if the mesh is mirrored through a plane: - * specify the cooordinates of the **Point** lying on the plane, either directly or by picking a mesh node; - * specify the components of plane **Normal**, either directly or by picking a mesh node, in which case **Normal** is defined as a shift between the **Point** and the node. + * specify the cooordinates of the **Point** lying on the plane, either directly or by picking a mesh node; + * specify the components of plane **Normal**, either directly or by picking a mesh node, in which case **Normal** is defined as a shift between the **Point** and the node. * specify the conditions of symmetry operation: - * activate **Move elements** radio button to change the location of the selected elements within the current mesh; - * activate **Copy elements** radio button to duplicate the selected elements at the new location within the current mesh; - * activate **Create as new mesh** radio button to create a new element in a new mesh; the new mesh appears in the Object Browser with the default name *MeshName_mirrored* (it is possible to change this name in the adjacent box); - * activate **Copy groups** check-box to put new mesh entities into new groups if source entities belong to some groups. New groups are named by pattern "_mirrored". + * activate **Move elements** radio button to change the location of the selected elements within the current mesh; + * activate **Copy elements** radio button to duplicate the selected elements at the new location within the current mesh; + * activate **Create as new mesh** radio button to create a new element in a new mesh; the new mesh appears in the Object Browser with the default name *MeshName_mirrored* (it is possible to change this name in the adjacent box); + * activate **Copy groups** check-box to put new mesh entities into new groups if source entities belong to some groups. New groups are named by pattern "_mirrored". * activate **Preview** check-box to show the result of transformation in the viewer; * click **Apply** or **Apply and Close** button to confirm the operation. diff --git a/doc/salome/gui/SMESH/input/taper.rst b/doc/salome/gui/SMESH/input/taper.rst index 768fda0bc..db6d75fa7 100644 --- a/doc/salome/gui/SMESH/input/taper.rst +++ b/doc/salome/gui/SMESH/input/taper.rst @@ -12,24 +12,18 @@ of two triangles separated by a diagonal within a quadrilateral face. **JA = 0.25 * (A1 + A2 + A3 + A4)** **TAPER = MAX(|A1/JA - 1|, |A2/JA - 1|, |A3/JA - 1|, |A4/JA - 1|)** -**To apply the Taper quality criterion to your mesh:** +*To apply the Taper quality criterion to your mesh:* +.. |img| image:: ../images/image36.png #. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Taper** or click *"Taper"* button |img| in the toolbar. -#. Choose **Controls > Face Controls > Taper** or click **"Taper"** button in the toolbar. - .. image:: ../images/image36.png - :align: center - - .. centered:: - **"Taper" button** - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image90.jpg :align: center -**See Also** a sample TUI Script of a -:ref:`tui_taper` operation. +**See Also** a sample TUI Script of a :ref:`tui_taper` filter. diff --git a/doc/salome/gui/SMESH/input/tools.rst b/doc/salome/gui/SMESH/input/tools.rst index 04736cbff..aa99d0deb 100644 --- a/doc/salome/gui/SMESH/input/tools.rst +++ b/doc/salome/gui/SMESH/input/tools.rst @@ -13,6 +13,6 @@ The following plugins are accessible via **Mesh > SMESH pligins** menu: * `MacMesh plugin `_ * `blocFissure plugin `_ * **MeshCut plugin** - allows to cut a mesh constituted of linear tetrahedrons by a plane. -* **Get min or max value of control** - a sample plugin whose sources are located in **${GUI_ROOT_DIR}/share/salome/plugins/gui/demo** directory (files **minmax_plugin.py, minmax_ui.py and smesh_plugins.py**). You can find a detailed description of how to create your own plugin in documentation: **Help > User's Guide > GUI module > How-To's and Best Practices > Extend SALOME gui functions using python plugins**. +* **Get min or max value of control** - a sample plugin whose sources are located in *${GUI_ROOT_DIR}/share/salome/plugins/gui/demo* directory (files *minmax_plugin.py, minmax_ui.py and smesh_plugins.py*). You can find a detailed description of how to create your own plugin in documentation: **Help > User's Guide > GUI module > How-To's and Best Practices > Extend SALOME gui functions using python plugins**. diff --git a/doc/salome/gui/SMESH/input/translation.rst b/doc/salome/gui/SMESH/input/translation.rst index 8d1c47a67..ab9a96643 100644 --- a/doc/salome/gui/SMESH/input/translation.rst +++ b/doc/salome/gui/SMESH/input/translation.rst @@ -4,62 +4,48 @@ Translation *********** -This geometrical operation allows to translate in space your mesh -or some of its elements. +This geometrical operation allows to translate in space your mesh or some of its elements. -**To translate a mesh:** +*To translate a mesh:* +.. |img| image:: ../images/translation.png -#. From the **Modification** menu choose **Transformation** -> **Translation** item or click **"Translation"** button in the toolbar. +#. From the **Modification** menu choose **Transformation** -> **Translation** item or click *"Translation"* button |img| in the toolbar. + The following dialog will appear, where you can select a way to define the vector of thanslation: - .. image:: ../images/translation.png - :align: center - .. centered:: - "Translation button" - - One of the following dialogs will appear: - - It is possible to define the vector of thanslation: + * by two points: .. image:: ../images/translation1.png :align: center - .. centered:: - "by two points" - -| + * by the vector from the origin of coordinates: .. image:: ../images/translation2.png :align: center - .. centered:: - "by the vector from the origin of coordinates" - - - #. In the dialog: - * specify the IDs of the translated elements: + * specify the IDs of the translated elements: - * **Select the whole mesh, submesh or group** activating this checkbox; or - * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or - * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or - * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. + * **Select the whole mesh, submesh or group** activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. - * specify the vector of translation: + * specify the vector of translation: - * specify the cooordinates of the start and end **Points** of the vector of translation; or - * specify the end point of the **Vector** of rotation starting at the origin of coordinates. + * specify the cooordinates of the start and end **Points** of the vector of translation; or + * specify the end point of the **Vector** of rotation starting at the origin of coordinates. - * specify the conditions of translation: + * specify the conditions of translation: - * activate **Move elements** radio button to create the source mesh (or elements) at the new location and erase it from the previous location; - * activate **Copy elements** radio button to create the source mesh (or elements) at the new location, but leave it at the previous location, the source mesh will be considered one and single mesh with the result of the rotation; - * activate **Create as new mesh** radio button to leave the source mesh (or elements) at its previous location and create a new mesh at the new location, the new mesh appears in the Object Browser with the default name MeshName_rotated (it is possible to change this name in the adjacent box); - * activate **Copy groups** checkbox to copy the groups of elements of the source mesh to the newly created mesh. + * activate **Move elements** radio button to create the source mesh (or elements) at the new location and erase it from the previous location; + * activate **Copy elements** radio button to create the source mesh (or elements) at the new location, but leave it at the previous location, the source mesh will be considered one and single mesh with the result of the rotation; + * activate **Create as new mesh** radio button to leave the source mesh (or elements) at its previous location and create a new mesh at the new location, the new mesh appears in the Object Browser with the default name MeshName_rotated (it is possible to change this name in the adjacent box); + * activate **Copy groups** checkbox to copy the groups of elements of the source mesh to the newly created mesh. - * activate **Preview** checkbox to show the result of transformation in the viewer - * click **Apply** or **Apply and Close** button to confirm the operation. + * activate **Preview** checkbox to show the result of transformation in the viewer + * click **Apply** or **Apply and Close** button to confirm the operation. **See Also** a sample TUI Script of a :ref:`tui_translation` operation. diff --git a/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst b/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst index ea77136ab..2dd01be13 100644 --- a/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst +++ b/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst @@ -1,19 +1,13 @@ .. _tui_cartesian_algo: -Body Fitting algorithm -###################### - - Usage of Body Fitting algorithm - -.. _cartesian_alogo.py: - -``cartesian_algo.py`` +Usage of Body Fitting algorithm +############################### .. literalinclude:: ../../../examples/cartesian_algo.py :linenos: :language: python -:download:`../../../examples/cartesian_algo.py` +:download:`Download this script <../../../examples/cartesian_algo.py>` diff --git a/doc/salome/gui/SMESH/input/tui_creating_meshes.rst b/doc/salome/gui/SMESH/input/tui_creating_meshes.rst index 314858dbd..46b4f9ff4 100644 --- a/doc/salome/gui/SMESH/input/tui_creating_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_creating_meshes.rst @@ -15,110 +15,80 @@ First of all see :ref:`example_3d_mesh` which is an example of good python scrip Construction of a mesh ====================== - -.. _creating_meshes_ex01.py: - -``creating_meshes_ex01.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex01.py` +:download:`Download this script <../../../examples/creating_meshes_ex01.py>` .. _tui_construction_submesh: Construction of a sub-mesh ========================== -.. _creating_meshes_ex02.py: - -``creating_meshes_ex02.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex02.py` +:download:`Download this script <../../../examples/creating_meshes_ex02.py>` .. _change_priority_of_submeshes_in_mesh: Change priority of sub-meshes in mesh ===================================== -.. _creating_meshes_ex03.py: - -``creating_meshes_ex03.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex03.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex03.py` +:download:`Download this script <../../../examples/creating_meshes_ex03.py>` .. _tui_editing_while_meshing: Intermediate edition while meshing ================================== -.. _a3DmeshOnModified2Dmesh.py: - -``a3DmeshOnModified2Dmesh.py`` - .. literalinclude:: ../../../examples/a3DmeshOnModified2Dmesh.py :linenos: :language: python -:download:`../../../examples/a3DmeshOnModified2Dmesh.py` +:download:`Download this script <../../../examples/a3DmeshOnModified2Dmesh.py>` .. _tui_editing_mesh: Editing a mesh (i.e. changing hypotheses) ========================================= -.. _creating_meshes_ex04.py: - -``creating_meshes_ex04.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex04.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex04.py` +:download:`Download this script <../../../examples/creating_meshes_ex04.py>` .. _tui_export_mesh: Export of a Mesh ================ -.. _creating_meshes_ex05.py: - -``creating_meshes_ex05.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex05.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex05.py` +:download:`Download this script <../../../examples/creating_meshes_ex05.py>` .. _how_to_mesh_a_cylinder_with_hexahedrons: How to mesh a cylinder with hexahedrons? ======================================== -Here you can see an example of python script, creating a hexahedral -mesh on a cylinder. A picture below the source code of the script +The next script creates a hexahedral mesh on a cylinder. A picture below the script demonstrates the resulting mesh. -.. _creating_meshes_ex06.py: - -``creating_meshes_ex06.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex06.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex06.py` +:download:`Download this script <../../../examples/creating_meshes_ex06.py>` .. image:: ../images/mesh_cylinder_hexa.png :align: center @@ -129,28 +99,20 @@ demonstrates the resulting mesh. Building a compound of meshes ============================= -.. _creating_meshes_ex07.py: - -``creating_meshes_ex07.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex07.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex07.py` +:download:`Download this script <../../../examples/creating_meshes_ex07.py>` .. _tui_copy_mesh: Mesh Copying ============ -.. _creating_meshes_ex08.py: - -``creating_meshes_ex08.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex08.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex08.py` +:download:`Download this script <../../../examples/creating_meshes_ex08.py>` diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst index 329701dfa..0642126ba 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst @@ -4,18 +4,19 @@ Defining Hypotheses and Algorithms ********************************** -This page provides example codes of :ref:`tui_defining_meshing_algos` -"defining algorithms" and hypotheses. +This page provides example codes of :ref:`defining algorithms ` +and hypotheses. * Wire discretisation 1D algorithm * :ref:`tui_1d_adaptive` hypothesis - * :ref:`tui_1d_arithmetic` hypothesis - * :ref:`tui_deflection_1d` hypotheses - * :ref:`tui_start_and_end_length` hypotheses - * :ref:`tui_average_length` - * :ref:`tui_propagation` additional hypothesis - * :ref:`tui_fixed_points` hypothesis + * :ref:`rithmetic Progression ` hypothesis + * :ref:`Geometric Progression ` hypothesis + * :ref:`Deflection and Number of Segments ` hypotheses + * :ref:`Start and End Length ` hypothesis + * :ref:`tui_average_length` hypothesis + * :ref:`tui_propagation` additional hypotheses + * :ref:`Fixed Points 1D ` hypothesis * Triangle: Mefisto 2D algorithm @@ -27,54 +28,43 @@ This page provides example codes of :ref:`tui_defining_meshing_algos` * NETGEN 3D algorithm * :ref:`tui_max_element_volume` hypothesis - * :ref:`tui_viscous_layers` - + * :ref:`Viscous layers ` hypotheses * :ref:`tui_projection` -* :ref:`tui_radial_quadrangle` algorithm +* :ref:`Radial Quadrangle 1D-2D ` algorithm * Quadrangle: Mapping 2D algorithm - * :ref:`tui_quadrangle_parameters` hypothesis - + * :ref:`Quadrangle Parameters ` hypothesis -* :ref:`tui_import` from Another Mesh" algorithm +* :ref:`tui_radial_prism` +* :ref:`Import 1D-2D Elements from Another Mesh ` algorithm Defining 1D Hypotheses ###################### - - .. _tui_1d_arithmetic: Arithmetic Progression and Geometric Progression ================================================ -.. _defining_hypotheses_ex01.py: - -``defining_hypotheses_ex01.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex01.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex01.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex01.py>` .. _tui_1d_adaptive: Adaptive ======== -.. _defining_hypotheses_adaptive1d.py: - -``defining_hypotheses_adaptive1d.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_adaptive1d.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_adaptive1d.py` +:download:`Download this script <../../../examples/defining_hypotheses_adaptive1d.py>` .. _tui_deflection_1d: @@ -82,15 +72,11 @@ Adaptive Deflection and Number of Segments ================================= -.. _defining_hypotheses_ex02.py: - -``defining_hypotheses_ex02.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex02.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex02.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex02.py>` .. _tui_start_and_end_length: @@ -98,15 +84,11 @@ Deflection and Number of Segments Start and End Length ==================== -.. _creating_meshes_ex08.py: - -``defining_hypotheses_ex03.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex03.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex03.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex03.py>` .. _tui_average_length: @@ -114,15 +96,11 @@ Start and End Length Local Length ============ -.. _defining_hypotheses_ex04.py: - -``defining_hypotheses_ex04.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex04.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex04.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex04.py>` Defining 2D and 3D hypotheses ############################# @@ -133,15 +111,11 @@ Defining 2D and 3D hypotheses Maximum Element Area ==================== -.. _defining_hypotheses_ex05.py: - -``defining_hypotheses_ex05.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex05.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex05.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex05.py>` .. _tui_max_element_volume: @@ -149,15 +123,11 @@ Maximum Element Area Maximum Element Volume ====================== -.. _defining_hypotheses_ex06.py: - -``defining_hypotheses_ex06.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex06.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex06.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex06.py>` .. _tui_length_from_edges: @@ -165,15 +135,11 @@ Maximum Element Volume Length from Edges ================= -.. _defining_hypotheses_ex07.py: - -``defining_hypotheses_ex07.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex07.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex07.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex07.py>` Defining Additional Hypotheses ############################## @@ -183,15 +149,11 @@ Defining Additional Hypotheses Propagation =========== -.. _defining_hypotheses_ex08.py: - -``defining_hypotheses_ex08.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex08.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex08.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex08.py>` .. _tui_defining_meshing_algos: @@ -199,15 +161,11 @@ Propagation Defining Meshing Algorithms ########################### -.. _defining_hypotheses_ex09.py: - -``defining_hypotheses_ex09.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex09.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex09.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex09.py>` .. _tui_projection: @@ -215,115 +173,92 @@ Defining Meshing Algorithms Projection Algorithms ===================== -.. _defining_hypotheses_ex10.py: - -``defining_hypotheses_ex10.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex10.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex10.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex10.py>` Projection 1D2D =============== -.. _defining_hypotheses_ex11.py: - -``defining_hypotheses_ex11.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex11.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex11.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex11.py>` .. _tui_fixed_points: 1D Mesh with Fixed Points example ################################# -.. _defining_hypotheses_ex12.py: - -``defining_hypotheses_ex12.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex12.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex12.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex12.py>` .. _tui_radial_quadrangle: Radial Quadrangle 1D-2D example ############################### -.. _defining_hypotheses_ex13.py: - -``defining_hypotheses_ex13.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex13.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex13.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex13.py>` .. _tui_quadrangle_parameters: Quadrangle Parameters example 1 (meshing a face with 3 edges) ############################################################## -.. _defining_hypotheses_ex14.py: - -``defining_hypotheses_ex14.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex14.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex14.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex14.py>` Quadrangle Parameters example 2 (using different types) ####################################################### -.. _defining_hypotheses_ex15.py: - -``defining_hypotheses_ex15.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex15.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex15.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex15.py>` .. _tui_import: "Import 1D-2D Elements from Another Mesh" example ################################################# -.. _defining_hypotheses_ex16.py: - -``defining_hypotheses_ex16.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex16.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex16.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex16.py>` .. _tui_viscous_layers: Viscous layers construction ########################### -.. _defining_hypotheses_ex17.py: - -``defining_hypotheses_ex17.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex17.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex17.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex17.py>` + +.. _tui_radial_prism: + +Radial Prism example +#################### +.. literalinclude:: ../../../examples/radial_prism_3d_algo.py + :linenos: + :language: python +:download:`Download this script <../../../examples/radial_prism_3d_algo.py>` diff --git a/doc/salome/gui/SMESH/input/tui_filters.rst b/doc/salome/gui/SMESH/input/tui_filters.rst index 67cdb3ebe..ac88a3450 100644 --- a/doc/salome/gui/SMESH/input/tui_filters.rst +++ b/doc/salome/gui/SMESH/input/tui_filters.rst @@ -4,9 +4,6 @@ Filters usage ************* -.. contents:: `Table of contents` - - Filters allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create or edit mesh groups, remove elements from the mesh, control @@ -25,6 +22,9 @@ Python scripts. **See also:** :ref:`tui_quality_controls_page` +.. contents:: `Table of contents` + + .. _filter_aspect_ratio: Aspect ratio @@ -36,15 +36,11 @@ filters 2D mesh elements (faces) according to the aspect ratio value: * functor type should be *SMESH.FT_AspectRatio* * threshold is floating point value (aspect ratio) -.. _filters_ex01.py: - -``filters_ex01.py`` - .. literalinclude:: ../../../examples/filters_ex01.py :linenos: :language: python -:download:`../../../examples/filters_ex01.py` +:download:`Download this script <../../../examples/filters_ex01.py>` **See also:** :ref:`tui_aspect_ratio` @@ -59,15 +55,11 @@ filters 3D mesh elements (volumes) according to the aspect ratio value: * functor type is *SMESH.FT_AspectRatio3D* * threshold is floating point value (aspect ratio) -.. _filters_ex02.py: - -``filters_ex02.py`` - .. literalinclude:: ../../../examples/filters_ex02.py :linenos: :language: python -:download:`../../../examples/filters_ex02.py` +:download:`Download this script <../../../examples/filters_ex02.py>` **See also:** :ref:`tui_aspect_ratio_3d` @@ -82,15 +74,11 @@ filters 2D mesh elements (faces) according to the warping angle value: * functor type is *SMESH.FT_Warping* * threshold is floating point value (warping angle) -.. _filters_ex03.py: - -``filters_ex03.py`` - .. literalinclude:: ../../../examples/filters_ex03.py :linenos: :language: python -:download:`../../../examples/filters_ex03.py` +:download:`Download this script <../../../examples/filters_ex03.py>` **See also:** :ref:`tui_warping` @@ -105,15 +93,11 @@ filters 2D mesh elements (faces) according to the minimum angle value: * functor type is *SMESH.FT_MinimumAngle* * threshold is floating point value (minimum angle) -.. _filters_ex04.py: - -``filters_ex04.py`` - .. literalinclude:: ../../../examples/filters_ex04.py :linenos: :language: python -:download:`../../../examples/filters_ex04.py` +:download:`Download this script <../../../examples/filters_ex04.py>` **See also:** :ref:`tui_minimum_angle` @@ -128,15 +112,11 @@ filters 2D mesh elements (faces) according to the taper value: * functor type is *SMESH.FT_Taper* * threshold is floating point value (taper) -.. _filters_ex05.py: - -``filters_ex05.py`` - .. literalinclude:: ../../../examples/filters_ex05.py :linenos: :language: python -:download:`../../../examples/filters_ex05.py` +:download:`Download this script <../../../examples/filters_ex05.py>` **See also:** :ref:`tui_taper` @@ -151,15 +131,11 @@ filters 2D mesh elements (faces) according to the skew value: * functor type is *SMESH.FT_Skew* * threshold is floating point value (skew) -.. _filters_ex06.py: - -``filters_ex06.py`` - .. literalinclude:: ../../../examples/filters_ex06.py :linenos: :language: python -:download:`../../../examples/filters_ex06.py` +:download:`Download this script <../../../examples/filters_ex06.py>` **See also:** :ref:`tui_skew` @@ -174,15 +150,11 @@ filters 2D mesh elements (faces) according to the area value: * functor type is *SMESH.FT_Area* * threshold is floating point value (area) -.. _filters_ex07.py: - -``filters_ex07.py`` - .. literalinclude:: ../../../examples/filters_ex07.py :linenos: :language: python -:download:`../../../examples/filters_ex07.py` +:download:`Download this script <../../../examples/filters_ex07.py>` **See also:** :ref:`tui_area` @@ -197,15 +169,11 @@ filters 3D mesh elements (volumes) according to the volume value: * functor type is *SMESH.FT_Volume3D* * threshold is floating point value (volume) -.. _filters_ex08.py: - -``filters_ex08.py`` - .. literalinclude:: ../../../examples/filters_ex08.py :linenos: :language: python -:download:`../../../examples/filters_ex08.py` +:download:`Download this script <../../../examples/filters_ex08.py>` **See also:** :ref:`tui_volume` @@ -220,16 +188,11 @@ filters 1D mesh elements (edges) which represent free borders of a mesh: * functor type is *SMESH.FT_FreeBorders* * threshold value is not required -\tui_script{filters_ex09.py} -.. _filters_ex09.py: - -``filters_ex09.py`` - .. literalinclude:: ../../../examples/filters_ex09.py :linenos: :language: python -:download:`../../../examples/filters_ex09.py` +:download:`Download this script <../../../examples/filters_ex09.py>` **See also:** :ref:`tui_free_borders` @@ -245,15 +208,11 @@ nodes, not mesh segments) belonging to one face of mesh only: * functor type is *SMESH.FT_FreeEdges* * threshold value is not required -.. _filters_ex10.py: - -``filters_ex10.py`` - .. literalinclude:: ../../../examples/filters_ex10.py :linenos: :language: python -:download:`../../../examples/filters_ex10.py` +:download:`Download this script <../../../examples/filters_ex10.py>` **See also:** :ref:`tui_free_edges` @@ -268,15 +227,11 @@ filters free nodes: * functor type is *SMESH.FT_FreeNodes* * threshold value is not required -.. _filters_ex11.py: - -``filters_ex11.py`` - .. literalinclude:: ../../../examples/filters_ex11.py :linenos: :language: python -:download:`../../../examples/filters_ex11.py` +:download:`Download this script <../../../examples/filters_ex11.py>` **See also:** :ref:`tui_free_nodes` @@ -291,15 +246,11 @@ filters free faces: * functor type is *SMESH.FT_FreeFaces* * threshold value is not required -.. _filters_ex12.py: - -``filters_ex12.py`` - .. literalinclude:: ../../../examples/filters_ex12.py :linenos: :language: python -:download:`../../../examples/filters_ex12.py` +:download:`Download this script <../../../examples/filters_ex12.py>` **See also:** :ref:`tui_free_faces` @@ -314,15 +265,11 @@ filters faces with bare borders: * functor type is *SMESH.FT_BareBorderFace* * threshold value is not required -.. _filters_ex13.py: - -``filters_ex13.py`` - .. literalinclude:: ../../../examples/filters_ex13.py :linenos: :language: python -:download:`../../../examples/filters_ex13.py` +:download:`Download this script <../../../examples/filters_ex13.py>` **See also:** :ref:`tui_bare_border_faces` @@ -338,15 +285,11 @@ filters coplanar faces: * threshold value is the face ID * tolerance is in degrees -.. _filters_ex14.py: - -``filters_ex14.py`` - .. literalinclude:: ../../../examples/filters_ex14.py :linenos: :language: python -:download:`../../../examples/filters_ex14.py` +:download:`Download this script <../../../examples/filters_ex14.py>` .. _filter_over_constrained_faces: @@ -359,15 +302,11 @@ filters over-constrained faces: * functor type is *SMESH.FT_OverConstrainedFace* * threshold value is not required -.. _filters_ex15.py: - -``filters_ex15.py`` - .. literalinclude:: ../../../examples/filters_ex15.py :linenos: :language: python -:download:`../../../examples/filters_ex15.py` +:download:`Download this script <../../../examples/filters_ex15.py>` **See also:** :ref:`tui_over_constrained_faces` @@ -382,15 +321,11 @@ filters mesh elements basing on the same set of nodes: * functor type is either *SMESH.FT_EqualEdges*, *SMESH.FT_EqualFaces* or *SMESH.FT_EqualVolumes*, * threshold value is not required -.. _filters_ex16.py: - -``filters_ex16.py`` - .. literalinclude:: ../../../examples/filters_ex16.py :linenos: :language: python -:download:`../../../examples/filters_ex16.py` +:download:`Download this script <../../../examples/filters_ex16.py>` .. _tui_double_nodes_control: @@ -404,15 +339,11 @@ filters mesh nodes which are coincident with other nodes (within a given toleran * threshold value is not required * default tolerance is 1.0e-7 -.. _filters_ex17.py: - -``filters_ex17.py`` - .. literalinclude:: ../../../examples/filters_ex17.py :linenos: :language: python -:download:`../../../examples/filters_ex17.py` +:download:`Download this script <../../../examples/filters_ex17.py>` .. _filter_node_nb_conn: @@ -425,15 +356,11 @@ filters nodes according to a number of elements of highest dimension connected t * functor type should be *SMESH.FT_NodeConnectivityNumber* * threshold is an integer value (number of elements) -.. _filters_node_nb_conn.py: - -``filters_node_nb_conn.py`` - .. literalinclude:: ../../../examples/filters_node_nb_conn.py :linenos: :language: python -:download:`../../../examples/filters_node_nb_conn.py` +:download:`Download this script <../../../examples/filters_node_nb_conn.py>` .. _filter_borders_multiconnection: @@ -447,15 +374,11 @@ connections (faces and volumes on whose border the segment lies): * functor type is *SMESH.FT_MultiConnection* * threshold is integer value (number of connections) -.. _filters_ex18.py: - -``filters_ex18.py`` - .. literalinclude:: ../../../examples/filters_ex18.py :linenos: :language: python -:download:`../../../examples/filters_ex18.py` +:download:`Download this script <../../../examples/filters_ex18.py>` **See also:** :ref:`tui_borders_at_multiconnection` @@ -471,15 +394,11 @@ faces connected to a border (link between nodes, not mesh segment): * functor type is *SMESH.FT_MultiConnection2D* * threshold is integer value (number of connections) -.. _filters_ex19.py: - -``filters_ex19.py`` - .. literalinclude:: ../../../examples/filters_ex19.py :linenos: :language: python -:download:`../../../examples/filters_ex19.py` +:download:`Download this script <../../../examples/filters_ex19.py>` **See also:** :ref:`tui_borders_at_multiconnection_2d` @@ -494,15 +413,11 @@ filters 1D mesh elements (edges) according to the edge length value: * functor type should be *SMESH.FT_Length* * threshold is floating point value (length) -.. _filters_ex20.py: - -``filters_ex20.py`` - .. literalinclude:: ../../../examples/filters_ex20.py :linenos: :language: python -:download:`../../../examples/filters_ex20.py` +:download:`Download this script <../../../examples/filters_ex20.py>` **See also:** :ref:`tui_length_1d` @@ -518,15 +433,11 @@ edges (links between nodes): * functor type should be *SMESH.FT_Length2D* * threshold is floating point value (edge length) -.. _filters_ex21.py: - -``filters_ex21.py`` - .. literalinclude:: ../../../examples/filters_ex21.py :linenos: :language: python -:download:`../../../examples/filters_ex21.py` +:download:`Download this script <../../../examples/filters_ex21.py>` **See also:** :ref:`tui_length_2d` @@ -542,15 +453,11 @@ of its edges and diagonals: * functor type should be *SMESH.FT_MaxElementLength2D* * threshold is floating point value (length) -.. _filters_ex22.py: - -``filters_ex22.py`` - .. literalinclude:: ../../../examples/filters_ex22.py :linenos: :language: python -:download:`../../../examples/filters_ex22.py` +:download:`Download this script <../../../examples/filters_ex22.py>` **See also:** :ref:`tui_max_element_length_2d` @@ -566,15 +473,11 @@ of its edges and diagonals: * functor type should be *SMESH.FT_MaxElementLength3D* * threshold is floating point value (edge/diagonal length) -.. _filters_ex23.py: - -``filters_ex23.py`` - .. literalinclude:: ../../../examples/filters_ex23.py :linenos: :language: python -:download:`../../../examples/filters_ex23.py` +:download:`Download this script <../../../examples/filters_ex23.py>` **See also:** :ref:`tui_max_element_length_3d` @@ -590,15 +493,11 @@ shared with other volumes and without a face on it: * functor type is *SMESH.FT_BareBorderVolume* * threshold value is not required -.. _filters_ex24.py: - -``filters_ex24.py`` - .. literalinclude:: ../../../examples/filters_ex24.py :linenos: :language: python -:download:`../../../examples/filters_ex24.py` +:download:`Download this script <../../../examples/filters_ex24.py>` **See also:** :ref:`tui_bare_border_volumes` @@ -613,15 +512,11 @@ filters over-constrained volumes, whose all nodes are on the mesh boundary: * functor type is *SMESH.FT_OverConstrainedVolume* * threshold value is not required -.. _filters_ex25.py: - -``filters_ex25.py`` - .. literalinclude:: ../../../examples/filters_ex25.py :linenos: :language: python -:download:`../../../examples/filters_ex25.py` +:download:`Download this script <../../../examples/filters_ex25.py>` **See also:** :ref:`tui_over_constrained_faces` @@ -637,15 +532,11 @@ defined by threshold value: * functor type should be *SMESH.FT_BelongToMeshGroup* * threshold is mesh group object -.. _filters_belong2group.py: - -``filters_belong2group.py`` - .. literalinclude:: ../../../examples/filters_belong2group.py :linenos: :language: python -:download:`../../../examples/filters_belong2group.py` +:download:`Download this script <../../../examples/filters_belong2group.py>` .. _filter_belong_to_geom: @@ -660,15 +551,11 @@ shape defined by threshold value: * threshold is geometrical object * tolerance is a distance between a node and the geometrical object; it is used if an node is not associated to any geometry. -.. _filters_ex26.py: - -``filters_ex26.py`` - .. literalinclude:: ../../../examples/filters_ex26.py :linenos: :language: python -:download:`../../../examples/filters_ex26.py` +:download:`Download this script <../../../examples/filters_ex26.py>` .. _filter_lying_on_geom: @@ -685,15 +572,11 @@ shape defined by threshold value: it is used if an node is not associated to any geometry. -.. _filters_ex27.py: - -``filters_ex27.py`` - .. literalinclude:: ../../../examples/filters_ex27.py :linenos: :language: python -:download:`../../../examples/filters_ex27.py` +:download:`Download this script <../../../examples/filters_ex27.py>` .. _filter_belong_to_plane: @@ -708,15 +591,11 @@ plane defined by threshold value with the given tolerance: * threshold is geometrical object (plane) * default tolerance is 1.0e-7 -.. _filters_ex28.py: - -``filters_ex28.py`` - .. literalinclude:: ../../../examples/filters_ex28.py :linenos: :language: python -:download:`../../../examples/filters_ex28.py` +:download:`Download this script <../../../examples/filters_ex28.py>` .. _filter_belong_to_cylinder: @@ -731,15 +610,11 @@ cylindrical face defined by threshold value with the given tolerance: * threshold is geometrical object (cylindrical face) * default tolerance is 1.0e-7 -.. _filters_ex29.py: - -``filters_ex29.py`` - .. literalinclude:: ../../../examples/filters_ex29.py :linenos: :language: python -:download:`../../../examples/filters_ex29.py` +:download:`Download this script <../../../examples/filters_ex29.py>` .. _filter_belong_to_surface: @@ -754,15 +629,11 @@ arbitrary surface defined by threshold value with the given tolerance: * threshold is geometrical object (arbitrary surface) * default tolerance is 1.0e-7 -.. _filters_ex30.py: - -``filters_ex30.py`` - .. literalinclude:: ../../../examples/filters_ex30.py :linenos: :language: python -:download:`../../../examples/filters_ex30.py` +:download:`Download this script <../../../examples/filters_ex30.py>` .. _filter_range_of_ids: @@ -774,17 +645,13 @@ specified identifiers range: * element type can be any, from *SMESH.NODE* to *SMESH.BALL* * functor type is *SMESH.FT_RangeOfIds* -* threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78" - -.. _filters_ex31.py: - -``filters_ex31.py`` +* threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78" .. literalinclude:: ../../../examples/filters_ex31.py :linenos: :language: python -:download:`../../../examples/filters_ex31.py` +:download:`Download this script <../../../examples/filters_ex31.py>` .. _filter_bad_oriented_volume: @@ -798,15 +665,11 @@ the point of view of MED convention. * functor type is *SMESH.FT_BadOrientedVolume* * threshold is not required -.. _filters_ex32.py: - -``filters_ex32.py`` - .. literalinclude:: ../../../examples/filters_ex32.py :linenos: :language: python -:download:`../../../examples/filters_ex32.py` +:download:`Download this script <../../../examples/filters_ex32.py>` .. _filter_linear_or_quadratic: @@ -820,15 +683,11 @@ filters linear / quadratic mesh elements: * threshold is not required * if unary operator is set to SMESH.FT_LogicalNOT, the quadratic elements are selected, otherwise (by default) linear elements are selected -.. _filters_ex33.py: - -``filters_ex33.py`` - .. literalinclude:: ../../../examples/filters_ex33.py :linenos: :language: python -:download:`../../../examples/filters_ex33.py` +:download:`Download this script <../../../examples/filters_ex33.py>` .. _filter_group_color: @@ -841,15 +700,11 @@ filters mesh entities, belonging to the group with the color defined by the thre * functor type is *SMESH.FT_GroupColor* * threshold should be of SALOMEDS.Color type -.. _filters_ex34.py: - -``filters_ex34.py`` - .. literalinclude:: ../../../examples/filters_ex34.py :linenos: :language: python -:download:`../../../examples/filters_ex34.py` +:download:`Download this script <../../../examples/filters_ex34.py>` .. _filter_geom_type: @@ -864,15 +719,11 @@ entity type. * functor type should be *SMESH.FT_ElemGeomType* * threshold is either of smesh.GeometryType values. Type *SMESH.GeometryType._items* in the Python Console to see all geometric types. -.. _filters_ex35.py: - -``filters_ex35.py`` - .. literalinclude:: ../../../examples/filters_ex35.py :linenos: :language: python -:download:`../../../examples/filters_ex35.py` +:download:`Download this script <../../../examples/filters_ex35.py>` .. _filter_entity_type: @@ -885,15 +736,11 @@ filters mesh elements by the geometric type and number of nodes. * functor type should be *SMESH.FT_EntityType* * threshold is either of SMESH.EntityType values. Type *SMESH.EntityType._items* in the Python Console to see all entity types. -.. _filters_ex37.py: - -``filters_ex37.py`` - .. literalinclude:: ../../../examples/filters_ex37.py :linenos: :language: python -:download:`../../../examples/filters_ex37.py` +:download:`Download this script <../../../examples/filters_ex37.py>` .. _filter_ball_diam: @@ -906,15 +753,11 @@ filters ball elements by diameter. * functor type should be *SMESH.FT_BallDiameter* * threshold is floating point value (ball diameter) -.. _filters_ex38.py: - -``filters_ex38.py`` - .. literalinclude:: ../../../examples/filters_ex38.py :linenos: :language: python -:download:`../../../examples/filters_ex38.py` +:download:`Download this script <../../../examples/filters_ex38.py>` .. _filter_domain: @@ -927,15 +770,11 @@ filters elements of a specified domain. * functor type should be *SMESH.FT_ConnectedElements* * threshold is either (1) node ID or (2) geometrical vertex or (3) 3 coordinates of a point. -.. _filters_ex39.py: - -``filters_ex39.py`` - .. literalinclude:: ../../../examples/filters_ex39.py :linenos: :language: python -:download:`../../../examples/filters_ex39.py` +:download:`Download this script <../../../examples/filters_ex39.py>` .. _combining_filters: @@ -944,16 +783,8 @@ How to combine several criteria into a filter? Several criteria can be combined into a filter. -Example : - -.. _filters_ex36.py: - -``filters_ex36.py`` - .. literalinclude:: ../../../examples/filters_ex36.py :linenos: :language: python -:download:`../../../examples/filters_ex36.py` - - +:download:`Download this script <../../../examples/filters_ex36.py>` diff --git a/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst b/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst index 36848ceeb..6a6790eac 100644 --- a/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst +++ b/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst @@ -29,15 +29,11 @@ The flat element of the multiple junctions between the simple junction are store This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder). The big cylinder is defined by two geometric volumes. -.. _generate_flat_elements.py: - -``generate_flat_elements.py`` - .. literalinclude:: ../../../examples/generate_flat_elements.py :linenos: :language: python -:download:`../../../examples/generate_flat_elements.py` +:download:`Download this script <../../../examples/generate_flat_elements.py>` Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh. The flat elements on group boundaries and on faces are built with the diff --git a/doc/salome/gui/SMESH/input/tui_grouping_elements.rst b/doc/salome/gui/SMESH/input/tui_grouping_elements.rst index 6700ec42f..1f4dffe2e 100644 --- a/doc/salome/gui/SMESH/input/tui_grouping_elements.rst +++ b/doc/salome/gui/SMESH/input/tui_grouping_elements.rst @@ -12,15 +12,11 @@ Grouping Elements Create a Standalone Group ========================= -.. _grouping_elements_ex01.py: - -``grouping_elements_ex01.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex01.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex01.py` +:download:`Download this script <../../../examples/grouping_elements_ex01.py>` .. image:: ../images/create_group.png :align: center @@ -31,45 +27,33 @@ Create a Standalone Group Create a Group on Geometry ========================== -.. _grouping_elements_ex02.py: - -``grouping_elements_ex02.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex02.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex02.py` +:download:`Download this script <../../../examples/grouping_elements_ex02.py>` .. _tui_create_group_on_filter: Create a Group on Filter ======================== -.. _grouping_elements_ex03.py: - -``grouping_elements_ex03.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex03.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex03.py` +:download:`Download this script <../../../examples/grouping_elements_ex03.py>` .. _tui_edit_group: Edit a Group ============ -.. _grouping_elements_ex04.py: - -``grouping_elements_ex04.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex04.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex04.py` +:download:`Download this script <../../../examples/grouping_elements_ex04.py>` .. image:: ../images/editing_groups1.png :align: center @@ -80,15 +64,11 @@ Edit a Group Union of groups =============== -.. _grouping_elements_ex05.py: - -``grouping_elements_ex05.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex05.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex05.py` +:download:`Download this script <../../../examples/grouping_elements_ex05.py>` .. image:: ../images/union_groups1.png :align: center @@ -99,15 +79,11 @@ Union of groups Intersection of groups ====================== -.. _grouping_elements_ex06.py: - -``grouping_elements_ex06.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex06.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex06.py` +:download:`Download this script <../../../examples/grouping_elements_ex06.py>` .. image:: ../images/intersect_groups1.png :align: center @@ -118,15 +94,11 @@ Intersection of groups Cut of groups ============= -.. _grouping_elements_ex07.py: - -``grouping_elements_ex07.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex07.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex07.py` +:download:`Download this script <../../../examples/grouping_elements_ex07.py>` .. image:: ../images/cut_groups1.png :align: center @@ -137,15 +109,11 @@ Cut of groups Creating groups of entities basing on nodes of other groups =========================================================== -.. _grouping_elements_ex08.py: - -``grouping_elements_ex08.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex08.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex08.py` +:download:`Download this script <../../../examples/grouping_elements_ex08.py>` .. image:: ../images/dimgroup_tui1.png :align: center diff --git a/doc/salome/gui/SMESH/input/tui_measurements.rst b/doc/salome/gui/SMESH/input/tui_measurements.rst index 366c3be0a..06eb255b0 100644 --- a/doc/salome/gui/SMESH/input/tui_measurements.rst +++ b/doc/salome/gui/SMESH/input/tui_measurements.rst @@ -3,48 +3,36 @@ ************ Measurements ************ + .. _tui_min_distance: Minimum Distance ================ -.. _measurements_ex01.py: - -``measurements_ex01.py`` - .. literalinclude:: ../../../examples/measurements_ex01.py :linenos: :language: python -:download:`../../../examples/measurements_ex01.py` +:download:`Download this script <../../../examples/measurements_ex01.py>` .. _tui_bounding_box: Bounding Box ============ -.. _measurements_ex02.py: - -``measurements_ex02.py`` - .. literalinclude:: ../../../examples/measurements_ex02.py :linenos: :language: python -:download:`../../../examples/measurements_ex02.py` +:download:`Download this script <../../../examples/measurements_ex02.py>` .. _tui_basic_properties: Basic Properties ================ -.. _measurements_ex03.py: - -``measurements_ex03.py`` - .. literalinclude:: ../../../examples/measurements_ex03.py :linenos: :language: python -:download:`../../../examples/measurements_ex03.py` - +:download:`Download this script <../../../examples/measurements_ex03.py>` diff --git a/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst b/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst index b14ba8553..25783ad85 100644 --- a/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst @@ -17,150 +17,110 @@ Adding Nodes and Elements Add Node ******** -.. _modifying_meshes_ex01.py: - -``modifying_meshes_ex01.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex01.py` +:download:`Download this script <../../../examples/modifying_meshes_ex01.py>` .. _tui_add_0DElement: Add 0D Element ************** -.. _modifying_meshes_ex02.py: - -``modifying_meshes_ex02.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex02.py` +:download:`Download this script <../../../examples/modifying_meshes_ex02.py>` .. _tui_add_0DElement_on_all_nodes: Add 0D Element on Element Nodes ******************************* -.. _modifying_meshes_ex03.py: - -``modifying_meshes_ex03.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex03.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex03.py` +:download:`Download this script <../../../examples/modifying_meshes_ex03.py>` .. _tui_add_edge: Add Edge ******** -.. _modifying_meshes_ex04.py: - -``modifying_meshes_ex04.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex04.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex04.py` +:download:`Download this script <../../../examples/modifying_meshes_ex04.py>` .. _tui_add_triangle: Add Triangle ************ -.. _modifying_meshes_ex05.py: - -``modifying_meshes_ex05.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex05.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex05.py` +:download:`Download this script <../../../examples/modifying_meshes_ex05.py>` .. _tui_add_quadrangle: Add Quadrangle ************** -.. _modifying_meshes_ex06.py: - -``modifying_meshes_ex06.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex06.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex06.py` +:download:`Download this script <../../../examples/modifying_meshes_ex06.py>` .. _tui_add_tetrahedron: Add Tetrahedron *************** -.. _modifying_meshes_ex07.py: - -``modifying_meshes_ex07.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex07.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex07.py` +:download:`Download this script <../../../examples/modifying_meshes_ex07.py>` .. _tui_add_hexahedron: Add Hexahedron ************** -.. _modifying_meshes_ex08.py: - -``modifying_meshes_ex08.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex08.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex08.py` +:download:`Download this script <../../../examples/modifying_meshes_ex08.py>` .. _tui_add_polygon: Add Polygon *********** -.. _modifying_meshes_ex09.py: - -``modifying_meshes_ex09.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex09.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex09.py` +:download:`Download this script <../../../examples/modifying_meshes_ex09.py>` .. _tui_add_polyhedron: Add Polyhedron ************** -.. _modifying_meshes_ex10.py: - -``modifying_meshes_ex10.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex10.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex10.py` +:download:`Download this script <../../../examples/modifying_meshes_ex10.py>` .. _tui_removing_nodes_and_elements: @@ -172,238 +132,184 @@ Removing Nodes and Elements Removing Nodes ************** -.. _modifying_meshes_ex11.py: - -``modifying_meshes_ex11.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex11.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex11.py` +:download:`Download this script <../../../examples/modifying_meshes_ex11.py>` .. _tui_removing_elements: Removing Elements ***************** -.. _modifying_meshes_ex12.py: - -``modifying_meshes_ex12.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex12.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex12.py` +:download:`Download this script <../../../examples/modifying_meshes_ex12.py>` .. _tui_removing_orphan_nodes: Removing Orphan Nodes ********************* -.. _modifying_meshes_ex13.py: - -``modifying_meshes_ex13.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex13.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex13.py` +:download:`Download this script <../../../examples/modifying_meshes_ex13.py>` .. _tui_moving_nodes: Moving Nodes ============ -.. _modifying_meshes_ex15.py: - -``modifying_meshes_ex15.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex15.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex15.py` +:download:`Download this script <../../../examples/modifying_meshes_ex15.py>` .. _tui_diagonal_inversion: Diagonal Inversion ================== -.. _modifying_meshes_ex16.py: - -``modifying_meshes_ex16.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex16.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex16.py` +:download:`Download this script <../../../examples/modifying_meshes_ex16.py>` .. _tui_uniting_two_triangles: Uniting two Triangles ===================== -.. _modifying_meshes_ex17.py: - -``modifying_meshes_ex17.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex17.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex17.py` +:download:`Download this script <../../../examples/modifying_meshes_ex17.py>` .. _tui_uniting_set_of_triangles: Uniting a Set of Triangles ========================== -.. _modifying_meshes_ex18.py: - -``modifying_meshes_ex18.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex18.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex18.py` +:download:`Download this script <../../../examples/modifying_meshes_ex18.py>` .. _tui_orientation: Orientation =========== -.. _modifying_meshes_ex19.py: - -``modifying_meshes_ex19.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex19.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex19.py` +:download:`Download this script <../../../examples/modifying_meshes_ex19.py>` .. _tui_cutting_quadrangles: Cutting Quadrangles =================== -.. _modifying_meshes_ex20.py: +.. literalinclude:: ../../../examples/modifying_meshes_ex20.py + :linenos: + :language: python -``modifying_meshes_ex20.py`` +:download:`Download this script <../../../examples/modifying_meshes_ex20.py>` -.. literalinclude:: ../../../examples/modifying_meshes_ex20.py +.. _modifying_meshes_split_vol: + +Split Volumes into Tetrahedra +============================= + +.. literalinclude:: ../../../examples/modifying_meshes_split_vol.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex20.py` +:download:`Download this script <../../../examples/modifying_meshes_split_vol.py>` .. _tui_smoothing: Smoothing ========= -.. _modifying_meshes_ex21.py: - -``modifying_meshes_ex21.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex21.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex21.py` +:download:`Download this script <../../../examples/modifying_meshes_ex21.py>` .. _tui_extrusion: Extrusion ========= -.. _modifying_meshes_ex22.py: - -``modifying_meshes_ex22.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex22.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex22.py` +:download:`Download this script <../../../examples/modifying_meshes_ex22.py>` .. _tui_extrusion_along_path: Extrusion along a Path ====================== -.. _modifying_meshes_ex23.py: - -``modifying_meshes_ex23.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex23.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex23.py` +:download:`Download this script <../../../examples/modifying_meshes_ex23.py>` .. _tui_revolution: Revolution ========== -.. _modifying_meshes_ex24.py: - -``modifying_meshes_ex24.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex24.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex24.py` +:download:`Download this script <../../../examples/modifying_meshes_ex24.py>` .. _tui_pattern_mapping: Pattern Mapping =============== -.. _modifying_meshes_ex25.py: - -``modifying_meshes_ex25.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex25.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex25.py` +:download:`Download this script <../../../examples/modifying_meshes_ex25.py>` .. _tui_quadratic: Convert mesh to/from quadratic ============================== -.. _modifying_meshes_ex26.py: - -``modifying_meshes_ex26.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex26.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex26.py` +:download:`Download this script <../../../examples/modifying_meshes_ex26.py>` .. _tui_split_biquad: Split bi-quadratic into linear ============================== -.. _split_biquad.py: - -``split_biquad.py`` - .. literalinclude:: ../../../examples/split_biquad.py :linenos: :language: python -:download:`../../../examples/split_biquad.py` - +:download:`Download this script <../../../examples/split_biquad.py>` diff --git a/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst b/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst index 697018719..9a0fc2f91 100644 --- a/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst +++ b/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst @@ -10,12 +10,8 @@ Using SALOME NoteBook Notebook Smesh ============== -.. _notebook_smesh.py: - -``notebook_smesh.py`` - .. literalinclude:: ../../../examples/notebook_smesh.py :linenos: :language: python -:download:`../../../examples/notebook_smesh.py` +:download:`Download this script <../../../examples/notebook_smesh.py>` diff --git a/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst b/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst index 5e3b1b187..6bc69d49f 100644 --- a/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst +++ b/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst @@ -4,16 +4,11 @@ Use Extrusion 3D meshing algorithm ********************************** - -.. _prism_3d_algo.py: - -``prism_3d_algo.py`` - .. literalinclude:: ../../../examples/prism_3d_algo.py :linenos: :language: python -:download:`../../../examples/prism_3d_algo.py` +:download:`Download this script <../../../examples/prism_3d_algo.py>` The result geometry and mesh is shown below diff --git a/doc/salome/gui/SMESH/input/tui_quality_controls.rst b/doc/salome/gui/SMESH/input/tui_quality_controls.rst index 3ce1a2715..9563bdb96 100644 --- a/doc/salome/gui/SMESH/input/tui_quality_controls.rst +++ b/doc/salome/gui/SMESH/input/tui_quality_controls.rst @@ -12,15 +12,11 @@ Quality Controls Free Borders ============ -.. _quality_controls_ex01.py: - -``quality_controls_ex01.py`` - .. literalinclude:: ../../../examples/quality_controls_ex01.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex01.py` +:download:`Download this script <../../../examples/quality_controls_ex01.py>` .. _tui_borders_at_multiconnection: @@ -28,15 +24,11 @@ Free Borders Borders at Multiconnection ========================== -.. _quality_controls_ex02.py: - -``quality_controls_ex02.py`` - .. literalinclude:: ../../../examples/quality_controls_ex02.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex02.py` +:download:`Download this script <../../../examples/quality_controls_ex02.py>` .. _tui_length_1d: @@ -44,135 +36,99 @@ Borders at Multiconnection Length 1D ========= -.. _quality_controls_ex03.py: - -``quality_controls_ex03.py`` - .. literalinclude:: ../../../examples/quality_controls_ex03.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex03.py` +:download:`Download this script <../../../examples/quality_controls_ex03.py>` .. _tui_free_edges: Free Edges ========== -.. _quality_controls_ex04.py: - -``quality_controls_ex04.py`` - .. literalinclude:: ../../../examples/quality_controls_ex04.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex04.py` +:download:`Download this script <../../../examples/quality_controls_ex04.py>` .. _tui_free_nodes: Free Nodes ========== -.. _quality_controls_ex05.py: - -``quality_controls_ex05.py`` - .. literalinclude:: ../../../examples/quality_controls_ex05.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex05.py` +:download:`Download this script <../../../examples/quality_controls_ex05.py>` .. _tui_free_faces: Free Faces ========== -.. _quality_controls_ex06.py: - -``quality_controls_ex06.py`` - .. literalinclude:: ../../../examples/quality_controls_ex06.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex06.py` +:download:`Download this script <../../../examples/quality_controls_ex06.py>` .. _tui_bare_border_faces: Bare border faces ================= -.. _quality_controls_ex07.py: - -``quality_controls_ex07.py`` - .. literalinclude:: ../../../examples/quality_controls_ex07.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex07.py` +:download:`Download this script <../../../examples/quality_controls_ex07.py>` .. _tui_bare_border_volumes: Bare border volumes =================== -.. _quality_controls_ex08.py: - -``quality_controls_ex08.py`` - .. literalinclude:: ../../../examples/quality_controls_ex08.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex08.py` +:download:`Download this script <../../../examples/quality_controls_ex08.py>` .. _tui_over_constrained_faces: Over-constrained faces ====================== -.. _quality_controls_ex09.py: - -``quality_controls_ex09.py`` - .. literalinclude:: ../../../examples/quality_controls_ex09.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex09.py` +:download:`Download this script <../../../examples/quality_controls_ex09.py>` .. _tui_over_constrained_volumes: Over-constrained volumes ======================== -.. _quality_controls_ex10.py: - -``quality_controls_ex10.py`` - .. literalinclude:: ../../../examples/quality_controls_ex10.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex10.py` +:download:`Download this script <../../../examples/quality_controls_ex10.py>` .. _tui_length_2d: Length 2D ========= -.. _quality_controls_ex11.py: - -``quality_controls_ex11.py`` - .. literalinclude:: ../../../examples/quality_controls_ex11.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex11.py` +:download:`Download this script <../../../examples/quality_controls_ex11.py>` .. _tui_borders_at_multiconnection_2d: @@ -180,163 +136,118 @@ Length 2D Borders at Multiconnection 2D ============================= -.. _quality_controls_ex12.py: - -``quality_controls_ex12.py`` - .. literalinclude:: ../../../examples/quality_controls_ex12.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex12.py` +:download:`Download this script <../../../examples/quality_controls_ex12.py>` .. _tui_area: Area ==== -.. _quality_controls_ex13.py: - -``quality_controls_ex13.py`` - .. literalinclude:: ../../../examples/quality_controls_ex13.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex13.py` +:download:`Download this script <../../../examples/quality_controls_ex13.py>` .. _tui_taper: Taper ===== -.. _quality_controls_ex14.py: - -``quality_controls_ex14.py`` - .. literalinclude:: ../../../examples/quality_controls_ex14.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex14.py` +:download:`Download this script <../../../examples/quality_controls_ex14.py>` .. _tui_aspect_ratio: Aspect Ratio ============ -.. _quality_controls_ex15.py: - -``quality_controls_ex15.py`` - .. literalinclude:: ../../../examples/quality_controls_ex15.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex15.py` +:download:`Download this script <../../../examples/quality_controls_ex15.py>` .. _tui_minimum_angle: Minimum Angle ============= -.. _quality_controls_ex16.py: - -``quality_controls_ex16.py`` - .. literalinclude:: ../../../examples/quality_controls_ex16.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex16.py` +:download:`Download this script <../../../examples/quality_controls_ex16.py>` .. _tui_warping: Warping ======= -.. _quality_controls_ex17.py: - -``quality_controls_ex17.py`` - .. literalinclude:: ../../../examples/quality_controls_ex17.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex17.py` +:download:`Download this script <../../../examples/quality_controls_ex17.py>` .. _tui_skew: Skew ==== -.. _quality_controls_ex18.py: - -``quality_controls_ex18.py`` - .. literalinclude:: ../../../examples/quality_controls_ex18.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex18.py` +:download:`Download this script <../../../examples/quality_controls_ex18.py>` .. _tui_max_element_length_2d: Element Diameter 2D =================== -.. _quality_controls_ex19.py: - -``quality_controls_ex19.py`` - .. literalinclude:: ../../../examples/quality_controls_ex19.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex19.py` +:download:`Download this script <../../../examples/quality_controls_ex19.py>` .. _tui_aspect_ratio_3d: Aspect Ratio 3D =============== -.. _quality_controls_ex20.py: - -``quality_controls_ex20.py`` - .. literalinclude:: ../../../examples/quality_controls_ex20.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex20.py` +:download:`Download this script <../../../examples/quality_controls_ex20.py>` .. _tui_volume: Volume ====== -.. _quality_controls_ex21.py: - -``quality_controls_ex21.py`` - .. literalinclude:: ../../../examples/quality_controls_ex21.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex21.py` +:download:`Download this script <../../../examples/quality_controls_ex21.py>` .. _tui_max_element_length_3d: Element Diameter 3D =================== -.. _quality_controls_ex22.py: - -``quality_controls_ex22.py`` - .. literalinclude:: ../../../examples/quality_controls_ex22.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex22.py` - +:download:`Download this script <../../../examples/quality_controls_ex22.py>` diff --git a/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst b/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst index b62ab5988..0be8e0a6d 100644 --- a/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst @@ -12,193 +12,140 @@ Transforming Meshes Translation =========== -.. _transforming_meshes_ex01.py: - -``transforming_meshes_ex01.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex01.py` +:download:`Download this script <../../../examples/transforming_meshes_ex01.py>` .. _tui_rotation: Rotation ======== -.. _transforming_meshes_ex02.py: - -``transforming_meshes_ex02.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex02.py` +:download:`Download this script <../../../examples/transforming_meshes_ex02.py>` .. _tui_scale: Scale ===== -.. _transforming_meshes_ex03.py: - -``transforming_meshes_ex03.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex03.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex03.py` +:download:`Download this script <../../../examples/transforming_meshes_ex03.py>` .. _tui_symmetry: Symmetry ======== -.. _transforming_meshes_ex04.py: - -``transforming_meshes_ex04.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex04.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex04.py` +:download:`Download this script <../../../examples/transforming_meshes_ex04.py>` .. _tui_merging_nodes: Merging Nodes ============= -.. _transforming_meshes_ex05.py: - -``transforming_meshes_ex05.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex05.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex05.py` +:download:`Download this script <../../../examples/transforming_meshes_ex05.py>` .. _tui_merging_elements: Merging Elements ================ -.. _transforming_meshes_ex06.py: - -``transforming_meshes_ex06.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex06.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex06.py` +:download:`Download this script <../../../examples/transforming_meshes_ex06.py>` .. _tui_sew_meshes_border_to_side: Sew Meshes Border to Side ========================= -.. _transforming_meshes_ex07.py: - -``transforming_meshes_ex07.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex07.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex07.py` +:download:`Download this script <../../../examples/transforming_meshes_ex07.py>` .. _tui_sew_conform_free_borders: Sew Conform Free Borders ======================== -.. _transforming_meshes_ex08.py: - -``transforming_meshes_ex08.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex08.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex08.py` +:download:`Download this script <../../../examples/transforming_meshes_ex08.py>` .. _tui_sew_free_borders: Sew Free Borders ================ -.. _transforming_meshes_ex09.py: - -``transforming_meshes_ex09.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex09.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex09.py` +:download:`Download this script <../../../examples/transforming_meshes_ex09.py>` .. _tui_sew_side_elements: Sew Side Elements ================= -.. _transforming_meshes_ex10.py: - -``transforming_meshes_ex10.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex10.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex10.py` +:download:`Download this script <../../../examples/transforming_meshes_ex10.py>` .. _tui_duplicate_nodes: Duplicate nodes or/and elements =============================== -.. _transforming_meshes_ex11.py: - -``transforming_meshes_ex11.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex11.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex11.py` +:download:`Download this script <../../../examples/transforming_meshes_ex11.py>` .. _tui_make_2dmesh_from_3d: Create boundary elements ======================== -.. _transforming_meshes_ex12.py: - -``transforming_meshes_ex12.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex12.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex12.py` +:download:`Download this script <../../../examples/transforming_meshes_ex12.py>` .. _tui_reorient_faces: Reorient faces ============== -.. _transforming_meshes_ex13.py: - -``transforming_meshes_ex13.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex13.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex13.py` - +:download:`Download this script <../../../examples/transforming_meshes_ex13.py>` diff --git a/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst b/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst index 3f873ec52..baaf81a09 100644 --- a/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst +++ b/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst @@ -8,19 +8,13 @@ This sample demonstrates how to use **Use Faces to be Created Manually** algorit which is actually just a stub allowing to use your own 2D algorithm implemented in Python. -.. _use_existing_faces.py: - -``use_existing_faces.py`` - .. literalinclude:: ../../../examples/use_existing_faces.py :linenos: :language: python -:download:`../../../examples/use_existing_faces.py` +:download:`Download this script <../../../examples/use_existing_faces.py>` Resulting mesh: .. image:: ../images/use_existing_face_sample_mesh.png :align: center - - diff --git a/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst b/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst index f436e6324..c1c3bfd2e 100644 --- a/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst @@ -10,16 +10,11 @@ Viewing Meshes Viewing Mesh Infos ################## - -.. _viewing_meshes_ex01.py: - -``viewing_meshes_ex01.py`` - .. literalinclude:: ../../../examples/viewing_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/viewing_meshes_ex01.py` +:download:`Download this script <../../../examples/viewing_meshes_ex01.py>` .. _tui_find_element_by_point: @@ -27,13 +22,8 @@ Viewing Mesh Infos Find Element by Point ##################### -.. _viewing_meshes_ex02.py: - -``viewing_meshes_ex02.py`` - .. literalinclude:: ../../../examples/viewing_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/viewing_meshes_ex02.py` - +:download:`Download this script <../../../examples/viewing_meshes_ex02.py>` diff --git a/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst index 46006da89..d908627ca 100644 --- a/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst +++ b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst @@ -5,37 +5,26 @@ How to work with objects from the GUI ? *************************************** -It is sometimes useful to work alternatively in the GUI of SALOME and in the Python Console. To fetch an object from the TUI simply type: +It is sometimes useful to work alternatively in the GUI of SALOME and in the Python Console. To fetch an object from the TUI simply type:: -.. code-block:: python - :linenos: + myMesh_ref = salome.IDToObject( ID ) + # were ID is a string looking like "0:1:2:3" that appears in the Object Browser in the Entry column. + # ( If hidden, show it by right clicking and checking the checkbox Entry ) + myMesh = smesh.Mesh(myMesh_ref) - myMesh_ref = salome.IDToObject( ID ) - # were ID is a string looking like "0:1:2:3" that appears in the Object Browser in the Entry column. - # ( If hidden, show it by right clicking and checking the checkbox Entry ) - myMesh = smesh.Mesh(myMesh_ref) +or:: -or + myMesh_ref = salome.myStudy.FindObjectByPath("/Mesh/myMesh").GetObject() + #'/Mesh/myMesh' is a path to the desired object in the Object Browser + myMesh = smesh.Mesh(myMesh_ref) -.. code-block:: python - :linenos: +or:: - myMesh_ref = salome.myStudy.FindObjectByPath("/Mesh/myMesh").GetObject() - #'/Mesh/myMesh' is a path to the desired object in the Object Browser - myMesh = smesh.Mesh(myMesh_ref) - -or - -.. code-block:: python - :linenos: - - # get a selected mesh - from salome.gui import helper - myMesh_ref = helper.getSObjectSelected()[0].GetObject() - myMesh = smesh.Mesh(myMesh_ref) - -All the methods documented in these pages can then be used on myMesh - -.. note:: The first statement only gives you access to a reference to the object created via the GUI. But the methods available on this reference are not exactly the same as those documented in these help pages. This Python API is meant to be used on smesh.Mesh instances. That's why you'll have to create such an instance with the second statement. + # get a selected mesh + from salome.gui import helper + myMesh_ref = helper.getSObjectSelected()[0].GetObject() + myMesh = smesh.Mesh(myMesh_ref) +A result myMesh is an object of :class:`Mesh ` class. +.. note:: The first statement only gives you access to a reference to the object created via the GUI (`myMesh_ref`). But the methods available on this reference differ from those of :class:`Mesh ` class documented in these help pages. That's why you have to create an instance of :class:`Mesh ` class with the last statement. diff --git a/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst b/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst index e13f8213d..53a0322a0 100644 --- a/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst +++ b/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst @@ -7,24 +7,20 @@ Uniting a set of triangles It is possible to unite many neighboring triangles into quadrangles by deletion of the common edge. -**To union several triangles:** +*To union several triangles:* -#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). -#. In the **Modification** menu select the **Union of triangles** item or click **"Union of triangles"** button in the tool-bar. - - .. image:: ../images/image80.png - :align: center +.. |img| image:: ../images/image80.png - .. centered:: - **"Union of triangles" button** +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Union of triangles** item or click *"Union of triangles"* button |img| in the tool-bar. -The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/a-unionoftriangles.png :align: center - * **The main list** shall contain the triangles which will be united. You can click on a triangle in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this triangle will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of IDs. The **Filter** button allows to apply a definite :ref:`filtering_elements` to selection of triangles. + * **The main list** shall contain the triangles which will be united. You can click on a triangle in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this triangle will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of IDs. The **Filter** button allows to apply a definite :ref:`filter ` to selection of triangles. * **Apply to all** radio button allows to apply the operation to all triangles of the selected mesh. * **Preview** provides a preview in the viewer. * **Criterion** menu allows to choose a quality criterion, which will be optimized to select triangles to unite. @@ -39,13 +35,13 @@ the others, the operation on these elements shall take no effect. :align: center .. centered:: - "The chosen triangles" + The chosen triangles .. image:: ../images/uniting_a_set_of_triangles2.png :align: center .. centered:: - "The union of several triangles - several quadrangular cells are created" + The union of several triangles - several quadrangular cells are created **See Also** a sample TUI Script of a :ref:`tui_uniting_set_of_triangles` operation. diff --git a/doc/salome/gui/SMESH/input/uniting_two_triangles.rst b/doc/salome/gui/SMESH/input/uniting_two_triangles.rst index 1db64d445..dfc42363c 100644 --- a/doc/salome/gui/SMESH/input/uniting_two_triangles.rst +++ b/doc/salome/gui/SMESH/input/uniting_two_triangles.rst @@ -6,17 +6,13 @@ Uniting two triangles In MESH you can union two neighboring triangles by deletion of the common edge. -**To unite two triangles:** +*To unite two triangles:* -#. From the **Modification** menu choose the **Union of two triangles** item or click **"Union of two triangles"** button in the tool-bar. +.. |img| image:: ../images/image71.png - .. image:: ../images/image71.png - :align: center - - .. centered:: - **"Union of two triangles" button** +#. From the **Modification** menu choose the **Union of two triangles** item or click *"Union of two triangles"* button |img| in the tool-bar. - The following dialog box shall appear: + The following dialog box shall appear: .. image:: ../images/unionoftwotriangles.png :align: center diff --git a/doc/salome/gui/SMESH/input/use_existing_algos.rst b/doc/salome/gui/SMESH/input/use_existing_algos.rst index afe9f17ce..267ea46ca 100644 --- a/doc/salome/gui/SMESH/input/use_existing_algos.rst +++ b/doc/salome/gui/SMESH/input/use_existing_algos.rst @@ -28,7 +28,7 @@ by importing mesh edges contained in a group (or groups) from another mesh. To apply this algorithm select the edge to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Import 1D Elements from Another Mesh** in the list of 1D -algorithms and click the **"Add Hypothesis"** button. +algorithms and click the *"Add Hypothesis"* button. The following dialog box will appear: .. image:: ../images/hyp_source_edges.png @@ -43,7 +43,7 @@ In this dialog box you can define **Import 1D-2D Elements from Another Mesh** algorithm allows to define the mesh of a geometrical face (or group of faces) by importing mesh faces contained in a group (or groups) from another (or this) mesh. 1D elements on the boundary of the geometrical face (if not yet present) are also created by the algorithm in conformity with the created 2D elements. -To apply this algorithm select the geometrical face to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Import 1D-2D Elements from Another Mesh** in the list of 2D algorithms and click the **"Add Hypothesis"** button. +To apply this algorithm select the geometrical face to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Import 1D-2D Elements from Another Mesh** in the list of 2D algorithms and click the *"Add Hypothesis"* button. The following dialog box will appear: @@ -57,8 +57,4 @@ In this dialog box you can define * **To copy mesh** checkbox allows to import not only the faces of the selected **Groups of Faces**, but the whole source mesh. In this case **To copy groups** checkbox allows to create the same groups as in the imported source mesh. -**See Also** a sample TUI Script of a -:ref:`tui_import`. - - - +**See Also** a sample TUI Script of :ref:`Import 2D Elements from Another Mesh `. diff --git a/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst b/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst index f634dc773..71eea1b8c 100644 --- a/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst +++ b/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst @@ -11,28 +11,27 @@ creation and modification of objects. :align: center .. centered:: - "Setting of variables in SALOME NoteBook" + Setting of variables in SALOME NoteBook .. image:: ../images/addnode_notebook.png :align: center .. centered:: - "Use of variables to add a node in MESH module" + Use of variables to add a node in MESH module The following limitations on the use of variables still exist: -* :ref:`radial_prism_algo_page` hypothesis - parametrical values are correctly applied, but they are not restored after "Update study" operation. -* :ref:`a1d_meshing_hypo_page` hypothesis, Distribution with Table Density and Distribution with Analytic Density - parametrical values are not applicable. -* :ref:`translation_page` dialog box, default mode (translation by two points) - parametrical values are correctly applied, but they are not restored after "Update study" operation. -* :ref:`merging_nodes_page` dialog box - parametrical value (tolerance of coincident nodes detection) is correctly applied, but it is not restored after "Update study" operation. -* :ref:`revolution_page` dialog box - it is impossible to use the angle of revolution as "total angle" if it is defined as variable. -* :ref:`extrusion_along_path_page` dialog box - it is impossible to use "Linear variation of the angles" mode if at least one of those angles is defined as variable. -* :ref:`pattern_mapping_page` dialog box - parametrical values (indices of nodes) are correctly applied, but they are not restored after "Update study" operation. -* :ref:`clipping_page` dialog box. -* **Properties** dialog box. +* :ref:`Distribution of Layers ` hypothesis - parametrical values are correctly applied, but they are not restored after "Update study" operation. +* :ref:`Number of Segments ` hypothesis, Distribution with Table Density and Distribution with Analytic Density - parametrical values are not applicable. +* :ref:`Translation ` dialog box, default mode (translation by two points) - parametrical values are correctly applied, but they are not restored after "Update study" operation. +* :ref:`Merging nodes ` dialog box - parametrical value (tolerance of coincident nodes detection) is correctly applied, but it is not restored after "Update study" operation. +* :ref:`Revolution ` dialog box - it is impossible to use the angle of revolution as "total angle" if it is defined as variable. +* :ref:`Extrusion along a path ` dialog box - it is impossible to use "Linear variation of the angles" mode if at least one of those angles is defined as variable. +* :ref:`Pattern mapping ` dialog box - parametrical values (indices of nodes) are correctly applied, but they are not restored after "Update study" operation. +* :ref:`Clipping ` dialog box. +* :ref:`Properties ` dialog box. -Our **TUI Scripts** provide you with useful examples of -:ref:`tui_notebook_smesh` . +Our **TUI Scripts** provide you with useful examples of :ref:`Using SALOME NoteBook `. diff --git a/doc/salome/gui/SMESH/input/using_operations_on_groups.rst b/doc/salome/gui/SMESH/input/using_operations_on_groups.rst index 0c0344157..717901df4 100644 --- a/doc/salome/gui/SMESH/input/using_operations_on_groups.rst +++ b/doc/salome/gui/SMESH/input/using_operations_on_groups.rst @@ -22,18 +22,17 @@ This operation allows to create a new group in such a way that all mesh elements that are present in the initial groups will be added to the new one. -**To union groups:** +*To union groups:* #. In the **Mesh** menu select the **Union Groups** item. The following dialog box will appear: .. image:: ../images/uniongroups.png :align: center - In this dialog box you should specify the name of the resulting group and set of groups which will be united. + In this dialog box you should specify the name of the resulting group and set of groups which will be united. - For example, we have two groups Group1 and Group2. - - The result of their **Union** will be Group12: + For example, we have two groups Group1 and Group2. + The result of their **Union** will be Group12: .. image:: ../images/image133.gif :align: center @@ -56,8 +55,7 @@ the new one. #. Click the **Apply** or **Apply and Close** button to confirm creation of the group. -**See Also** a sample TUI Script of a -:ref:`tui_union_of_groups` operation. +**See Also** a sample TUI Script of a :ref:`tui_union_of_groups` operation. .. _intersection_anchor: @@ -69,18 +67,17 @@ This operation allows to create a new group in such a way that all mesh elements that are present in all initial groups together are added to the new one. -**To intersect groups:** +*To intersect groups:* #. In the **Mesh** menu select the **Intersect Groups** item. The following dialog box will appear: .. image:: ../images/intersectgroups.png :align: center - In this dialog box you should specify the name of the resulting group and set of groups which will be intersected. - - For example, we have two groups Group1 and Group2. + In this dialog box you should specify the name of the resulting group and set of groups which will be intersected. - The result of their **Intersection** will be Group12a: + For example, we have two groups Group1 and Group2. + The result of their **Intersection** will be Group12a: .. image:: ../images/image133.gif :align: center @@ -103,8 +100,7 @@ new one. #. Click the **Apply** or **Apply and Close** button to confirm creation of the group. -**See Also** a sample TUI Script of an -:ref:`tui_intersection_of_groups` operation. +**See Also** a sample TUI Script of an :ref:`tui_intersection_of_groups` operation. .. _cut_anchor: @@ -116,17 +112,17 @@ This operation allows to create a new group in such a way that all mesh elements that are present in the main groups but are absent in the tool groups are added to the new one. -**To cut groups:** +*To cut groups:* #. In the **Mesh** menu select the **Cut Groups** item. The following dialog box will appear: .. image:: ../images/cutgroups.png :align: center - In this dialog box you should specify the name of the resulting group and groups which will be cut. + In this dialog box you should specify the name of the resulting group and groups which will be cut. - For example, we have two groups Group1 and Group2. - The result of their **Cut** will be Group12b: + For example, we have two groups Group1 and Group2. + The result of their **Cut** will be Group12b: .. image:: ../images/image133.gif :align: center @@ -149,7 +145,6 @@ tool groups are added to the new one. #. Click the **Apply** or **Apply and Close** button to confirm creation of the group. -**See Also** a sample TUI Script of a -:ref:`tui_cut_of_groups` operation. +**See Also** a sample TUI Script of a :ref:`tui_cut_of_groups` operation. diff --git a/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst b/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst index e3587624c..44cb38860 100644 --- a/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst +++ b/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst @@ -4,21 +4,21 @@ Viewing meshes ************** -By default a just :ref:`compute_anchor` mesh will be +By default a just :ref:`computed ` mesh will be automatically displayed in the **VTK 3D Viewer**. (You can switch -off :ref:`automatic_update_pref` preference parameter +off :ref:`Automatic Update ` preference parameter to prevent this.) Click **Display only** to hide all other objects at the same time. **VTK 3D Viewer** is described in detail in the documentation on **GUI module**. -Use the following :ref:`mesh_preferences_page` +Use the following :ref:`preference parameters ` to adjust how the mesh is displayed by default: -* :ref:`automatic_update_pref` -* :ref:`display_mode_pref` -* :ref:`quadratic_2d_mode_pref` -* All parameters of :ref:`mesh_tab_preferences` Preferences dialog. +* :ref:`Automatic Update ` +* :ref:`Default display mode ` +* :ref:`Representation of the 2D quadratic elements ` +* All parameters of :ref:`Mesh ` tab page of 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 @@ -32,43 +32,39 @@ right-clicking on the selected mesh. * **Rename** - allows to rename the object in the Object browser. * **Hide all** - allows to hide all objects in the viewer. * **Update** - refreshes the presentation of your mesh in the Object Browser, applying all recent changes. -* :ref:`mesh_infos_page` - provides information about the mesh. -* :ref:`find_element_by_point_page` - allows to find all mesh elements, to which belongs a point with the given coordinates. -* **Auto Color** - switch on / off auto-assigning colors for the groups. If switched on, a default color of a new group in :ref:`creating_groups_page` dialog is chosen randomly. -* :ref`:`numbering_page` - allows to display the ID numbers of all meshing elements or nodes composing your mesh in the viewer. -* :ref:`display_mode_page` - allows to select between Wireframe, Shading and Nodes presentation. -* :ref:`display_entity_page` - allows to display entities by types (Faces, Edges, Volumes etc.). +* :ref:`Mesh Information ` - provides information about the mesh. +* :ref:`Find Element by Point ` - allows to find all mesh elements, to which belongs a point with the given coordinates. +* **Auto Color** - switch on / off auto-assigning colors for the groups. If switched on, a default color of a new group in :ref:`Create Group ` dialog is chosen randomly. +* :ref:`Numbering ` - allows to display the ID numbers of all meshing elements or nodes composing your mesh in the viewer. +* :ref:`Display Mode ` - allows to select between Wireframe, Shading and Nodes presentation. +* :ref:`Display Entity ` - allows to display entities by types (Faces, Edges, Volumes etc.). .. _quadratic_2d_mode: -Quadratic 2D -============ - -* **2D Quadratic** - allows to select between the representation of quadratic edges as broken **lines** or as **arcs**. A default representation can be set in :ref:`quadratic_2d_mode_pref`. Arc representation applies to 1D and 2D elements only. +* **2D Quadratic** - allows to select between the representation of quadratic edges as broken **lines** or as **arcs**. A default representation can be set in :ref:`Preferences `. Arc representation applies to 1D and 2D elements only. * **Orientation of faces** - shows vectors of orientation of faces of the selected mesh. The orientation vector is shown for each 2D mesh element and for each free facet of a 3D mesh element. The vector direction is calculated by the first three nodes of the face produced by vectors n1-n2 and n1-n3. -* :ref:`colors_size_page` - allows to define several visual properties, including color of elements, shrink size, ... -* :ref:`transparency_page` - allows to change the transparency of mesh elements. -* :ref:`quality_page` - graphically presents various information about the mesh. +* :ref:`Properties ` - allows to define several visual properties, including color of elements, shrink size, ... +* :ref:`Transparency ` - allows to change the transparency of mesh elements. +* :ref:`Controls ` - graphically presents various information about the mesh. * **Hide** - allows to hide the selected mesh from the viewer. * **Show Only** - allows to display only the selected mesh, hiding all others from the viewer. -* :ref:`clipping_page` - allows to create cross-sections of the displayed objects. +* :ref:`Clipping ` - allows to create cross-sections of the displayed objects. * **Dump view** - exports an object from the viewer in bmp, png or jpeg image format. * **Change background** - allows to redefine the background color. By default it is black. * **View Operations** - allows to show/hide the visualization toolbar in the Viewer window. * **Recording Operations** - allows to show/hide the recording toolbar in the Viewer window. - +**Table of Contents** .. toctree:: - :maxdepth: 2 - - mesh_infos.rst - find_element_by_point.rst - numbering.rst - display_mode.rst - display_entity.rst - colors_size.rst - transparency.rst - clipping.rst - - + :maxdepth: 2 + :titlesonly: + + mesh_infos.rst + find_element_by_point.rst + numbering.rst + display_mode.rst + display_entity.rst + colors_size.rst + transparency.rst + clipping.rst diff --git a/doc/salome/gui/SMESH/input/volume.rst b/doc/salome/gui/SMESH/input/volume.rst index 080da7102..f49b3bdbd 100644 --- a/doc/salome/gui/SMESH/input/volume.rst +++ b/doc/salome/gui/SMESH/input/volume.rst @@ -4,26 +4,19 @@ Volume ****** -**Volume** mesh quality criterion reflects the volume of meshes of a -3D object. +**Volume** mesh quality criterion reflects the volume of meshes of a 3D object. -**To apply the Volume quality criterion to your mesh:** +*To apply the Volume quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Volume Controls > Volume** or click **"Volume"** button in the toolbar. - - .. image:: ../images/image145.png - :align: center +.. |img| image:: ../images/image145.png - .. centered:: - **"Volume" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Volume** or click *"Volume"* button |img| in the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image143.gif :align: center -**See Also** a sample TUI Script of a -:ref:`tui_volume` operation. - +**See Also** a sample TUI Script of a :ref:`tui_volume` filter. diff --git a/doc/salome/gui/SMESH/input/warping.rst b/doc/salome/gui/SMESH/input/warping.rst index ece775cc7..3cb47f795 100644 --- a/doc/salome/gui/SMESH/input/warping.rst +++ b/doc/salome/gui/SMESH/input/warping.rst @@ -21,25 +21,17 @@ length of each half edge is measured and the shortest length is assigned *l*. The warp angle is the arcsine of the ratio of the projection height *h* to the half edge length *l*. -**To apply the Warping quality criterion to your mesh:** +*To apply the Warping quality criterion to your mesh:* -#. Display your mesh in the viewer. - -#. Choose **Controls > Face Controls > Warping Angle** or click **"Warping angle"** button of the toolbar. - - .. image:: ../images/image39.png - :align: center +.. |img| image:: ../images/image39.png - .. centered:: - **"Warping angle" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Warping Angle** or click *"Warping angle"* button |img| of the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image97.jpg :align: center -**See Also** a sample TUI Script of a -:ref:`tui_warping` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_warping` filter. diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 2b1192291..615546bea 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -1128,6 +1128,8 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup // Remove contents for ( size_t i = 0; i < elems.size(); ++i ) { + // if ( !_impl->GetMeshDS()->Contains( elems[i] )) + // continue; if ( !isNodal ) { for ( SMDS_ElemIteratorPtr nIt = elems[i]->nodesIterator(); nIt->more(); ) diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 4a0c5816e..9e92ae4a5 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -126,8 +126,10 @@ NO_NAME = "NoName" def GetName(obj): """ + Return a name of an object + Returns: - object name + object name """ if obj: # object not null @@ -239,7 +241,7 @@ def AssureGeomPublished(mesh, geom, name=''): def FirstVertexOnCurve(mesh, edge): """ Returns: - the first vertex of a geometrical edge by ignoring orientation + the first vertex of a geometrical edge by ignoring orientation """ vv = mesh.geompyD.SubShapeAll( edge, geomBuilder.geomBuilder.ShapeType["VERTEX"]) if not vv: @@ -337,8 +339,8 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True): """ - Dump component to the Python script - This method overrides IDL function to allow default values for the parameters. + Dump component to the Python script. + This method overrides IDL function to allow default values for the parameters. """ return SMESH._objref_SMESH_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile) @@ -346,10 +348,10 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def SetDumpPythonHistorical(self, isHistorical): """ Set mode of DumpPython(), *historical* or *snapshot*. - In the *historical* mode, the Python Dump script includes all commands - performed by SMESH engine. In the *snapshot* mode, commands - relating to objects removed from the Study are excluded from the script - as well as commands not influencing the current state of meshes + In the *historical* mode, the Python Dump script includes all commands + performed by SMESH engine. In the *snapshot* mode, commands + relating to objects removed from the Study are excluded from the script + as well as commands not influencing the current state of meshes """ if isHistorical: val = "true" @@ -369,17 +371,26 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def Mesh(self, obj=0, name=0): """ - Create a mesh. This can be either an empty mesh, possibly having an underlying geometry, - or a mesh wrapping a CORBA mesh given as a parameter. + Create a mesh. This mesh can be either + + * an empty mesh not bound to geometry, if *obj* == 0 + * an empty mesh bound to geometry, if *obj* is GEOM.GEOM_Object + * a mesh wrapping a :class:`CORBA mesh ` given as *obj* parameter. Parameters: - obj: either (1) a CORBA mesh: (SMESH._objref_SMESH_Mesh) got e.g. by calling - salome.myStudy.FindObjectID("0:1:2:3").GetObject() or - (2) a Geometrical object: for meshing or (3) none:. + obj: either + + 1. a :class:`CORBA mesh ` got by calling e.g. + :: + + salome.myStudy.FindObjectID("0:1:2:3").GetObject() + + 2. a geometrical object for meshing + 3. none. name: the name for the new mesh. Returns: - an instance of Mesh class. + an instance of class :class:`Mesh`. """ if isinstance(obj,str): @@ -395,12 +406,14 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def ColorToString(self,c): """ - Returns: - a string representation of the color. + Convert SALOMEDS.Color to string. To be used with filters. - Parametrs: + Parameters: c: color value (SALOMEDS.Color) + + Returns: + a string representation of the color. """ val = "" @@ -414,28 +427,28 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def GetPointStruct(self,theVertex): """ - Get PointStruct from vertex + Get :class:`SMESH.PointStruct` from vertex - Parameters: - theVertex: a GEOM object(vertex) + Parameters: + theVertex (GEOM.GEOM_Object): vertex - Returns: - SMESH.PointStruct - """ + Returns: + :class:`SMESH.PointStruct` + """ [x, y, z] = self.geompyD.PointCoordinates(theVertex) return PointStruct(x,y,z) def GetDirStruct(self,theVector): """ - Get DirStruct from vector + Get :class:`SMESH.DirStruct` from vector - Parameters: - theVector: a GEOM object(vector) + Parameters: + theVector (GEOM.GEOM_Object): vector - Returns: - SMESH.DirStruct - """ + Returns: + :class:`SMESH.DirStruct` + """ vertices = self.geompyD.SubShapeAll( theVector, geomBuilder.geomBuilder.ShapeType["VERTEX"] ) if(len(vertices) != 2): @@ -448,28 +461,28 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return dirst def MakeDirStruct(self,x,y,z): - """ - Make DirStruct from a triplet + """ + Make :class:`SMESH.DirStruct` from a triplet of floats - Parameters: - x,y,z: vector components + Parameters: + x,y,z (float): vector components - Returns: - SMESH.DirStruct - """ + Returns: + :class:`SMESH.DirStruct` + """ pnt = PointStruct(x,y,z) return DirStruct(pnt) def GetAxisStruct(self,theObj): """ - Get AxisStruct from object + Get :class:`SMESH.AxisStruct` from a geometrical object Parameters: - theObj: a GEOM object (line or plane) + theObj (GEOM.GEOM_Object): line or plane - Returns: - SMESH.AxisStruct + Returns: + :class:`SMESH.AxisStruct` """ import GEOM edges = self.geompyD.SubShapeAll( theObj, geomBuilder.geomBuilder.ShapeType["EDGE"] ) @@ -502,13 +515,13 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): # ------------------------ def SetName(self, obj, name): - """ - Set the given name to the object + """ + Set the given name to an object - Parameters: - obj: the object to rename - name: a new object name - """ + Parameters: + obj: the object to rename + name: a new object name + """ if isinstance( obj, Mesh ): obj = obj.GetMesh() @@ -518,24 +531,24 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): SMESH._objref_SMESH_Gen.SetName(self, ior, name) def SetEmbeddedMode( self,theMode ): - """ - Set the current mode - """ + """ + Set the current mode + """ SMESH._objref_SMESH_Gen.SetEmbeddedMode(self,theMode) def IsEmbeddedMode(self): - """ - Get the current mode - """ + """ + Get the current mode + """ return SMESH._objref_SMESH_Gen.IsEmbeddedMode(self) def SetCurrentStudy( self, theStudy, geompyD = None ): - """ - Set the current study. Calling SetCurrentStudy( None ) allows to - switch OFF automatic pubilishing in the Study of mesh objects. - """ + """ + Set the current study. Calling SetCurrentStudy( None ) allows to + switch **off** automatic pubilishing in the Study of mesh objects. + """ if not geompyD: from salome.geom import geomBuilder @@ -557,81 +570,82 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): pass def GetCurrentStudy(self): - """ - Get the current study - """ + """ + Get the current study + """ return SMESH._objref_SMESH_Gen.GetCurrentStudy(self) def CreateMeshesFromUNV( self,theFileName ): - """ - Create a Mesh object importing data from the given UNV file + """ + Create a Mesh object importing data from the given UNV file - Returns: - an instance of Mesh class - """ + Returns: + an instance of class :class:`Mesh` + """ aSmeshMesh = SMESH._objref_SMESH_Gen.CreateMeshesFromUNV(self,theFileName) aMesh = Mesh(self, self.geompyD, aSmeshMesh) return aMesh def CreateMeshesFromMED( self,theFileName ): - """ - Create a Mesh object(s) importing data from the given MED file + """ + Create a Mesh object(s) importing data from the given MED file - Returns: - a tuple ( list of Mesh class instances, SMESH.DriverMED_ReadStatus ) - """ + Returns: + a tuple ( list of class :class:`Mesh` instances, + :class:`SMESH.DriverMED_ReadStatus` ) + """ aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromMED(self,theFileName) aMeshes = [ Mesh(self, self.geompyD, m) for m in aSmeshMeshes ] return aMeshes, aStatus def CreateMeshesFromSAUV( self,theFileName ): - """ - Create a Mesh object(s) importing data from the given SAUV file + """ + Create a Mesh object(s) importing data from the given SAUV file - Returns: - a tuple ( list of Mesh class instances, SMESH.DriverMED_ReadStatus ) - """ + Returns: + a tuple ( list of class :class:`Mesh` instances, :class:`SMESH.DriverMED_ReadStatus` ) + """ aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromSAUV(self,theFileName) aMeshes = [ Mesh(self, self.geompyD, m) for m in aSmeshMeshes ] return aMeshes, aStatus def CreateMeshesFromSTL( self, theFileName ): - """ - Create a Mesh object importing data from the given STL file + """ + Create a Mesh object importing data from the given STL file - Returns: - an instance of Mesh class - """ + Returns: + an instance of class :class:`Mesh` + """ aSmeshMesh = SMESH._objref_SMESH_Gen.CreateMeshesFromSTL(self,theFileName) aMesh = Mesh(self, self.geompyD, aSmeshMesh) return aMesh def CreateMeshesFromCGNS( self, theFileName ): - """ - Create Mesh objects importing data from the given CGNS file + """ + Create Mesh objects importing data from the given CGNS file - Returns: - a tuple ( list of Mesh class instances, SMESH.DriverMED_ReadStatus ) - """ + Returns: + a tuple ( list of class :class:`Mesh` instances, :class:`SMESH.DriverMED_ReadStatus` ) + """ aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromCGNS(self,theFileName) aMeshes = [ Mesh(self, self.geompyD, m) for m in aSmeshMeshes ] return aMeshes, aStatus def CreateMeshesFromGMF( self, theFileName ): - """ - Create a Mesh object importing data from the given GMF file. - GMF files must have .mesh extension for the ASCII format and .meshb for - the binary format. + """ + Create a Mesh object importing data from the given GMF file. + GMF files must have .mesh extension for the ASCII format and .meshb for + the binary format. - Returns: - [ an instance of Mesh class, SMESH.ComputeError ] - """ + Returns: + ( an instance of class :class:`Mesh`, :class:`SMESH.ComputeError` ) + """ aSmeshMesh, error = SMESH._objref_SMESH_Gen.CreateMeshesFromGMF(self, theFileName, @@ -642,21 +656,21 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def Concatenate( self, meshes, uniteIdenticalGroups, mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False, name = ""): - """ - Concatenate the given meshes into one mesh. All groups of input meshes will be - present in the new mesh. - - Parameters: - meshes: the meshes, sub-meshes and groups to combine into one mesh - uniteIdenticalGroups: if true, groups with same names are united, else they are renamed - mergeNodesAndElements: if true, equal nodes and elements are merged - mergeTolerance: tolerance for merging nodes - allGroups: forces creation of groups corresponding to every input mesh - name: name of a new mesh - - Returns: - an instance of Mesh class - """ + """ + Concatenate the given meshes into one mesh. All groups of input meshes will be + present in the new mesh. + + Parameters: + meshes: :class:`meshes, sub-meshes, groups or filters ` to combine into one mesh + uniteIdenticalGroups: if True, groups with same names are united, else they are renamed + mergeNodesAndElements: if True, equal nodes and elements are merged + mergeTolerance: tolerance for merging nodes + allGroups: forces creation of groups corresponding to every input mesh + name: name of a new mesh + + Returns: + an instance of class :class:`Mesh` + """ if not meshes: return None for i,m in enumerate(meshes): @@ -674,20 +688,21 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return aMesh def CopyMesh( self, meshPart, meshName, toCopyGroups=False, toKeepIDs=False): - """ - Create a mesh by copying a part of another mesh. + """ + Create a mesh by copying a part of another mesh. - Parameters: - meshPart: a part of mesh to copy, either a Mesh, a sub-mesh or a group; - to copy nodes or elements not contained in any mesh object, - pass result of Mesh.GetIDSource( list_of_ids, type ) as meshPart - meshName: a name of the new mesh - toCopyGroups: to create in the new mesh groups the copied elements belongs to - toKeepIDs: to preserve order of the copied elements or not + Parameters: + meshPart: a part of mesh to copy, either + :class:`mesh, sub-mesh, group or filter `. + To copy nodes or elements not forming any mesh object, + pass result of :meth:`Mesh.GetIDSource` as *meshPart* + meshName: a name of the new mesh + toCopyGroups: to create in the new mesh groups the copied elements belongs to + toKeepIDs: to preserve order of the copied elements or not - Returns: - an instance of Mesh class - """ + Returns: + an instance of class :class:`Mesh` + """ if (isinstance( meshPart, Mesh )): meshPart = meshPart.GetMesh() @@ -695,24 +710,27 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return Mesh(self, self.geompyD, mesh) def GetSubShapesId( self, theMainObject, theListOfSubObjects ): - """ - Return IDs of sub-shapes + """ + Return IDs of sub-shapes - Returns: - the list of integer values - """ + Parameters: + theMainObject (GEOM.GEOM_Object): a shape + theListOfSubObjects: sub-shapes (list of GEOM.GEOM_Object) + Returns: + the list of integer values + """ return SMESH._objref_SMESH_Gen.GetSubShapesId(self,theMainObject, theListOfSubObjects) def GetPattern(self): - """ - Create a pattern mapper. + """ + Create a pattern mapper. - Returns: - an instance of SMESH_Pattern + Returns: + an instance of :class:`SMESH.SMESH_Pattern` - `Example of Patterns usage <../tui_modifying_meshes_page.html#tui_pattern_mapping>`_ - """ + :ref:`Example of Patterns usage ` + """ return SMESH._objref_SMESH_Gen.GetPattern(self) @@ -729,12 +747,12 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): # ------------------------------ def GetEmptyCriterion(self): - """ - Create an empty criterion + """ + Create an empty criterion - Returns: - SMESH.Filter.Criterion - """ + Returns: + :class:`SMESH.Filter.Criterion` + """ Type = self.EnumToLong(FT_Undefined) Compare = self.EnumToLong(FT_Undefined) @@ -756,28 +774,27 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): UnaryOp=FT_Undefined, BinaryOp=FT_Undefined, Tolerance=1e-07): - """ - Create a criterion by the given parameters - Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) - - Parameters: - elementType: the type of elements(SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - CritType: the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) - Type SMESH.FunctorType._items in the Python Console to see all values. - Note that the items starting from FT_LessThan are not suitable for CritType. - Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} - Threshold: the threshold value (range of ids as string, shape, numeric) - UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined - BinaryOp: a binary logical operation SMESH.FT_LogicalAND, SMESH.FT_LogicalOR or - SMESH.FT_Undefined - Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, - SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria - - Returns: - SMESH.Filter.Criterion - - href="../tui_filters_page.html#combining_filters" - """ + """ + Create a criterion by the given parameters + Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) + + Parameters: + elementType: the :class:`type of elements ` (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + CritType: the type of criterion :class:`SMESH.FunctorType` (SMESH.FT_Taper, SMESH.FT_Area, etc.). + Note that the items starting from FT_LessThan are not suitable for *CritType*. + Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} + Threshold: the threshold value (range of ids as string, shape, numeric) + UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined + BinaryOp: a binary logical operation SMESH.FT_LogicalAND, SMESH.FT_LogicalOR or + SMESH.FT_Undefined + Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, + SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria + + Returns: + :class:`SMESH.Filter.Criterion` + + Example: :ref:`combining_filters` + """ if not CritType in SMESH.FunctorType._items: raise TypeError, "CritType should be of SMESH.FunctorType" @@ -950,26 +967,26 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): UnaryOp=FT_Undefined, Tolerance=1e-07, mesh=None): - """ - Create a filter with the given parameters - - Parameters: - elementType: the type of elements (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - CritType: the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) - Type SMESH.FunctorType._items in the Python Console to see all values. - Note that the items starting from FT_LessThan are not suitable for CritType. - Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} - Threshold: the threshold value (range of ids as string, shape, numeric) - UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined - Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, - SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces and SMESH.FT_EqualNodes criteria - mesh: the mesh to initialize the filter with - - Returns: - SMESH_Filter - - `Example of Filters usage <../tui_filters_page.html#tui_filters>`_ - """ + """ + Create a filter with the given parameters + + Parameters: + elementType: the :class:`type of elements ` (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + CritType: the :class:`type of criterion ` (SMESH.FT_Taper, SMESH.FT_Area, etc.). + Note that the items starting from FT_LessThan are not suitable for CritType. + Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} + Threshold: the threshold value (range of ids as string, shape, numeric) + UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined + Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, + SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces and SMESH.FT_EqualNodes criteria + mesh: the mesh to initialize the filter with + + Returns: + :class:`SMESH.Filter` + + Examples: + See :doc:`Filters usage examples ` + """ aCriterion = self.GetCriterion(elementType, CritType, Compare, Threshold, UnaryOp, FT_Undefined,Tolerance) aFilterMgr = self.CreateFilterManager() @@ -984,18 +1001,19 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return aFilter def GetFilterFromCriteria(self,criteria, binOp=SMESH.FT_LogicalAND): - """ - Create a filter from criteria + """ + Create a filter from criteria - Parameters: - criteria: a list of criteria - binOp: binary operator used when binary operator of criteria is undefined + Parameters: + criteria: a list of :class:`SMESH.Filter.Criterion` + binOp: binary operator used when binary operator of criteria is undefined - Returns: - SMESH_Filter + Returns: + :class:`SMESH.Filter` - `Example of Filters usage <../tui_filters_page.html#tui_filters>`_ - """ + Examples: + See :doc:`Filters usage examples ` + """ for i in range( len( criteria ) - 1 ): if criteria[i].BinaryOp == self.EnumToLong( SMESH.FT_Undefined ): @@ -1007,17 +1025,16 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return aFilter def GetFunctor(self,theCriterion): - """ - Create a numerical functor by its type + """ + Create a numerical functor by its type - Parameters: - theCriterion: functor type - an item of SMESH.FunctorType enumeration. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + theCriterion (SMESH.FunctorType): functor type. + Note that not all items correspond to numerical functors. - Returns: - SMESH_NumericalFunctor - """ + Returns: + :class:`SMESH.NumericalFunctor` + """ if isinstance( theCriterion, SMESH._objref_NumericalFunctor ): return theCriterion @@ -1063,23 +1080,22 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return functor def CreateHypothesis(self, theHType, theLibName="libStdMeshersEngine.so"): - """ - Create hypothesis + """ + Create hypothesis - Parameters: - theHType: mesh hypothesis type (string) - theLibName: mesh plug-in library name + Parameters: + theHType (string): mesh hypothesis type + theLibName (string): mesh plug-in library name - Returns: - created hypothesis instance - """ + Returns: + created hypothesis instance + """ hyp = SMESH._objref_SMESH_Gen.CreateHypothesis(self, theHType, theLibName ) if isinstance( hyp, SMESH._objref_SMESH_Algo ): return hyp # wrap hypothesis methods - #print "HYPOTHESIS", theHType for meth_name in dir( hyp.__class__ ): if not meth_name.startswith("Get") and \ not meth_name in dir ( SMESH._objref_SMESH_Hypothesis ): @@ -1090,12 +1106,14 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return hyp def GetMeshInfo(self, obj): - """ - Get the mesh statistic + """ + Get the mesh statistic. + Use :meth:`smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. - Returns: - dictionary "element type" - "count of elements" - """ + Returns: + dictionary { :class:`SMESH.EntityType` - "count of elements" } + """ if isinstance( obj, Mesh ): obj = obj.GetMesh() @@ -1108,23 +1126,26 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return d def MinDistance(self, src1, src2=None, id1=0, id2=0, isElem1=False, isElem2=False): - """ - Get minimum distance between two objects + """ + Get minimum distance between two objects - If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. - If *src2* None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. + * If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. + * If *src2* is None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. - Parameters: - src1: first source object - src2: second source object - id1: node/element id from the first source - id2: node/element id from the second (or first) source - isElem1: *True* if *id1* is element id, *False* if it is node id - isElem2: *True* if *id2* is element id, *False* if it is node id + Parameters: + src1 (SMESH.SMESH_IDSource): first source object + src2 (SMESH.SMESH_IDSource): second source object + id1 (int): node/element id from the first source + id2 (int): node/element id from the second (or first) source + isElem1 (boolean): *True* if *id1* is element id, *False* if it is node id + isElem2 (boolean): *True* if *id2* is element id, *False* if it is node id + + Returns: + minimum distance value - Returns: - minimum distance value *GetMinDistance()* - """ + See also: + :meth:`GetMinDistance` + """ result = self.GetMinDistance(src1, src2, id1, id2, isElem1, isElem2) if result is None: @@ -1134,24 +1155,25 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def GetMinDistance(self, src1, src2=None, id1=0, id2=0, isElem1=False, isElem2=False): - """ - Get measure structure specifying minimum distance data between two objects - - If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. - If *src2* is None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. + """ + Get :class:`SMESH.Measure` structure specifying minimum distance data between two objects + * If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. + * If *src2* is None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. - Parameters: - src1: first source object - src2: second source object - id1: node/element id from the first source - id2: node/element id from the second (or first) source - isElem1: *True* if **id1** is element id, *False* if it is node id - isElem2: *True* if **id2** is element id, *False* if it is node id + Parameters: + src1 (SMESH.SMESH_IDSource): first source object + src2 (SMESH.SMESH_IDSource): second source object + id1 (int): node/element id from the first source + id2 (int): node/element id from the second (or first) source + isElem1 (boolean): *True* if **id1** is element id, *False* if it is node id + isElem2 (boolean): *True* if **id2** is element id, *False* if it is node id - Returns: - Measure structure or None if input data is invalid **MinDistance()** - """ + Returns: + :class:`SMESH.Measure` structure or None if input data is invalid + See also: + :meth:`MinDistance` + """ if isinstance(src1, Mesh): src1 = src1.mesh if isinstance(src2, Mesh): src2 = src2.mesh @@ -1187,15 +1209,18 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def BoundingBox(self, objects): - """ - Get bounding box of the specified object(s) + """ + Get bounding box of the specified object(s) + + Parameters: + objects (SMESH.SMESH_IDSource): single source object or list of source objects - Parameters: - objects: single source object or list of source objects + Returns: + tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) - Returns: - tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) **GetBoundingBox()** - """ + See also: + :meth:`GetBoundingBox` + """ result = self.GetBoundingBox(objects) if result is None: @@ -1205,15 +1230,18 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def GetBoundingBox(self, objects): - """ - Get measure structure specifying bounding box data of the specified object(s) + """ + Get :class:`SMESH.Measure` structure specifying bounding box data of the specified object(s) - Parameters: - objects: single source object or list of source objects + Parameters: + objects (SMESH.SMESH_IDSource): single source object or list of source objects + + Returns: + :class:`SMESH.Measure` structure - Returns: - Measure structure **BoundingBox()** - """ + See also: + :meth:`BoundingBox` + """ if isinstance(objects, tuple): objects = list(objects) @@ -1234,15 +1262,15 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def GetLength(self, obj): - """ - Get sum of lengths of all 1D elements in the mesh object. + """ + Get sum of lengths of all 1D elements in the mesh object. - Parameters: - obj: mesh, submesh or group + Parameters: + obj: :class:`mesh, sub-mesh, group or filter ` - Returns: - sum of lengths of all 1D elements - """ + Returns: + sum of lengths of all 1D elements + """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1252,15 +1280,15 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return value def GetArea(self, obj): - """ - Get sum of areas of all 2D elements in the mesh object. + """ + Get sum of areas of all 2D elements in the mesh object. - Parameters: - obj: mesh, submesh or group + Parameters: + obj: :class:`mesh, sub-mesh, group or filter ` - Returns: - sum of areas of all 2D elements - """ + Returns: + sum of areas of all 2D elements + """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1270,15 +1298,15 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return value def GetVolume(self, obj): - """ - Get sum of volumes of all 3D elements in the mesh object. + """ + Get sum of volumes of all 3D elements in the mesh object. - Parameters: - obj: mesh, submesh or group + Parameters: + obj: :class:`mesh, sub-mesh, group or filter ` - Returns: - sum of volumes of all 3D elements - """ + Returns: + sum of volumes of all 3D elements + """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1292,10 +1320,10 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): Get gravity center of all nodes of the mesh object. Parameters: - obj: mesh, submesh or group + obj: :class:`mesh, sub-mesh, group or filter ` Returns: - Three components of the gravity center: x,y,z + Three components of the gravity center (x,y,z) """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1308,15 +1336,16 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): import omniORB omniORB.registerObjref(SMESH._objref_SMESH_Gen._NP_RepositoryId, smeshBuilder) -"""Registering the new proxy for SMESH_Gen""" +"""Registering the new proxy for SMESH.SMESH_Gen""" def New( study, instance=None, instanceGeom=None): """ - Create a new smeshBuilder instance.The smeshBuilder class provides the Python + Create a new smeshBuilder instance. The smeshBuilder class provides the Python interface to create or load meshes. - Typical use is: + Typical use is:: + import salome salome.salome_init() from salome.smesh import smeshBuilder @@ -1327,7 +1356,7 @@ def New( study, instance=None, instanceGeom=None): instance: CORBA proxy of SMESH Engine. If None, the default Engine is used. instanceGeom: CORBA proxy of GEOM Engine. If None, the default Engine is used. Returns: - smeshBuilder instance + :class:`smeshBuilder` instance """ global engine global smeshInst @@ -1359,18 +1388,18 @@ class Mesh: editor = 0 def __init__(self, smeshpyD, geompyD, obj=0, name=0): - """ - Constructor + """ + Constructor - Create a mesh on the shape *obj* (or an empty mesh if *obj* is equal to 0) and - sets the GUI name of this mesh to *name*. + Create a mesh on the shape *obj* (or an empty mesh if *obj* is equal to 0) and + sets the GUI name of this mesh to *name*. - Parameters: - smeshpyD: an instance of smeshBuilder class - geompyD: an instance of geomBuilder class - obj: Shape to be meshed or SMESH_Mesh object - name: Study name of the mesh - """ + Parameters: + smeshpyD: an instance of smeshBuilder class + geompyD: an instance of geomBuilder class + obj: Shape to be meshed or :class:`SMESH.SMESH_Mesh` object + name: Study name of the mesh + """ self.smeshpyD=smeshpyD self.geompyD=geompyD @@ -1420,21 +1449,21 @@ class Mesh: pass def __del__(self): - """ - Destructor. Clean-up resources - """ + """ + Destructor. Clean-up resources + """ if self.mesh: #self.mesh.UnRegister() pass pass def SetMesh(self, theMesh): - """ - Initialize the Mesh object from an instance of SMESH_Mesh interface + """ + Initialize the Mesh object from an instance of :class:`SMESH.SMESH_Mesh` interface - Parameters: - theMesh: a SMESH_Mesh object - """ + Parameters: + theMesh: a :class:`SMESH.SMESH_Mesh` object + """ # do not call Register() as this prevents mesh servant deletion at closing study @@ -1446,122 +1475,114 @@ class Mesh: pass def GetMesh(self): - """ - Return the mesh, that is an instance of SMESH_Mesh interface + """ + Return the mesh, that is an encapsulated instance of :class:`SMESH.SMESH_Mesh` interface - Returns: - a SMESH_Mesh object - """ + Returns: + a :class:`SMESH.SMESH_Mesh` object + """ return self.mesh def GetName(self): - """ - Get the name of the mesh + """ + Get the name of the mesh - Returns: - the name of the mesh as a string - """ + Returns: + the name of the mesh as a string + """ name = GetName(self.GetMesh()) return name def SetName(self, name): - """ - Set a name to the mesh + """ + Set a name to the mesh - Parameters: - name: a new name of the mesh - """ + Parameters: + name: a new name of the mesh + """ self.smeshpyD.SetName(self.GetMesh(), name) def GetSubMesh(self, geom, name): - """ - Get a sub-mesh object associated to a *geom* geometrical object. - - Parameters: - geom: a geometrical object (shape) - name: a name for the sub-mesh in the Object Browser - - Returns: - an object of type SMESH.SMESH_subMesh, representing a part of mesh, - which lies on the given shape - - The sub-mesh object gives access to the IDs of nodes and elements. - The sub-mesh object has the following methods: - - - SMESH.SMESH_subMesh.GetNumberOfElements() - - SMESH.SMESH_subMesh.GetNumberOfNodes( all ) - - SMESH.SMESH_subMesh.GetElementsId() - - SMESH.SMESH_subMesh.GetElementsByType( ElementType ) - - SMESH.SMESH_subMesh.GetNodesId() - - SMESH.SMESH_subMesh.GetSubShape() - - SMESH.SMESH_subMesh.GetFather() - - SMESH.SMESH_subMesh.GetId() - - Note: - A sub-mesh is implicitly created when a sub-shape is specified at - creating an algorithm, for example: algo1D = mesh.Segment(geom=Edge_1) - creates a sub-mesh on *Edge_1* and assign Wire Discretization algorithm to it. - The created sub-mesh can be retrieved from the algorithm: - submesh = algo1D.GetSubMesh() - """ + """ + Get a sub-mesh object associated to a *geom* geometrical object. + + Parameters: + geom: a geometrical object (shape) + name: a name for the sub-mesh in the Object Browser + + Returns: + an object of type :class:`SMESH.SMESH_subMesh`, representing a part of mesh, + which lies on the given shape + + Note: + A sub-mesh is implicitly created when a sub-shape is specified at + creating an algorithm, for example:: + + algo1D = mesh.Segment(geom=Edge_1) + + creates a sub-mesh on *Edge_1* and assign Wire Discretization algorithm to it. + The created sub-mesh can be retrieved from the algorithm:: + + submesh = algo1D.GetSubMesh() + """ AssureGeomPublished( self, geom, name ) submesh = self.mesh.GetSubMesh( geom, name ) return submesh def GetShape(self): - """ - Return the shape associated to the mesh + """ + Return the shape associated to the mesh - Returns: - a GEOM_Object - """ + Returns: + a GEOM_Object + """ return self.geom def SetShape(self, geom): - """ - Associate the given shape to the mesh (entails the recreation of the mesh) + """ + Associate the given shape to the mesh (entails the recreation of the mesh) - Parameters: - geom: the shape to be meshed (GEOM_Object) - """ + Parameters: + geom: the shape to be meshed (GEOM_Object) + """ self.mesh = self.smeshpyD.CreateMesh(geom) def Load(self): - """ - Load mesh from the study after opening the study - """ + """ + Load mesh from the study after opening the study + """ self.mesh.Load() def IsReadyToCompute(self, theSubObject): - """ - Return true if the hypotheses are defined well + """ + Return true if the hypotheses are defined well - Parameters: - theSubObject: a sub-shape of a mesh shape + Parameters: + theSubObject: a sub-shape of a mesh shape - Returns: - True or False - """ + Returns: + True or False + """ return self.smeshpyD.IsReadyToCompute(self.mesh, theSubObject) def GetAlgoState(self, theSubObject): - """ - Return errors of hypotheses definition. - The list of errors is empty if everything is OK. + """ + Return errors of hypotheses definition. + The list of errors is empty if everything is OK. - Parameters: - theSubObject: a sub-shape of a mesh shape + Parameters: + theSubObject: a sub-shape of a mesh shape - Returns: - a list of errors - """ + Returns: + a list of errors + """ return self.smeshpyD.GetAlgoState(self.mesh, theSubObject) @@ -1576,19 +1597,19 @@ class Mesh: theGeomName: the user-defined name of the geometrical object Returns: - GEOM::GEOM_Object instance + GEOM.GEOM_Object instance """ return self.smeshpyD.GetGeometryByMeshElement( self.mesh, theElementID, theGeomName ) def MeshDimension(self): - """ - Return the mesh dimension depending on the dimension of the underlying shape - or, if the mesh is not based on any shape, basing on deimension of elements + """ + Return the mesh dimension depending on the dimension of the underlying shape + or, if the mesh is not based on any shape, basing on deimension of elements - Returns: - mesh dimension as an integer value [0,3] - """ + Returns: + mesh dimension as an integer value [0,3] + """ if self.mesh.HasShapeToMesh(): shells = self.geompyD.SubShapeAllIDs( self.geom, self.geompyD.ShapeType["SOLID"] ) @@ -1607,14 +1628,15 @@ class Mesh: return 0 def Evaluate(self, geom=0): - """ - Evaluate size of prospective mesh on a shape + """ + Evaluate size of prospective mesh on a shape - Returns: - a list where i-th element is a number of elements of i-th SMESH.EntityType - To know predicted number of e.g. edges, inquire it this way - Evaluate()[ EnumToLong( Entity_Edge )] - """ + Returns: + a list where i-th element is a number of elements of i-th :class:`SMESH.EntityType`. + To know predicted number of e.g. edges, inquire it this way:: + + Evaluate()[ smesh.EnumToLong( SMESH.Entity_Edge )] + """ if geom == 0 or not isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object): if self.geom == 0: @@ -1625,19 +1647,19 @@ class Mesh: def Compute(self, geom=0, discardModifs=False, refresh=False): - """ - Compute the mesh and return the status of the computation + """ + Compute the mesh and return the status of the computation - Parameters: - geom: geomtrical shape on which mesh data should be computed - discardModifs: if True and the mesh has been edited since - a last total re-compute and that may prevent successful partial re-compute, - then the mesh is cleaned before Compute() - refresh: if *True*, Object browser is automatically updated (when running in GUI) + Parameters: + geom: geomtrical shape on which mesh data should be computed + discardModifs: if True and the mesh has been edited since + a last total re-compute and that may prevent successful partial re-compute, + then the mesh is cleaned before Compute() + refresh: if *True*, Object Browser is automatically updated (when running in GUI) - Returns: - True or False - """ + Returns: + True or False + """ if geom == 0 or not isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object): if self.geom == 0: @@ -1744,29 +1766,31 @@ class Mesh: return ok def GetComputeErrors(self, shape=0 ): - """ - Return a list of error messages (SMESH.ComputeError) of the last Compute() - """ + """ + Return a list of error messages (:class:`SMESH.ComputeError`) of the last :meth:`Compute` + """ if shape == 0: shape = self.mesh.GetShapeToMesh() return self.smeshpyD.GetComputeErrors( self.mesh, shape ) def GetSubShapeName(self, subShapeID ): - """ - Return a name of a sub-shape by its ID + """ + Return a name of a sub-shape by its ID. + Possible variants (for *subShapeID* == 3): - Parameters: - subShapeID: a unique ID of a sub-shape + - **"Face_12"** - published sub-shape + - **FACE #3** - not published sub-shape + - **sub-shape #3** - invalid sub-shape ID + - **#3** - error in this function + + Parameters: + subShapeID: a unique ID of a sub-shape - Returns: - a string describing the sub-shape; possible variants: + Returns: + a string describing the sub-shape - - "Face_12" (published sub-shape) - - FACE #3 (not published sub-shape) - - sub-shape #3 (invalid sub-shape ID) - - #3 (error in this function) - """ + """ if not self.mesh.HasShapeToMesh(): return "" @@ -1806,16 +1830,16 @@ class Mesh: return shapeText def GetFailedShapes(self, publish=False): - """ - Return a list of sub-shapes meshing of which failed, grouped into GEOM groups by - error of an algorithm + """ + Return a list of sub-shapes meshing of which failed, grouped into GEOM groups by + error of an algorithm - Parameters: - publish: if *True*, the returned groups will be published in the study + Parameters: + publish: if *True*, the returned groups will be published in the study - Returns: - a list of GEOM groups each named after a failed algorithm - """ + Returns: + a list of GEOM groups each named after a failed algorithm + """ algo2shapes = {} @@ -1855,32 +1879,32 @@ class Mesh: return groups def GetMeshOrder(self): - """ - Return sub-mesh objects list in meshing order + """ + Return sub-mesh objects list in meshing order - Returns: - list of lists of sub-meshes - """ + Returns: + list of lists of :class:`sub-meshes ` + """ return self.mesh.GetMeshOrder() def SetMeshOrder(self, submeshes): - """ - Set order in which concurrent sub-meshes should be meshed + """ + Set order in which concurrent sub-meshes should be meshed - Parameters: - submeshes list of lists of sub-meshes - """ + Parameters: + submeshes: list of lists of :class:`sub-meshes ` + """ return self.mesh.SetMeshOrder(submeshes) def Clear(self, refresh=False): - """ - Remove all nodes and elements generated on geometry. Imported elements remain. + """ + Remove all nodes and elements generated on geometry. Imported elements remain. - Parameters: - refresh if *True*, Object browser is automatically updated (when running in GUI) - """ + Parameters: + refresh: if *True*, Object browser is automatically updated (when running in GUI) + """ self.mesh.Clear() if ( salome.sg.hasDesktop() and @@ -1891,13 +1915,13 @@ class Mesh: if refresh: salome.sg.updateObjBrowser(True) def ClearSubMesh(self, geomId, refresh=False): - """ - Remove all nodes and elements of indicated shape + """ + Remove all nodes and elements of indicated shape - Parameters: - refresh: if *True*, Object browser is automatically updated (when running in GUI) - geomId: the ID of a sub-shape to remove elements on - """ + Parameters: + geomId: the ID of a sub-shape to remove elements on + refresh: if *True*, Object browser is automatically updated (when running in GUI) + """ self.mesh.ClearSubMesh(geomId) if salome.sg.hasDesktop(): @@ -1907,15 +1931,15 @@ class Mesh: if refresh: salome.sg.updateObjBrowser(True) def AutomaticTetrahedralization(self, fineness=0): - """ - Compute a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron + """ + Compute a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron - Parameters: - fineness: [0.0,1.0] defines mesh fineness + Parameters: + fineness: [0.0,1.0] defines mesh fineness - Returns: - True or False - """ + Returns: + True or False + """ dim = self.MeshDimension() # assign hypotheses @@ -1930,15 +1954,15 @@ class Mesh: return self.Compute() def AutomaticHexahedralization(self, fineness=0): - """ - Compute an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron + """ + Compute an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron - Parameters: - fineness [0.0, 1.0] defines mesh fineness + Parameters: + fineness: [0.0, 1.0] defines mesh fineness - Returns: - True or False - """ + Returns: + True or False + """ dim = self.MeshDimension() # assign the hypotheses @@ -1953,16 +1977,16 @@ class Mesh: return self.Compute() def AddHypothesis(self, hyp, geom=0): - """ - Assign a hypothesis + """ + Assign a hypothesis - Parameters: - hyp: a hypothesis to assign - geom: a subhape of mesh geometry + Parameters: + hyp: a hypothesis to assign + geom: a subhape of mesh geometry - Returns: - SMESH.Hypothesis_Status - """ + Returns: + :class:`SMESH.Hypothesis_Status` + """ if isinstance( hyp, geomBuilder.GEOM._objref_GEOM_Object ): hyp, geom = geom, hyp @@ -1997,16 +2021,16 @@ class Mesh: return status def IsUsedHypothesis(self, hyp, geom): - """ - Return True if an algorithm of hypothesis is assigned to a given shape + """ + Return True if an algorithm or hypothesis is assigned to a given shape - Parameters: - hyp: a hypothesis to check - geom: a subhape of mesh geometry + Parameters: + hyp: an algorithm or hypothesis to check + geom: a subhape of mesh geometry - Returns: - True of False - """ + Returns: + True of False + """ if not hyp: # or not geom return False @@ -2020,16 +2044,16 @@ class Mesh: return False def RemoveHypothesis(self, hyp, geom=0): - """ - Unassign a hypothesis + """ + Unassign a hypothesis - Parameters: - hyp: a hypothesis to unassign - geom: a sub-shape of mesh geometry + Parameters: + hyp (SMESH.SMESH_Hypothesis): a hypothesis to unassign + geom (GEOM.GEOM_Object): a sub-shape of mesh geometry - Returns: - SMESH.Hypothesis_Status - """ + Returns: + :class:`SMESH.Hypothesis_Status` + """ if not hyp: return None @@ -2048,22 +2072,22 @@ class Mesh: return None def GetHypothesisList(self, geom): - """ - Get the list of hypotheses added on a geometry + """ + Get the list of hypotheses added on a geometry - Parameters: - geom: a sub-shape of mesh geometry + Parameters: + geom (GEOM.GEOM_Object): a sub-shape of mesh geometry - Returns: - the sequence of SMESH_Hypothesis - """ + Returns: + the sequence of :class:`SMESH.SMESH_Hypothesis` + """ return self.mesh.GetHypothesisList( geom ) def RemoveGlobalHypotheses(self): - """ - Remove all global hypotheses - """ + """ + Remove all global hypotheses + """ current_hyps = self.mesh.GetHypothesisList( self.geom ) for hyp in current_hyps: @@ -2073,36 +2097,35 @@ class Mesh: def ExportMED(self, f, auto_groups=0, version=MED_V2_2, overwrite=1, meshPart=None, autoDimension=True, fields=[], geomAssocFields=''): - """ - Export the mesh in a file in MED format - allowing to overwrite the file if it exists or add the exported data to its contents - - Parameters: - f: is the file name - auto_groups: boolean parameter for creating/not creating - the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; - the typical use is auto_groups=False. - version: MED format version (MED_V2_1 or MED_V2_2, - the latter meaning any current version). The parameter is - obsolete since MED_V2_1 is no longer supported. - overwrite: boolean parameter for overwriting/not overwriting the file - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - autoDimension: if *True* (default), a space dimension of a MED mesh can be either - - - 1D if all mesh nodes lie on OX coordinate axis, or - - 2D if all mesh nodes lie on XOY coordinate plane, or - - 3D in the rest cases. - - If *autoDimension* is *False*, the space dimension is always 3. - fields: list of GEOM fields defined on the shape to mesh. - geomAssocFields: each character of this string means a need to export a - corresponding field; correspondence between fields and characters is following: - - - 'v' stands for "_vertices _" field; - - 'e' stands for "_edges _" field; - - 'f' stands for "_faces _" field; - - 's' stands for "_solids _" field. - """ + """ + Export the mesh in a file in MED format + allowing to overwrite the file if it exists or add the exported data to its contents + + Parameters: + f: is the file name + auto_groups: boolean parameter for creating/not creating + the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; + the typical use is auto_groups=False. + version: MED format version (MED_V2_1 or MED_V2_2, + the latter meaning any current version). The parameter is + obsolete since MED_V2_1 is no longer supported. + overwrite: boolean parameter for overwriting/not overwriting the file + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + autoDimension: if *True* (default), a space dimension of a MED mesh can be either + + - 1D if all mesh nodes lie on OX coordinate axis, or + - 2D if all mesh nodes lie on XOY coordinate plane, or + - 3D in the rest cases. + + If *autoDimension* is *False*, the space dimension is always 3. + fields: list of GEOM fields defined on the shape to mesh. + geomAssocFields: each character of this string means a need to export a + corresponding field; correspondence between fields and characters is following: + - 'v' stands for "_vertices _" field; + - 'e' stands for "_edges _" field; + - 'f' stands for "_faces _" field; + - 's' stands for "_solids _" field. + """ if meshPart or fields or geomAssocFields: unRegister = genObjUnRegister() @@ -2115,27 +2138,27 @@ class Mesh: self.mesh.ExportToMEDX(f, auto_groups, version, overwrite, autoDimension) def ExportSAUV(self, f, auto_groups=0): - """ - Export the mesh in a file in SAUV format + """ + Export the mesh in a file in SAUV format - Parameters: - f: is the file name - auto_groups: boolean parameter for creating/not creating - the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; - the typical use is auto_groups=false. - """ + Parameters: + f: is the file name + auto_groups: boolean parameter for creating/not creating + the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; + the typical use is auto_groups=False. + """ self.mesh.ExportSAUV(f, auto_groups) def ExportDAT(self, f, meshPart=None): - """ - Export the mesh in a file in DAT format + """ + Export the mesh in a file in DAT format - Parameters: - f: the file name - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: the file name + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ if meshPart: unRegister = genObjUnRegister() @@ -2147,13 +2170,13 @@ class Mesh: self.mesh.ExportDAT(f) def ExportUNV(self, f, meshPart=None): - """ - Export the mesh in a file in UNV format + """ + Export the mesh in a file in UNV format - Parameters: - f: the file name - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: the file name + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ if meshPart: unRegister = genObjUnRegister() @@ -2165,14 +2188,14 @@ class Mesh: self.mesh.ExportUNV(f) def ExportSTL(self, f, ascii=1, meshPart=None): - """ - Export the mesh in a file in STL format + """ + Export the mesh in a file in STL format - Parameters: - f: the file name - ascii: defines the file encoding - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: the file name + ascii: defines the file encoding + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ if meshPart: unRegister = genObjUnRegister() @@ -2184,17 +2207,17 @@ class Mesh: self.mesh.ExportSTL(f, ascii) def ExportCGNS(self, f, overwrite=1, meshPart=None, groupElemsByType=False): - """ - Export the mesh in a file in CGNS format - - Parameters: - f: is the file name - overwrite: boolean parameter for overwriting/not overwriting the file - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - groupElemsByType: if true all elements of same entity type are exported at ones, - else elements are exported in order of their IDs which can cause creation - of multiple cgns sections - """ + """ + Export the mesh in a file in CGNS format + + Parameters: + f: is the file name + overwrite: boolean parameter for overwriting/not overwriting the file + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + groupElemsByType: if True all elements of same entity type are exported at ones, + else elements are exported in order of their IDs which can cause creation + of multiple cgns sections + """ unRegister = genObjUnRegister() if isinstance( meshPart, list ): @@ -2207,15 +2230,15 @@ class Mesh: self.mesh.ExportCGNS(meshPart, f, overwrite, groupElemsByType) def ExportGMF(self, f, meshPart=None): - """ - Export the mesh in a file in GMF format. - GMF files must have .mesh extension for the ASCII format and .meshb for - the bynary format. Other extensions are not allowed. + """ + Export the mesh in a file in GMF format. + GMF files must have .mesh extension for the ASCII format and .meshb for + the bynary format. Other extensions are not allowed. - Parameters: - f: is the file name - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: is the file name + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ unRegister = genObjUnRegister() if isinstance( meshPart, list ): @@ -2228,27 +2251,27 @@ class Mesh: self.mesh.ExportGMF(meshPart, f, True) def ExportToMED(self, f, version=MED_V2_2, opt=0, overwrite=1, autoDimension=True): - """ - Deprecated, used only for compatibility! Please, use ExportMED() method instead. - Export the mesh in a file in MED format - allowing to overwrite the file if it exists or add the exported data to its contents - - Parameters: - f: the file name - version: MED format version (MED_V2_1 or MED_V2_2, - the latter meaning any current version). The parameter is - obsolete since MED_V2_1 is no longer supported. - opt: boolean parameter for creating/not creating - the groups Group_On_All_Nodes, Group_On_All_Faces, ... - overwrite: boolean parameter for overwriting/not overwriting the file - autoDimension: if *True* (default), a space dimension of a MED mesh can be either - - - 1D if all mesh nodes lie on OX coordinate axis, or - - 2D if all mesh nodes lie on XOY coordinate plane, or - - 3D in the rest cases. - - If **autoDimension** isc **False**, the space dimension is always 3. - """ + """ + Deprecated, used only for compatibility! Please, use :meth:`ExportMED` method instead. + Export the mesh in a file in MED format + allowing to overwrite the file if it exists or add the exported data to its contents + + Parameters: + f: the file name + version: MED format version (MED_V2_1 or MED_V2_2, + the latter meaning any current version). The parameter is + obsolete since MED_V2_1 is no longer supported. + opt: boolean parameter for creating/not creating + the groups Group_On_All_Nodes, Group_On_All_Faces, ... + overwrite: boolean parameter for overwriting/not overwriting the file + autoDimension: if *True* (default), a space dimension of a MED mesh can be either + + - 1D if all mesh nodes lie on OX coordinate axis, or + - 2D if all mesh nodes lie on XOY coordinate plane, or + - 3D in the rest cases. + + If **autoDimension** is *False*, the space dimension is always 3. + """ self.mesh.ExportToMEDX(f, opt, version, overwrite, autoDimension) @@ -2256,56 +2279,55 @@ class Mesh: # ---------------------- def CreateEmptyGroup(self, elementType, name): - """ - Create an empty mesh group + """ + Create an empty mesh group - Parameters: - elementType: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - name: the name of the mesh group + Parameters: + elementType: the :class:`type ` of elements in the group; + either of (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + name: the name of the mesh group - Returns: - SMESH_Group - """ + Returns: + :class:`SMESH.SMESH_Group` + """ return self.mesh.CreateGroup(elementType, name) def Group(self, grp, name=""): - """ - Create a mesh group based on the geometric object *grp* - and gives a *name*, - if this parameter is not defined - the name is the same as the geometric group name + """ + Create a mesh group based on the geometric object *grp* + and give it a *name*. + If *name* is not defined the name of the geometric group is used - Note: - Works like GroupOnGeom(). + Note: + Works like :meth:`GroupOnGeom`. - Parameters: - grp: a geometric group, a vertex, an edge, a face or a solid - name: the name of the mesh group + Parameters: + grp: a geometric group, a vertex, an edge, a face or a solid + name: the name of the mesh group - Returns: - SMESH_GroupOnGeom - """ + Returns: + :class:`SMESH.SMESH_GroupOnGeom` + """ return self.GroupOnGeom(grp, name) def GroupOnGeom(self, grp, name="", typ=None): - """ - Create a mesh group based on the geometrical object *grp* - and gives a *name*, - if this parameter is not defined the name is the same as the geometrical group name - - Parameters: - grp: a geometrical group, a vertex, an edge, a face or a solid - name: the name of the mesh group - typ: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). If not set, it is - automatically detected by the type of the geometry - - Returns: - SMESH_GroupOnGeom - """ + """ + Create a mesh group based on the geometrical object *grp* + and gives a *name*. + if *name* is not defined the name of the geometric group is used + + Parameters: + grp: a geometrical group, a vertex, an edge, a face or a solid + name: the name of the mesh group + typ: the type of elements in the group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). If not set, it is + automatically detected by the type of the geometry + + Returns: + :class:`SMESH.SMESH_GroupOnGeom` + """ AssureGeomPublished( self, grp, name ) if name == "": @@ -2315,9 +2337,9 @@ class Mesh: return self.mesh.CreateGroupFromGEOM(typ, name, grp) def _groupTypeFromShape( self, shape ): - """ - Pivate method to get a type of group on geometry - """ + """ + Pivate method to get a type of group on geometry + """ tgeo = str(shape.GetShapeType()) if tgeo == "VERTEX": typ = NODE @@ -2338,36 +2360,36 @@ class Mesh: return typ def GroupOnFilter(self, typ, name, filter): - """ - Create a mesh group with given *name* based on the *filter* which - is a special type of group dynamically updating it's contents during - mesh modification + """ + Create a mesh group with given *name* based on the *filter* which + is a special type of group dynamically updating it's contents during + mesh modification - Parameters: - typ: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - name: the name of the mesh group - filter: the filter defining group contents + Parameters: + typ: the type of elements in the group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). + name: the name of the mesh group + filter (SMESH.Filter): the filter defining group contents - Returns: - SMESH_GroupOnFilter - """ + Returns: + :class:`SMESH.SMESH_GroupOnFilter` + """ return self.mesh.CreateGroupFromFilter(typ, name, filter) def MakeGroupByIds(self, groupName, elementType, elemIDs): - """ - Create a mesh group by the given ids of elements + """ + Create a mesh group by the given ids of elements - Parameters: - groupName: the name of the mesh group - elementType: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - elemIDs: either the list of ids, group, sub-mesh, or filter + Parameters: + groupName: the name of the mesh group + elementType: the type of elements in the group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). + elemIDs: either the list of ids, :class:`mesh, sub-mesh, group or filter ` - Returns: - SMESH_Group - """ + Returns: + :class:`SMESH.SMESH_Group` + """ group = self.mesh.CreateGroup(elementType, groupName) if isinstance( elemIDs, Mesh ): @@ -2388,71 +2410,79 @@ class Mesh: Threshold="", UnaryOp=FT_Undefined, Tolerance=1e-07): - """ - Create a mesh group by the given conditions - - Parameters: - groupName: the name of the mesh group - elementType: the type of elements(SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - CritType: the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) - Type SMESH.FunctorType._items in the Python Console to see all values. - Note that the items starting from FT_LessThan are not suitable for CritType. - Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} - Threshold: the threshold value (range of ids as string, shape, numeric) - UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined - Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, - SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria - - Returns: - SMESH_GroupOnFilter - """ + """ + Create a mesh group by the given conditions + + Parameters: + groupName: the name of the mesh group + elementType (SMESH.ElementType): the type of elements (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + CritType (SMESH.FunctorType): the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.). + Note that the items starting from FT_LessThan are not suitable for CritType. + Compare (SMESH.FunctorType): belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} + Threshold: the threshold value (range of ids as string, shape, numeric, depending on *CritType*) + UnaryOp (SMESH.FunctorType): SMESH.FT_LogicalNOT or SMESH.FT_Undefined + Tolerance (float): the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, + SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria + + Returns: + :class:`SMESH.SMESH_GroupOnFilter` + """ aCriterion = self.smeshpyD.GetCriterion(elementType, CritType, Compare, Threshold, UnaryOp, FT_Undefined,Tolerance) group = self.MakeGroupByCriterion(groupName, aCriterion) return group def MakeGroupByCriterion(self, groupName, Criterion): - """ - Create a mesh group by the given criterion + """ + Create a mesh group by the given criterion - Parameters: - groupName: the name of the mesh group - Criterion: the instance of Criterion class + Parameters: + groupName: the name of the mesh group + Criterion: the instance of :class:`SMESH.Filter.Criterion` class - Returns: - SMESH_GroupOnFilter - """ + Returns: + :class:`SMESH.SMESH_GroupOnFilter` + + See Also: + :meth:`smeshBuilder.GetCriterion` + """ return self.MakeGroupByCriteria( groupName, [Criterion] ) def MakeGroupByCriteria(self, groupName, theCriteria, binOp=SMESH.FT_LogicalAND): - """ - Create a mesh group by the given criteria (list of criteria) + """ + Create a mesh group by the given criteria (list of :class:`SMESH.Filter.Criterion`) - Parameters: - groupName: the name of the mesh group - theCriteria: the list of criteria - binOp: binary operator used when binary operator of criteria is undefined + Parameters: + groupName: the name of the mesh group + theCriteria: the list of :class:`SMESH.Filter.Criterion` + binOp: binary operator (SMESH.FT_LogicalAND or SMESH.FT_LogicalOR ) used when binary operator of criteria is undefined - Returns: - SMESH_GroupOnFilter - """ + Returns: + :class:`SMESH.SMESH_GroupOnFilter` + + See Also: + :meth:`smeshBuilder.GetCriterion` + """ aFilter = self.smeshpyD.GetFilterFromCriteria( theCriteria, binOp ) group = self.MakeGroupByFilter(groupName, aFilter) return group def MakeGroupByFilter(self, groupName, theFilter): - """ - Create a mesh group by the given filter + """ + Create a mesh group by the given filter - Parameters: - groupName: the name of the mesh group - theFilter: the instance of Filter class + Parameters: + groupName (string): the name of the mesh group + theFilter (SMESH.Filter): the filter + + Returns: + :class:`SMESH.SMESH_GroupOnFilter` - Returns: - SMESH_GroupOnFilter - """ + See Also: + :meth:`smeshBuilder.GetFilter` + """ #group = self.CreateEmptyGroup(theFilter.GetElementType(), groupName) #theFilter.SetMesh( self.mesh ) @@ -2461,32 +2491,37 @@ class Mesh: return group def RemoveGroup(self, group): - """ - Remove a group - """ + """ + Remove a group + + Parameters: + group (SMESH.SMESH_GroupBase): group to remove + """ self.mesh.RemoveGroup(group) def RemoveGroupWithContents(self, group): - """ - Remove a group with its contents - """ + """ + Remove a group with its contents + + Parameters: + group (SMESH.SMESH_GroupBase): group to remove + """ self.mesh.RemoveGroupWithContents(group) def GetGroups(self, elemType = SMESH.ALL): - """ - Get the list of groups existing in the mesh in the order - of creation (starting from the oldest one) + """ + Get the list of groups existing in the mesh in the order + of creation (starting from the oldest one) - Parameters: - elemType: type of elements the groups contain; either of - (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); - by default groups of elements of all types are returned + Parameters: + elemType (SMESH.ElementType): type of elements the groups contain; + by default groups of elements of all types are returned - Returns: - a sequence of SMESH_GroupBase - """ + Returns: + a sequence of :class:`SMESH.SMESH_GroupBase` + """ groups = self.mesh.GetGroups() if elemType == SMESH.ALL: @@ -2500,22 +2535,22 @@ class Mesh: return typedGroups def NbGroups(self): - """ - Get the number of groups existing in the mesh + """ + Get the number of groups existing in the mesh - Returns: - the quantity of groups as an integer value - """ + Returns: + the quantity of groups as an integer value + """ return self.mesh.NbGroups() def GetGroupNames(self): - """ - Get the list of names of groups existing in the mesh + """ + Get the list of names of groups existing in the mesh - Returns: - list of strings - """ + Returns: + list of strings + """ groups = self.GetGroups() names = [] @@ -2524,19 +2559,18 @@ class Mesh: return names def GetGroupByName(self, name, elemType = None): - """ - Find groups by name and type + """ + Find groups by name and type - Parameters: - name: name of the group of interest - elemType: type of elements the groups contain; either of - (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); - by default one group of any type of elements is returned - if elemType == SMESH.ALL then all groups of any type are returned + Parameters: + name (string): name of the group of interest + elemType (SMESH.ElementType): type of elements the groups contain; + by default one group of any type is returned; + if elemType == SMESH.ALL then all groups of any type are returned - Returns: - a list of SMESH_GroupBase's - """ + Returns: + a list of :class:`SMESH.SMESH_GroupBase` + """ groups = [] for group in self.GetGroups(): @@ -2549,105 +2583,126 @@ class Mesh: return groups def UnionGroups(self, group1, group2, name): - """ - Produce a union of two groups. - A new group is created. All mesh elements that are - present in the initial groups are added to the new one + """ + Produce a union of two groups. + A new group is created. All mesh elements that are + present in the initial groups are added to the new one - Parameters: - an instance of SMESH_Group - """ + Parameters: + group1 (SMESH.SMESH_GroupBase): a group + group2 (SMESH.SMESH_GroupBase): another group + + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.UnionGroups(group1, group2, name) def UnionListOfGroups(self, groups, name): - """ - Produce a union list of groups. - New group is created. All mesh elements that are present in - initial groups are added to the new one + """ + Produce a union list of groups. + New group is created. All mesh elements that are present in + initial groups are added to the new one + Parameters: + groups: list of :class:`SMESH.SMESH_GroupBase` - Returns: - an instance of SMESH_Group - """ + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.UnionListOfGroups(groups, name) def IntersectGroups(self, group1, group2, name): - """ - Prodice an intersection of two groups. - A new group is created. All mesh elements that are common - for the two initial groups are added to the new one. + """ + Prodice an intersection of two groups. + A new group is created. All mesh elements that are common + for the two initial groups are added to the new one. - Returns: - an instance of SMESH_Group - """ + Parameters: + group1 (SMESH.SMESH_GroupBase): a group + group2 (SMESH.SMESH_GroupBase): another group + + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.IntersectGroups(group1, group2, name) def IntersectListOfGroups(self, groups, name): - """ - Produce an intersection of groups. - New group is created. All mesh elements that are present in all - initial groups simultaneously are added to the new one + """ + Produce an intersection of groups. + New group is created. All mesh elements that are present in all + initial groups simultaneously are added to the new one + + Parameters: + groups: a list of :class:`SMESH.SMESH_GroupBase` - Returns: - an instance of SMESH_Group - """ + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.IntersectListOfGroups(groups, name) def CutGroups(self, main_group, tool_group, name): - """ - Produce a cut of two groups. - A new group is created. All mesh elements that are present in - the main group but are not present in the tool group are added to the new one + """ + Produce a cut of two groups. + A new group is created. All mesh elements that are present in + the main group but are not present in the tool group are added to the new one + + Parameters: + main_group (SMESH.SMESH_GroupBase): a group to cut from + tool_group (SMESH.SMESH_GroupBase): a group to cut by - Returns: - an instance of SMESH_Group - """ + Returns: + an instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.CutGroups(main_group, tool_group, name) def CutListOfGroups(self, main_groups, tool_groups, name): - """ - Produce a cut of groups. - A new group is created. All mesh elements that are present in main groups - but do not present in tool groups are added to the new one + """ + Produce a cut of groups. + A new group is created. All mesh elements that are present in main groups + but do not present in tool groups are added to the new one - Returns: - an instance of SMESH_Group - """ + Parameters: + main_group: groups to cut from (list of :class:`SMESH.SMESH_GroupBase`) + tool_group: groups to cut by (list of :class:`SMESH.SMESH_GroupBase`) + + Returns: + an instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.CutListOfGroups(main_groups, tool_groups, name) def CreateDimGroup(self, groups, elemType, name, nbCommonNodes = SMESH.ALL_NODES, underlyingOnly = True): - """ - Create a standalone group of entities basing on nodes of other groups. - - Parameters: - groups: list of reference groups, sub-meshes or filters, of any type. - elemType: a type of elements to include to the new group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - name: a name of the new group. - nbCommonNodes: a criterion of inclusion of an element to the new group - basing on number of element nodes common with reference *groups*. - Meaning of possible values are: - - - SMESH.ALL_NODES - include if all nodes are common, - - SMESH.MAIN - include if all corner nodes are common (meaningful for a quadratic mesh), - - SMESH.AT_LEAST_ONE - include if one or more node is common, - - SMEHS.MAJORITY - include if half of nodes or more are common. - underlyingOnly: if *True* (default), an element is included to the - new group provided that it is based on nodes of an element of *groups*; - in this case the reference *groups* are supposed to be of higher dimension - than *elemType*, which can be useful for example to get all faces lying on - volumes of the reference *groups*. - - Returns: - an instance of SMESH_Group - """ + """ + Create a standalone group of entities basing on nodes of other groups. + + Parameters: + groups: list of reference :class:`sub-meshes, groups or filters `, of any type. + elemType: a type of elements to include to the new group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). + name: a name of the new group. + nbCommonNodes: a criterion of inclusion of an element to the new group + basing on number of element nodes common with reference *groups*. + Meaning of possible values are: + + - SMESH.ALL_NODES - include if all nodes are common, + - SMESH.MAIN - include if all corner nodes are common (meaningful for a quadratic mesh), + - SMESH.AT_LEAST_ONE - include if one or more node is common, + - SMEHS.MAJORITY - include if half of nodes or more are common. + underlyingOnly: if *True* (default), an element is included to the + new group provided that it is based on nodes of an element of *groups*; + in this case the reference *groups* are supposed to be of higher dimension + than *elemType*, which can be useful for example to get all faces lying on + volumes of the reference *groups*. + + Returns: + an instance of :class:`SMESH.SMESH_Group` + """ if isinstance( groups, SMESH._objref_SMESH_IDSource ): groups = [groups] @@ -2655,9 +2710,9 @@ class Mesh: def ConvertToStandalone(self, group): - """ - Convert group on geom into standalone group - """ + """ + Convert group on geom into standalone group + """ return self.mesh.ConvertToStandalone(group) @@ -2665,113 +2720,110 @@ class Mesh: # ------------------------ def GetLog(self, clearAfterGet): - """ - Return the log of nodes and elements added or removed - since the previous clear of the log. + """ + Return the log of nodes and elements added or removed + since the previous clear of the log. - Parameters: - clearAfterGet: log is emptied after Get (safe if concurrents access) + Parameters: + clearAfterGet: log is emptied after Get (safe if concurrents access) - Returns: - list of log_block structures: - commandType - number - coords - indexes - """ + Returns: + list of SMESH.log_block structures { commandType, number, coords, indexes } + """ return self.mesh.GetLog(clearAfterGet) def ClearLog(self): - """ - Clear the log of nodes and elements added or removed since the previous - clear. Must be used immediately after GetLog if clearAfterGet is false. - """ + """ + Clear the log of nodes and elements added or removed since the previous + clear. Must be used immediately after :meth:`GetLog` if clearAfterGet is false. + """ self.mesh.ClearLog() def SetAutoColor(self, theAutoColor): - """ - Toggle auto color mode on the object. + """ + Toggle auto color mode on the object. + If switched on, a default color of a new group in Create Group dialog is chosen randomly. - Parameters: - theAutoColor: the flag which toggles auto color mode. - If switched on, a default color of a new group in Create Group dialog is chosen randomly. - """ + Parameters: + theAutoColor (boolean): the flag which toggles auto color mode. + """ self.mesh.SetAutoColor(theAutoColor) def GetAutoColor(self): - """ - Get flag of object auto color mode. + """ + Get flag of object auto color mode. - Returns: - True or False - """ + Returns: + True or False + """ return self.mesh.GetAutoColor() def GetId(self): - """ - Get the internal ID + """ + Get the internal ID Returns: integer value, which is the internal Id of the mesh - """ + """ return self.mesh.GetId() def GetStudyId(self): - """ - Get the study Id + """ + Get the study Id Returns: integer value, which is the study Id of the mesh - """ + """ return self.mesh.GetStudyId() def HasDuplicatedGroupNamesMED(self): - """ - Check the group names for duplications. - Consider the maximum group name length stored in MED file. + """ + Check the group names for duplications. + Consider the maximum group name length stored in MED file. Returns: True or False - """ + """ return self.mesh.HasDuplicatedGroupNamesMED() def GetMeshEditor(self): - """ - Obtain the mesh editor tool + """ + Obtain the mesh editor tool Returns: - an instance of SMESH_MeshEditor - """ + an instance of :class:`SMESH.SMESH_MeshEditor` + """ return self.editor def GetIDSource(self, ids, elemType = SMESH.ALL): - """ - Wrap a list of IDs of elements or nodes into SMESH_IDSource which - can be passed as argument to a method accepting mesh, group or sub-mesh + """ + Wrap a list of IDs of elements or nodes into :class:`SMESH.SMESH_IDSource` which + can be passed as argument to a method accepting :class:`mesh, sub-mesh, group or filter ` - Parameters: - ids: list of IDs - lemType: type of elements; this parameter is used to distinguish - IDs of nodes from IDs of elements; by default ids are treated as - IDs of elements; use SMESH.NODE if ids are IDs of nodes. + Parameters: + ids: list of IDs + elemType: type of elements; this parameter is used to distinguish + IDs of nodes from IDs of elements; by default ids are treated as + IDs of elements; use SMESH.NODE if ids are IDs of nodes. Returns: - an instance of SMESH_IDSource + an instance of :class:`SMESH.SMESH_IDSource` + + Warning: + call UnRegister() for the returned object as soon as it is no more useful:: - Warning: - call UnRegister() for the returned object as soon as it is no more useful: - idSrc = mesh.GetIDSource( [1,3,5], SMESH.NODE ) - mesh.DoSomething( idSrc ) - idSrc.UnRegister() - """ + idSrc = mesh.GetIDSource( [1,3,5], SMESH.NODE ) + mesh.DoSomething( idSrc ) + idSrc.UnRegister() + """ if isinstance( ids, int ): ids = [ids] @@ -2782,43 +2834,45 @@ class Mesh: # ------------------------------------ def GetMeshInfo(self, obj = None): - """ - Get the mesh statistic + """ + Get the mesh statistic. + Use :meth:`smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. Returns: - dictionary type element - count of elements - """ + dictionary { :class:`SMESH.EntityType` - "count of elements" } + """ if not obj: obj = self.mesh return self.smeshpyD.GetMeshInfo(obj) def NbNodes(self): - """ - Return the number of nodes in the mesh + """ + Return the number of nodes in the mesh Returns: an integer value - """ + """ return self.mesh.NbNodes() def NbElements(self): - """ - Return the number of elements in the mesh + """ + Return the number of elements in the mesh Returns: an integer value - """ + """ return self.mesh.NbElements() def Nb0DElements(self): - """ - Return the number of 0d elements in the mesh + """ + Return the number of 0d elements in the mesh Returns: an integer value - """ + """ return self.mesh.Nb0DElements() @@ -2828,7 +2882,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbBalls() @@ -2838,7 +2892,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbEdges() @@ -2846,13 +2900,13 @@ class Mesh: """ Return the number of edges with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbEdgesOfOrder(elementOrder) @@ -2862,7 +2916,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbFaces() @@ -2870,13 +2924,13 @@ class Mesh: """ Return the number of faces with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbFacesOfOrder(elementOrder) @@ -2886,7 +2940,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbTriangles() @@ -2894,13 +2948,13 @@ class Mesh: """ Return the number of triangles with the given order in the mesh - Parameters: - elementOrder: is the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: is the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbTrianglesOfOrder(elementOrder) @@ -2910,7 +2964,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbBiQuadTriangles() @@ -2920,7 +2974,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbQuadrangles() @@ -2928,13 +2982,13 @@ class Mesh: """ Return the number of quadrangles with the given order in the mesh - Parameters: - elementOrder the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbQuadranglesOfOrder(elementOrder) @@ -2944,7 +2998,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbBiQuadQuadrangles() @@ -2952,13 +3006,13 @@ class Mesh: """ Return the number of polygons of given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbPolygonsOfOrder(elementOrder) @@ -2968,7 +3022,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbVolumes() @@ -2977,9 +3031,9 @@ class Mesh: """ Return the number of volumes with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value @@ -2993,7 +3047,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbTetras() @@ -3001,13 +3055,13 @@ class Mesh: """ Return the number of tetrahedrons with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbTetrasOfOrder(elementOrder) @@ -3017,7 +3071,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbHexas() @@ -3025,13 +3079,13 @@ class Mesh: """ Return the number of hexahedrons with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbHexasOfOrder(elementOrder) @@ -3041,7 +3095,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbTriQuadraticHexas() @@ -3051,7 +3105,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbPyramids() @@ -3059,13 +3113,13 @@ class Mesh: """ Return the number of pyramids with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbPyramidsOfOrder(elementOrder) @@ -3075,7 +3129,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbPrisms() @@ -3083,13 +3137,13 @@ class Mesh: """ Return the number of prisms with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbPrismsOfOrder(elementOrder) @@ -3099,7 +3153,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbHexagonalPrisms() @@ -3109,7 +3163,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbPolyhedrons() @@ -3119,17 +3173,20 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbSubMesh() def GetElementsId(self): """ - Return the list of mesh elements IDs + Return the list of all mesh elements IDs Returns: the list of integer values - """ + + See Also: + :meth:`GetElementsByType` + """ return self.mesh.GetElementsId() @@ -3137,13 +3194,12 @@ class Mesh: """ Return the list of IDs of mesh elements with the given type - Parameters: - elementType: the required type of elements, either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE or SMESH.VOLUME) + Parameters: + elementType (SMESH.ElementType): the required type of elements Returns: list of integer values - """ + """ return self.mesh.GetElementsByType(elementType) @@ -3153,7 +3209,7 @@ class Mesh: Returns: the list of integer values - """ + """ return self.mesh.GetNodesId() @@ -3162,12 +3218,12 @@ class Mesh: def GetElementType(self, id, iselem=True): """ - Return the type of mesh element + Return the type of mesh element or node Returns: - the value from SMESH::ElementType enumeration - Type SMESH.ElementType._items in the Python Console to see all possible values. - """ + the value from :class:`SMESH.ElementType` enumeration. + Return SMESH.ALL if element or node with the given ID does not exist + """ return self.mesh.GetElementType(id, iselem) @@ -3176,9 +3232,8 @@ class Mesh: Return the geometric type of mesh element Returns: - the value from SMESH::EntityType enumeration - Type SMESH.EntityType._items in the Python Console to see all possible values. - """ + the value from :class:`SMESH.EntityType` enumeration. + """ return self.mesh.GetElementGeomType(id) @@ -3187,23 +3242,22 @@ class Mesh: Return the shape type of mesh element Returns: - the value from SMESH::GeometryType enumeration. - Type SMESH.GeometryType._items in the Python Console to see all possible values. - """ + the value from :class:`SMESH.GeometryType` enumeration. + """ return self.mesh.GetElementShape(id) def GetSubMeshElementsId(self, Shape): """ - Return the list of submesh elements IDs + Return the list of sub-mesh elements IDs - Parameters: - Shape: a geom object(sub-shape) - Shape must be the sub-shape of a ShapeToMesh() + Parameters: + Shape (GEOM.GEOM_Object): a geom object (sub-shape). + *Shape* must be the sub-shape of the :meth:`main shape ` Returns: - the list of integer values - """ + list of integer values + """ if isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3213,16 +3267,16 @@ class Mesh: def GetSubMeshNodesId(self, Shape, all): """ - Return the list of submesh nodes IDs + Return the list of sub-mesh nodes IDs - Parameters: - Shape: a geom object(sub-shape) - Shape must be the sub-shape of a ShapeToMesh() - all: If true, gives all nodes of submesh elements, otherwise gives only submesh nodes + Parameters: + Shape: a geom object (sub-shape). + *Shape* must be the sub-shape of a :meth:`GetShape` + all: If True, gives all nodes of sub-mesh elements, otherwise gives only sub-mesh nodes Returns: - the list of integer values - """ + list of integer values + """ if isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3234,13 +3288,13 @@ class Mesh: """ Return type of elements on given shape - Parameters: - Shape: a geom object(sub-shape) - Shape must be a sub-shape of a ShapeToMesh() + Parameters: + Shape: a geom object (sub-shape). + *Shape* must be a sub-shape of a ShapeToMesh() Returns: - element type - """ + :class:`SMESH.ElementType` + """ if isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3254,7 +3308,7 @@ class Mesh: Returns: string value - """ + """ return self.mesh.Dump() @@ -3264,23 +3318,23 @@ class Mesh: def GetNodeXYZ(self, id): """ - Get XYZ coordinates of a node - If there is no nodes for the given ID - return an empty list + Get XYZ coordinates of a node. + If there is no node for the given ID - return an empty list Returns: - a list of double precision values - """ + list of float values + """ return self.mesh.GetNodeXYZ(id) def GetNodeInverseElements(self, id): """ - Return list of IDs of inverse elements for the given node - If there is no node for the given ID - return an empty list + Return list of IDs of inverse elements for the given node. + If there is no node for the given ID - return an empty list Returns: - a list of integer values - """ + list of integer values + """ return self.mesh.GetNodeInverseElements(id) @@ -3289,8 +3343,8 @@ class Mesh: Return the position of a node on the shape Returns: - SMESH::NodePosition - """ + :class:`SMESH.NodePosition` + """ return self.mesh.GetNodePosition(NodeID) @@ -3299,8 +3353,8 @@ class Mesh: Return the position of an element on the shape Returns: - SMESH::ElementPosition - """ + :class:`SMESH.ElementPosition` + """ return self.mesh.GetElementPosition(ElemID) @@ -3310,8 +3364,8 @@ class Mesh: Returns: an integer value > 0 or -1 if there is no node for the given - ID or the node is not assigned to any geometry - """ + ID or the node is not assigned to any geometry + """ return self.mesh.GetShapeID(id) @@ -3321,8 +3375,8 @@ class Mesh: Returns: an integer value > 0 or -1 if there is no element for the given - ID or the element is not assigned to any geometry - """ + ID or the element is not assigned to any geometry + """ return self.mesh.GetShapeIDForElem(id) @@ -3332,19 +3386,27 @@ class Mesh: Returns: an integer value > 0 or -1 if there is no element for the given ID - """ + """ return self.mesh.GetElemNbNodes(id) def GetElemNode(self, id, index): """ - Return the node ID the given (zero based) index for the given element - If there is no element for the given ID - return -1 - If there is no node for the given index - return -2 + Return the node ID the given (zero based) index for the given element. + + * If there is no element for the given ID - return -1. + * If there is no node for the given index - return -2. + + Parameters: + id (int): element ID + index (int): node index within the element Returns: - an integer value - """ + an integer value (ID) + + See Also: + :meth:`GetElemNodes` + """ return self.mesh.GetElemNode(id, index) @@ -3354,14 +3416,14 @@ class Mesh: Returns: a list of integer values - """ + """ return self.mesh.GetElemNodes(id) def IsMediumNode(self, elementID, nodeID): """ Return true if the given node is the medium node in the given quadratic element - """ + """ return self.mesh.IsMediumNode(elementID, nodeID) @@ -3369,86 +3431,86 @@ class Mesh: """ Return true if the given node is the medium node in one of quadratic elements - Parameters: - nodeID: ID of the node - elementType: the type of elements to check a state of the node, either of - (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE or SMESH.VOLUME) - """ + Parameters: + nodeID: ID of the node + elementType: the type of elements to check a state of the node, either of + (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE or SMESH.VOLUME) + """ return self.mesh.IsMediumNodeOfAnyElem(nodeID, elementType) def ElemNbEdges(self, id): """ Return the number of edges for the given element - """ + """ return self.mesh.ElemNbEdges(id) def ElemNbFaces(self, id): """ Return the number of faces for the given element - """ + """ return self.mesh.ElemNbFaces(id) def GetElemFaceNodes(self,elemId, faceIndex): """ Return nodes of given face (counted from zero) for given volumic element. - """ + """ return self.mesh.GetElemFaceNodes(elemId, faceIndex) def GetFaceNormal(self, faceId, normalized=False): """ Return three components of normal of given mesh face - (or an empty array in KO case) - """ + (or an empty array in KO case) + """ return self.mesh.GetFaceNormal(faceId,normalized) def FindElementByNodes(self, nodes): """ Return an element based on all given nodes. - """ + """ return self.mesh.FindElementByNodes(nodes) def GetElementsByNodes(self, nodes, elemType=SMESH.ALL): """ Return elements including all given nodes. - """ + """ return self.mesh.GetElementsByNodes( nodes, elemType ) def IsPoly(self, id): """ Return true if the given element is a polygon - """ + """ return self.mesh.IsPoly(id) def IsQuadratic(self, id): """ Return true if the given element is quadratic - """ + """ return self.mesh.IsQuadratic(id) def GetBallDiameter(self, id): """ Return diameter of a ball discrete element or zero in case of an invalid *id* - """ + """ return self.mesh.GetBallDiameter(id) def BaryCenter(self, id): """ - Return XYZ coordinates of the barycenter of the given element - If there is no element for the given ID - return an empty list + Return XYZ coordinates of the barycenter of the given element. + If there is no element for the given ID - return an empty list Returns: a list of three double values - """ + """ return self.mesh.BaryCenter(id) @@ -3456,12 +3518,15 @@ class Mesh: """ Pass mesh elements through the given filter and return IDs of fitting elements - Parameters: - theFilter: SMESH_Filter + Parameters: + theFilter: :class:`SMESH.Filter` Returns: a list of ids - """ + + See Also: + :meth:`SMESH.Filter.GetIDs` + """ theFilter.SetMesh( self.mesh ) return theFilter.GetIDs() @@ -3471,12 +3536,12 @@ class Mesh: def GetFreeBorders(self): """ - Verify whether a 2D mesh element has free edges (edges connected to one face only)\n - Return a list of special structures (borders). + Verify whether a 2D mesh element has free edges (edges connected to one face only). + Return a list of special structures (borders). Returns: - a list of SMESH.FreeEdges. Border structure:: edge id and ids of two its nodes. - """ + a list of :class:`SMESH.FreeEdges.Border` + """ aFilterMgr = self.smeshpyD.CreateFilterManager() aPredicate = aFilterMgr.CreateFreeEdges() @@ -3489,32 +3554,34 @@ class Mesh: """ Get minimum distance between two nodes, elements or distance to the origin - Parameters: - id1: first node/element id - id2: second node/element id (if 0, distance from *id1* to the origin is computed) - isElem1: *True* if *id1* is element id, *False* if it is node id - isElem2: *True* if *id2* is element id, *False* if it is node id + Parameters: + id1: first node/element id + id2: second node/element id (if 0, distance from *id1* to the origin is computed) + isElem1: *True* if *id1* is element id, *False* if it is node id + isElem2: *True* if *id2* is element id, *False* if it is node id Returns: minimum distance value **GetMinDistance()** - """ + """ aMeasure = self.GetMinDistance(id1, id2, isElem1, isElem2) return aMeasure.value def GetMinDistance(self, id1, id2=0, isElem1=False, isElem2=False): """ - Get measure structure specifying minimum distance data between two objects + Get :class:`SMESH.Measure` structure specifying minimum distance data between two objects - Parameters: - id1: first node/element id - id2: second node/element id (if 0, distance from *id1* to the origin is computed) - isElem1: *True* if *id1* is element id, *False* if it is node id - isElem2: *True* if *id2* is element id, *False* if it is node id + Parameters: + id1: first node/element id + id2: second node/element id (if 0, distance from *id1* to the origin is computed) + isElem1: *True* if *id1* is element id, *False* if it is node id + isElem2: *True* if *id2* is element id, *False* if it is node id Returns: - Measure structure **MinDistance()** - """ + :class:`SMESH.Measure` structure + See Also: + :meth:`MinDistance` + """ if isElem1: id1 = self.editor.MakeIDSource([id1], SMESH.FACE) @@ -3538,14 +3605,17 @@ class Mesh: """ Get bounding box of the specified object(s) - Parameters: - objects: single source object or list of source objects or list of nodes/elements IDs - isElem: if *objects* is a list of IDs, *True* value in this parameters specifies that *objects* are elements, - *False* specifies that *objects* are nodes + Parameters: + objects: single :class:`source object ` or list of source objects or list of nodes/elements IDs + isElem: if *objects* is a list of IDs, *True* value in this parameters specifies that *objects* are elements, + *False* specifies that *objects* are nodes Returns: - tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) **GetBoundingBox()** - """ + tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) + + See Also: + :meth:`GetBoundingBox()` + """ result = self.GetBoundingBox(objects, isElem) if result is None: @@ -3554,18 +3624,21 @@ class Mesh: result = (result.minX, result.minY, result.minZ, result.maxX, result.maxY, result.maxZ) return result - def GetBoundingBox(self, IDs=None, isElem=False): + def GetBoundingBox(self, objects=None, isElem=False): """ - Get measure structure specifying bounding box data of the specified object(s) + Get :class:`SMESH.Measure` structure specifying bounding box data of the specified object(s) - Parameters: - IDs: single source object or list of source objects or list of nodes/elements IDs - isElem: if *IDs* is a list of IDs, *True* value in this parameters specifies that *objects* are elements, - *False* specifies that *objects* are nodes + Parameters: + objects: single :class:`source object ` or list of source objects or list of nodes/elements IDs + isElem: if *objects* is a list of IDs, True means that *objects* are elements, + False means that *objects* are nodes Returns: - Measure structure **BoundingBox()** - """ + :class:`SMESH.Measure` structure + + See Also: + :meth:`BoundingBox()` + """ if IDs is None: IDs = [self.mesh] @@ -3604,12 +3677,12 @@ class Mesh: """ Remove the elements from the mesh by ids - Parameters: - IDsOfElements: is a list of ids of elements to remove + Parameters: + IDsOfElements: is a list of ids of elements to remove Returns: True or False - """ + """ return self.editor.RemoveElements(IDsOfElements) @@ -3617,12 +3690,12 @@ class Mesh: """ Remove nodes from mesh by ids - Parameters: - IDsOfNodes: is a list of ids of nodes to remove + Parameters: + IDsOfNodes: is a list of ids of nodes to remove Returns: True or False - """ + """ return self.editor.RemoveNodes(IDsOfNodes) @@ -3632,7 +3705,7 @@ class Mesh: Returns: number of the removed nodes - """ + """ return self.editor.RemoveOrphanNodes() @@ -3641,8 +3714,8 @@ class Mesh: Add a node to the mesh by coordinates Returns: - Id of the new node - """ + ID of the new node + """ x,y,z,Parameters,hasVars = ParseParameters(x,y,z) if hasVars: self.mesh.SetParameters(Parameters) @@ -3652,34 +3725,34 @@ class Mesh: """ Create a 0D element on a node with given number. - Parameters: - IDOfNode: the ID of node for creation of the element. - DuplicateElements: to add one more 0D element to a node or not + Parameters: + IDOfNode: the ID of node for creation of the element. + DuplicateElements: to add one more 0D element to a node or not Returns: - the Id of the new 0D element - """ + ID of the new 0D element + """ return self.editor.Add0DElement( IDOfNode, DuplicateElements ) def Add0DElementsToAllNodes(self, theObject, theGroupName="", DuplicateElements=False): """ Create 0D elements on all nodes of the given elements except those - nodes on which a 0D element already exists. + nodes on which a 0D element already exists. - Parameters: - theObject: an object on whose nodes 0D elements will be created. - It can be mesh, sub-mesh, group, list of element IDs or a holder - of nodes IDs created by calling mesh.GetIDSource( nodes, SMESH.NODE ) - theGroupName: optional name of a group to add 0D elements created - and/or found on nodes of *theObject*. - DuplicateElements: to add one more 0D element to a node or not + Parameters: + theObject: an object on whose nodes 0D elements will be created. + It can be list of element IDs, :class:`mesh, sub-mesh, group or filter ` + theGroupName: optional name of a group to add 0D elements created + and/or found on nodes of *theObject*. + DuplicateElements: to add one more 0D element to a node or not Returns: - an object (a new group or a temporary SMESH_IDSource) holding - IDs of new and/or found 0D elements. IDs of 0D elements - can be retrieved from the returned object by calling GetIDs() - """ + an object (a new group or a temporary :class:`SMESH.SMESH_IDSource`) holding + IDs of new and/or found 0D elements. IDs of 0D elements + can be retrieved from the returned object by + calling :meth:`GetIDs() ` + """ unRegister = genObjUnRegister() if isinstance( theObject, Mesh ): @@ -3693,94 +3766,88 @@ class Mesh: """ Create a ball element on a node with given ID. - Parameters: - IDOfNode: the ID of node for creation of the element. - diameter: the bal diameter. + Parameters: + IDOfNode: the ID of node for creation of the element. + diameter: the bal diameter. Returns: - the Id of the new ball element - """ + ID of the new ball element + """ return self.editor.AddBall( IDOfNode, diameter ) def AddEdge(self, IDsOfNodes): """ Create a linear or quadratic edge (this is determined - by the number of given nodes). + by the number of given nodes). - Parameters: - IDsOfNodes: the list of node IDs for creation of the element. - The order of nodes in this list should correspond to the description - of MED. - This description is located by the following link: - http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3. + Parameters: + IDsOfNodes: list of node IDs for creation of the element. + The order of nodes in this list should correspond to + the :ref:`connectivity convention `. Returns: - the Id of the new edge - """ + ID of the new edge + """ return self.editor.AddEdge(IDsOfNodes) def AddFace(self, IDsOfNodes): """ Create a linear or quadratic face (this is determined - by the number of given nodes). + by the number of given nodes). - Parameters: - IDsOfNodes: the list of node IDs for creation of the element. - The order of nodes in this list should correspond to the description - of MED. - This description is located by the following link: - http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3. + Parameters: + IDsOfNodes: list of node IDs for creation of the element. + The order of nodes in this list should correspond to + the :ref:`connectivity convention `. Returns: - the Id of the new face - """ + ID of the new face + """ return self.editor.AddFace(IDsOfNodes) def AddPolygonalFace(self, IdsOfNodes): """ - Add a polygonal face to the mesh by the list of node IDs + Add a polygonal face defined by a list of node IDs - Parameters: - IdsOfNodes: the list of node IDs for creation of the element. + Parameters: + IdsOfNodes: the list of node IDs for creation of the element. Returns: - the Id of the new face - """ + ID of the new face + """ return self.editor.AddPolygonalFace(IdsOfNodes) def AddQuadPolygonalFace(self, IdsOfNodes): """ - Add a quadratic polygonal face to the mesh by the list of node IDs + Add a quadratic polygonal face defined by a list of node IDs - Parameters: - IdsOfNodes: the list of node IDs for creation of the element; - corner nodes follow first. + Parameters: + IdsOfNodes: the list of node IDs for creation of the element; + corner nodes follow first. Returns: - the Id of the new face - """ + ID of the new face + """ return self.editor.AddQuadPolygonalFace(IdsOfNodes) def AddVolume(self, IDsOfNodes): """ Create both simple and quadratic volume (this is determined - by the number of given nodes). + by the number of given nodes). - Parameters: - IDsOfNodes: the list of node IDs for creation of the element. - The order of nodes in this list should correspond to the description - of MED. - This description is located by the following link: - http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3. + Parameters: + IDsOfNodes: list of node IDs for creation of the element. + The order of nodes in this list should correspond to + the :ref:`connectivity convention `. Returns: - the Id of the new volumic element - """ + ID of the new volumic element + """ return self.editor.AddVolume(IDsOfNodes) @@ -3788,14 +3855,14 @@ class Mesh: """ Create a volume of many faces, giving nodes for each face. - Parameters: - IdsOfNodes: the list of node IDs for volume creation face by face. - Quantities: the list of integer values, Quantities[i] - gives the quantity of nodes in face number i. + Parameters: + IdsOfNodes: list of node IDs for volume creation, face by face. + Quantities: list of integer values, Quantities[i] + gives the quantity of nodes in face number i. Returns: - the Id of the new volumic element - """ + ID of the new volumic element + """ return self.editor.AddPolyhedralVolume(IdsOfNodes, Quantities) @@ -3803,31 +3870,31 @@ class Mesh: """ Create a volume of many faces, giving the IDs of the existing faces. - Parameters: - IdsOfFaces: the list of face IDs for volume creation. + Note: + The created volume will refer only to the nodes + of the given faces, not to the faces themselves. - Note: - The created volume will refer only to the nodes - of the given faces, not to the faces themselves. + Parameters: + IdsOfFaces: the list of face IDs for volume creation. Returns: - the Id of the new volumic element - """ + ID of the new volumic element + """ return self.editor.AddPolyhedralVolumeByFaces(IdsOfFaces) def SetNodeOnVertex(self, NodeID, Vertex): """ - **Binds** a node to a vertex + Binds a node to a vertex - Parameters: - NodeID: a node ID - Vertex: a vertex or vertex ID + Parameters: + NodeID: a node ID + Vertex: a vertex (GEOM.GEOM_Object) or vertex ID Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Vertex, geomBuilder.GEOM._objref_GEOM_Object)): VertexID = self.geompyD.GetSubShapeID( self.geom, Vertex ) @@ -3842,16 +3909,16 @@ class Mesh: def SetNodeOnEdge(self, NodeID, Edge, paramOnEdge): """ - **Stores** the node position on an edge + Stores the node position on an edge - Parameters: - NodeID: a node ID - Edge: an edge or edge ID - paramOnEdge: a parameter on the edge where the node is located + Parameters: + NodeID: a node ID + Edge: an edge (GEOM.GEOM_Object) or edge ID + paramOnEdge: a parameter on the edge where the node is located Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Edge, geomBuilder.GEOM._objref_GEOM_Object)): EdgeID = self.geompyD.GetSubShapeID( self.geom, Edge ) @@ -3865,17 +3932,17 @@ class Mesh: def SetNodeOnFace(self, NodeID, Face, u, v): """ - **Stores** node position on a face + Stores node position on a face - Parameters: - NodeID: a node ID - Face: a face or face ID - u: U parameter on the face where the node is located - v: V parameter on the face where the node is located + Parameters: + NodeID: a node ID + Face: a face (GEOM.GEOM_Object) or face ID + u: U parameter on the face where the node is located + v: V parameter on the face where the node is located Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Face, geomBuilder.GEOM._objref_GEOM_Object)): FaceID = self.geompyD.GetSubShapeID( self.geom, Face ) @@ -3889,15 +3956,15 @@ class Mesh: def SetNodeInVolume(self, NodeID, Solid): """ - **Binds** a node to a solid + Binds a node to a solid - Parameters: - NodeID: a node ID - Solid: a solid or solid ID + Parameters: + NodeID: a node ID + Solid: a solid (GEOM.GEOM_Object) or solid ID Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Solid, geomBuilder.GEOM._objref_GEOM_Object)): SolidID = self.geompyD.GetSubShapeID( self.geom, Solid ) @@ -3911,15 +3978,15 @@ class Mesh: def SetMeshElementOnShape(self, ElementID, Shape): """ - **Bind** an element to a shape + Bind an element to a shape - Parameters: - ElementID: an element ID - Shape: a shape or shape ID + Parameters: + ElementID: an element ID + Shape: a shape (GEOM.GEOM_Object) or shape ID Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object)): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3936,15 +4003,15 @@ class Mesh: """ Move the node with the given id - Parameters: - NodeID: the id of the node - x: a new X coordinate - y: a new Y coordinate - z: a new Z coordinate + Parameters: + NodeID: the id of the node + x: a new X coordinate + y: a new Y coordinate + z: a new Z coordinate Returns: True if succeed else False - """ + """ x,y,z,Parameters,hasVars = ParseParameters(x,y,z) if hasVars: self.mesh.SetParameters(Parameters) @@ -3954,16 +4021,16 @@ class Mesh: """ Find the node closest to a point and moves it to a point location - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point - NodeID: if specified (>0), the node with this ID is moved, - otherwise, the node closest to point (*x*, *y*, *z*) is moved + Parameters: + x: the X coordinate of a point + y: the Y coordinate of a point + z: the Z coordinate of a point + NodeID: if specified (>0), the node with this ID is moved, + otherwise, the node closest to point (*x*, *y*, *z*) is moved Returns: - the ID of a node - """ + the ID of a moved node + """ x,y,z,Parameters,hasVars = ParseParameters(x,y,z) if hasVars: self.mesh.SetParameters(Parameters) @@ -3973,14 +4040,14 @@ class Mesh: """ Find the node closest to a point - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point + Parameters: + x: the X coordinate of a point + y: the Y coordinate of a point + z: the Z coordinate of a point Returns: the ID of a node - """ + """ #preview = self.mesh.GetMeshEditPreviewer() #return preview.MoveClosestNodeToPoint(x, y, z, -1) @@ -3990,18 +4057,15 @@ class Mesh: """ Find the elements where a point lays IN or ON - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point - elementType: type of elements to find; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); SMESH.ALL type - means elements of any type excluding nodes, discrete and 0D elements. - meshPart: a part of mesh (group, sub-mesh) to search within + Parameters: + x,y,z (float): coordinates of the point + elementType (SMESH.ElementType): type of elements to find; SMESH.ALL type + means elements of any type excluding nodes, discrete and 0D elements. + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to search within Returns: list of IDs of found elements - """ + """ if meshPart: return self.editor.FindAmongElementsByPoint( meshPart, x, y, z, elementType ); @@ -4011,23 +4075,23 @@ class Mesh: def GetPointState(self, x, y, z): """ Return point state in a closed 2D mesh in terms of TopAbs_State enumeration: - 0-IN, 1-OUT, 2-ON, 3-UNKNOWN - UNKNOWN state means that either mesh is wrong or the analysis fails. - """ + 0-IN, 1-OUT, 2-ON, 3-UNKNOWN. + UNKNOWN state means that either mesh is wrong or the analysis fails. + """ return self.editor.GetPointState(x, y, z) def IsManifold(self): """ Check if a 2D mesh is manifold - """ + """ return self.editor.IsManifold() def IsCoherentOrientation2D(self): """ Check if orientation of 2D elements is coherent - """ + """ return self.editor.IsCoherentOrientation2D() @@ -4035,43 +4099,43 @@ class Mesh: """ Find the node closest to a point and moves it to a point location - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point + Parameters: + x: the X coordinate of a point + y: the Y coordinate of a point + z: the Z coordinate of a point Returns: the ID of a moved node - """ + """ return self.editor.MoveClosestNodeToPoint(x, y, z, -1) def InverseDiag(self, NodeID1, NodeID2): """ Replace two neighbour triangles sharing Node1-Node2 link - with the triangles built on the same 4 nodes but having other common link. + with the triangles built on the same 4 nodes but having other common link. - Parameters: - NodeID1: the ID of the first node - NodeID2: the ID of the second node + Parameters: + NodeID1: the ID of the first node + NodeID2: the ID of the second node Returns: - false if proper faces were not found - """ + False if proper faces were not found + """ return self.editor.InverseDiag(NodeID1, NodeID2) def DeleteDiag(self, NodeID1, NodeID2): """ - Replace two neighbour triangles sharing Node1-Node2 link - with a quadrangle built on the same 4 nodes. + Replace two neighbour triangles sharing *Node1-Node2* link + with a quadrangle built on the same 4 nodes. - Parameters: - NodeID1: the ID of the first node - NodeID2: the ID of the second node + Parameters: + NodeID1: ID of the first node + NodeID2: ID of the second node Returns: - false if proper faces were not found - """ + False if proper faces were not found + """ return self.editor.DeleteDiag(NodeID1, NodeID2) @@ -4079,12 +4143,12 @@ class Mesh: """ Reorient elements by ids - Parameters: - IDsOfElements: if undefined reorients all mesh elements + Parameters: + IDsOfElements: if undefined reorients all mesh elements Returns: True if succeed else False - """ + """ if IDsOfElements == None: IDsOfElements = self.GetElementsId() @@ -4094,12 +4158,12 @@ class Mesh: """ Reorient all elements of the object - Parameters: - theObject: mesh, submesh or group + Parameters: + theObject: :class:`mesh, sub-mesh, group or filter ` Returns: True if succeed else False - """ + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -4109,18 +4173,18 @@ class Mesh: """ Reorient faces contained in *the2DObject*. - Parameters: - the2DObject: is a mesh, sub-mesh, group or list of IDs of 2D elements - theDirection: is a desired direction of normal of *theFace*. - It can be either a GEOM vector or a list of coordinates [x,y,z]. - theFaceOrPoint: defines a face of *the2DObject* whose normal will be - compared with theDirection. It can be either ID of face or a point - by which the face will be found. The point can be given as either - a GEOM vertex or a list of point coordinates. + Parameters: + the2DObject: is a :class:`mesh, sub-mesh, group or filter ` or list of IDs of 2D elements + theDirection: is a desired direction of normal of *theFace*. + It can be either a GEOM vector or a list of coordinates [x,y,z]. + theFaceOrPoint: defines a face of *the2DObject* whose normal will be + compared with theDirection. It can be either ID of face or a point + by which the face will be found. The point can be given as either + a GEOM vertex or a list of point coordinates. Returns: number of reoriented faces - """ + """ unRegister = genObjUnRegister() # check the2DObject @@ -4152,16 +4216,16 @@ class Mesh: """ Reorient faces according to adjacent volumes. - Parameters: - the2DObject: is a mesh, sub-mesh, group or list of - either IDs of faces or face groups. - the3DObject: is a mesh, sub-mesh, group or list of IDs of volumes. - theOutsideNormal: to orient faces to have their normals - pointing either *outside* or *inside* the adjacent volumes. + Parameters: + the2DObject: is a :class:`mesh, sub-mesh, group, filter ` or list of + either IDs of faces or face groups. + the3DObject: is a :class:`mesh, sub-mesh, group, filter ` or list of IDs of volumes. + theOutsideNormal: to orient faces to have their normals + pointing either *outside* or *inside* the adjacent volumes. Returns: number of reoriented faces. - """ + """ unRegister = genObjUnRegister() # check the2DObject @@ -4189,19 +4253,19 @@ class Mesh: """ Fuse the neighbouring triangles into quadrangles. - Parameters: - IDsOfElements: The triangles to be fused. - theCriterion: a numerical functor, in terms of enum SMESH.FunctorType, used to - applied to possible quadrangles to choose a neighbour to fuse with. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. - MaxAngle: is the maximum angle between element normals at which the fusion - is still performed; theMaxAngle is measured in radians. - Also it could be a name of variable which defines angle in degrees. + Parameters: + IDsOfElements: The triangles to be fused. + theCriterion: a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + applied to possible quadrangles to choose a neighbour to fuse with. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. + MaxAngle: is the maximum angle between element normals at which the fusion + is still performed; theMaxAngle is measured in radians. + Also it could be a name of variable which defines angle in degrees. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ MaxAngle,Parameters,hasVars = ParseAngles(MaxAngle) self.mesh.SetParameters(Parameters) @@ -4214,18 +4278,18 @@ class Mesh: """ Fuse the neighbouring triangles of the object into quadrangles - Parameters: - theObject: is mesh, submesh or group - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, - applied to possible quadrangles to choose a neighbour to fuse with. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. - MaxAngle: a max angle between element normals at which the fusion - is still performed; theMaxAngle is measured in radians. + Parameters: + theObject: is :class:`mesh, sub-mesh, group or filter ` + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, + applied to possible quadrangles to choose a neighbour to fuse with. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. + MaxAngle: a max angle between element normals at which the fusion + is still performed; theMaxAngle is measured in radians. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ MaxAngle,Parameters,hasVars = ParseAngles(MaxAngle) self.mesh.SetParameters(Parameters) @@ -4238,17 +4302,17 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - IDsOfElements: the faces to be splitted. - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, used to - choose a diagonal for splitting. If *theCriterion* is None, which is a default - value, then quadrangles will be split by the smallest diagonal. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + IDsOfElements: the faces to be splitted. + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + choose a diagonal for splitting. If *theCriterion* is None, which is a default + value, then quadrangles will be split by the smallest diagonal. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() if theCriterion is None: @@ -4260,18 +4324,18 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - theObject: the object from which the list of elements is taken, - this is mesh, submesh or group - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, used to - choose a diagonal for splitting. If *theCriterion* is None, which is a default - value, then quadrangles will be split by the smallest diagonal. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + theObject: the object from which the list of elements is taken, + this is :class:`mesh, sub-mesh, group or filter ` + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + choose a diagonal for splitting. If *theCriterion* is None, which is a default + value, then quadrangles will be split by the smallest diagonal. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() if theCriterion is None: @@ -4282,12 +4346,13 @@ class Mesh: def QuadTo4Tri (self, theElements=[]): """ Split each of given quadrangles into 4 triangles. A node is added at the center of - a quadrangle. + a quadrangle. - Parameters: - theElements: the faces to be splitted. This can be either mesh, sub-mesh, - group or a list of face IDs. By default all quadrangles are split - """ + Parameters: + theElements: the faces to be splitted. This can be either + :class:`mesh, sub-mesh, group, filter ` + or a list of face IDs. By default all quadrangles are split + """ unRegister = genObjUnRegister() if isinstance( theElements, Mesh ): theElements = theElements.mesh @@ -4302,13 +4367,13 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - IDsOfElements: the faces to be splitted - Diag13: is used to choose a diagonal for splitting. + Parameters: + IDsOfElements: the faces to be splitted + Diag13: is used to choose a diagonal for splitting. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() return self.editor.SplitQuad(IDsOfElements, Diag13) @@ -4317,14 +4382,14 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - theObject: the object from which the list of elements is taken, - this is mesh, submesh or group - Diag13: is used to choose a diagonal for splitting. + Parameters: + theObject: the object from which the list of elements is taken, + this is :class:`mesh, sub-mesh, group or filter ` + Diag13: is used to choose a diagonal for splitting. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() return self.editor.SplitQuadObject(theObject, Diag13) @@ -4333,29 +4398,30 @@ class Mesh: """ Find a better splitting of the given quadrangle. - Parameters: - IDOfQuad: the ID of the quadrangle to be splitted. - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, used to - choose a diagonal for splitting. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + IDOfQuad: the ID of the quadrangle to be splitted. + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + choose a diagonal for splitting. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. Returns: - 1 if 1-3 diagonal is better, 2 if 2-4 - diagonal is better, 0 if error occurs. - """ + * 1 if 1-3 diagonal is better, + * 2 if 2-4 diagonal is better, + * 0 if error occurs. + """ return self.editor.BestSplit(IDOfQuad, self.smeshpyD.GetFunctor(theCriterion)) def SplitVolumesIntoTetra(self, elems, method=smeshBuilder.Hex_5Tet ): """ Split volumic elements into tetrahedrons - Parameters: - elems: either a list of elements or a mesh or a group or a submesh or a filter - method: flags passing splitting method: - smesh.Hex_5Tet, smesh.Hex_6Tet, smesh.Hex_24Tet. - smesh.Hex_5Tet - to split the hexahedron into 5 tetrahedrons, etc. - """ + Parameters: + elems: either a list of elements or a :class:`mesh, sub-mesh, group or filter ` + method: flags passing splitting method: + smesh.Hex_5Tet, smesh.Hex_6Tet, smesh.Hex_24Tet. + smesh.Hex_5Tet - to split the hexahedron into 5 tetrahedrons, etc. + """ unRegister = genObjUnRegister() if isinstance( elems, Mesh ): elems = elems.GetMesh() @@ -4377,7 +4443,7 @@ class Mesh: will be split in order to keep the mesh conformal. Parameters: - elems: elements to split\: sub-meshes, groups, filters or element IDs; + elems: elements to split\: :class:`mesh, sub-mesh, group, filter ` or element IDs; if None (default), all bi-quadratic elements will be split """ unRegister = genObjUnRegister() @@ -4397,20 +4463,20 @@ class Mesh: """ Split hexahedra into prisms - Parameters: - elems: either a list of elements or a mesh or a group or a submesh or a filter - startHexPoint: a point used to find a hexahedron for which *facetNormal* - gives a normal vector defining facets to split into triangles. - **startHexPoint** can be either a triple of coordinates or a vertex. - facetNormal: a normal to a facet to split into triangles of a - hexahedron found by *startHexPoint*. - **facetNormal** can be either a triple of coordinates or an edge. - method: flags passing splitting method: smesh.Hex_2Prisms, smesh.Hex_4Prisms. - smesh.Hex_2Prisms - to split the hexahedron into 2 prisms, etc. - allDomains: if :code:`False`, only hexahedra adjacent to one closest - to **startHexPoint** are split, else **startHexPoint** - is used to find the facet to split in all domains present in *elems*. - """ + Parameters: + elems: either a list of elements or a :class:`mesh, sub-mesh, group or filter ` + startHexPoint: a point used to find a hexahedron for which *facetNormal* + gives a normal vector defining facets to split into triangles. + *startHexPoint* can be either a triple of coordinates or a vertex. + facetNormal: a normal to a facet to split into triangles of a + hexahedron found by *startHexPoint*. + *facetNormal* can be either a triple of coordinates or an edge. + method: flags passing splitting method: smesh.Hex_2Prisms, smesh.Hex_4Prisms. + smesh.Hex_2Prisms - to split the hexahedron into 2 prisms, etc. + allDomains: if :code:`False`, only hexahedra adjacent to one closest + to *startHexPoint* are split, else *startHexPoint* + is used to find the facet to split in all domains present in *elems*. + """ # IDSource unRegister = genObjUnRegister() if isinstance( elems, Mesh ): @@ -4439,7 +4505,7 @@ class Mesh: def SplitQuadsNearTriangularFacets(self): """ Split quadrangle faces near triangular facets of volumes - """ + """ faces_array = self.GetElementsByType(SMESH.FACE) for face_id in faces_array: if self.GetElemNbNodes(face_id) == 4: # quadrangle @@ -4468,21 +4534,22 @@ class Mesh: def SplitHexaToTetras (self, theObject, theNode000, theNode001): """ - **Splits** hexahedrons into tetrahedrons. + Split hexahedrons into tetrahedrons. - This operation uses pattern mapping functionality for splitting. + This operation uses :doc:`pattern_mapping` functionality for splitting. - Parameters: - theObject: the object from which the list of hexahedrons is taken; this is mesh, submesh or group. - theNode000,theNode001: within the range [0,7]; gives the orientation of the - pattern relatively each hexahedron: the (0,0,0) key-point of the pattern - will be mapped into theNode000-th node of each volume, the (0,0,1) - key-point will be mapped into theNode001-th node of each volume. - The (0,0,0) key-point of the used pattern corresponds to a non-split corner. + Parameters: + theObject: the object from which the list of hexahedrons is taken; + this is :class:`mesh, sub-mesh, group or filter ` + theNode000,theNode001: within the range [0,7]; gives the orientation of the + pattern relatively each hexahedron: the (0,0,0) key-point of the pattern + will be mapped into *theNode000*-th node of each volume, the (0,0,1) + key-point will be mapped into *theNode001*-th node of each volume. + The (0,0,0) key-point of the used pattern corresponds to a non-split corner. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ # Pattern: # 5.---------.6 # /|#* /| @@ -4532,21 +4599,21 @@ class Mesh: def SplitHexaToPrisms (self, theObject, theNode000, theNode001): """ - **Split** hexahedrons into prisms. + Split hexahedrons into prisms. - Uses the pattern mapping functionality for splitting. + Uses the :doc:`pattern_mapping` functionality for splitting. - Parameters: - theObject: the object (mesh, submesh or group) from where the list of hexahedrons is taken; - theNode000,theNode001: (within the range [0,7]) gives the orientation of the - pattern relatively each hexahedron: keypoint (0,0,0) of the pattern - will be mapped into the theNode000-th node of each volume, keypoint (0,0,1) - will be mapped into the theNode001-th node of each volume. - Edge (0,0,0)-(0,0,1) of used pattern connects two not split corners. + Parameters: + theObject: the object (:class:`mesh, sub-mesh, group or filter `) from where the list of hexahedrons is taken; + theNode000,theNode001: (within the range [0,7]) gives the orientation of the + pattern relatively each hexahedron: keypoint (0,0,0) of the pattern + will be mapped into the *theNode000* -th node of each volume, keypoint (0,0,1) + will be mapped into the *theNode001* -th node of each volume. + Edge (0,0,0)-(0,0,1) of used pattern connects two not split corners. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ # Pattern: 5.---------.6 # /|# /| # / | # / | @@ -4594,18 +4661,18 @@ class Mesh: """ Smooth elements - Parameters: - IDsOfElements: the list if ids of elements to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + IDsOfElements: the list if ids of elements to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -4619,18 +4686,18 @@ class Mesh: """ Smooth elements which belong to the given object - Parameters: - theObject: the object to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + theObject: the object to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -4642,18 +4709,18 @@ class Mesh: """ Parametrically smooth the given elements - Parameters: - IDsOfElements: the list if ids of elements to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + IDsOfElements: the list if ids of elements to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -4667,18 +4734,18 @@ class Mesh: """ Parametrically smooth the elements which belong to the given object - Parameters: - theObject: the object to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + theObject: the object to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -4688,18 +4755,22 @@ class Mesh: def ConvertToQuadratic(self, theForce3d=False, theSubMesh=None, theToBiQuad=False): """ Convert the mesh to quadratic or bi-quadratic, deletes old elements, replacing - them with quadratic with the same id. + them with quadratic with the same id. + + Parameters: + theForce3d: method of new node creation: - Parameters: - theForce3d: new node creation method: - 0 - the medium node lies at the geometrical entity from which the mesh element is built - 1 - the medium node lies at the middle of the line segments connecting two nodes of a mesh element - theSubMesh: a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal - theToBiQuad: If True, converts the mesh to bi-quadratic + * False - the medium node lies at the geometrical entity from which the mesh element is built + * True - the medium node lies at the middle of the line segments connecting two nodes of a mesh element + theSubMesh: a :class:`sub-mesh, group or filter ` to convert + theToBiQuad: If True, converts the mesh to bi-quadratic Returns: - SMESH.ComputeError which can hold a warning - """ + :class:`SMESH.ComputeError` which can hold a warning + + Warning: + If *theSubMesh* is provided, the mesh can become non-conformal + """ if isinstance( theSubMesh, Mesh ): theSubMesh = theSubMesh.mesh @@ -4722,11 +4793,11 @@ class Mesh: replacing them with ordinary mesh elements with the same id. Parameters: - theSubMesh: a group or a sub-mesh to convert; + theSubMesh: a :class:`sub-mesh, group or filter ` to convert Warning: - in this case the mesh can become not conformal - """ + If *theSubMesh* is provided, the mesh can become non-conformal + """ if theSubMesh: self.editor.ConvertFromQuadraticObject(theSubMesh) @@ -4738,8 +4809,8 @@ class Mesh: Create 2D mesh as skin on boundary faces of a 3D mesh Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.Make2DMeshFrom3D() @@ -4748,25 +4819,25 @@ class Mesh: """ Create missing boundary elements - Parameters: - elements: elements whose boundary is to be checked: - mesh, group, sub-mesh or list of elements - if elements is mesh, it must be the mesh whose MakeBoundaryMesh() is called - dimension: defines type of boundary elements to create, either of - { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D } - SMESH.BND_1DFROM3D create mesh edges on all borders of free facets of 3D cells - groupName: a name of group to store created boundary elements in, - "" means not to create the group - meshName: a name of new mesh to store created boundary elements in, - "" means not to create the new mesh - toCopyElements: if true, the checked elements will be copied into - the new mesh else only boundary elements will be copied into the new mesh - toCopyExistingBondary: if true, not only new but also pre-existing - boundary elements will be copied into the new mesh - - Returns: - tuple (mesh, group) where boundary elements were added to - """ + Parameters: + elements: elements whose boundary is to be checked: + :class:`mesh, sub-mesh, group, filter ` or list of elements. + If *elements* is mesh, it must be the mesh whose MakeBoundaryMesh() is called + dimension: defines type of boundary elements to create, either of + { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D }. + SMESH.BND_1DFROM3D create mesh edges on all borders of free facets of 3D cells + groupName: a name of group to store created boundary elements in, + "" means not to create the group + meshName: a name of new mesh to store created boundary elements in, + "" means not to create the new mesh + toCopyElements: if True, the checked elements will be copied into + the new mesh else only boundary elements will be copied into the new mesh + toCopyExistingBondary: if True, not only new but also pre-existing + boundary elements will be copied into the new mesh + + Returns: + tuple (:class:`Mesh`, :class:`group `) where boundary elements were added to + """ unRegister = genObjUnRegister() if isinstance( elements, Mesh ): @@ -4783,27 +4854,27 @@ class Mesh: def MakeBoundaryElements(self, dimension=SMESH.BND_2DFROM3D, groupName="", meshName="", toCopyAll=False, groups=[]): - """ - **Create** missing boundary elements around either the whole mesh or - groups of elements - - Parameters: - dimension: defines type of boundary elements to create, either of - { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D } - groupName: a name of group to store all boundary elements in, - "" means not to create the group - meshName: a name of a new mesh, which is a copy of the initial - mesh + created boundary elements; "" means not to create the new mesh - toCopyAll: if true, the whole initial mesh will be copied into - the new mesh else only boundary elements will be copied into the new mesh - groups: groups of elements to make boundary around - - Returns: - tuple( long, mesh, groups ) - long - number of added boundary elements - mesh - the mesh where elements were added to - group - the group of boundary elements or None - """ + """ + Create missing boundary elements around either the whole mesh or + groups of elements + + Parameters: + dimension: defines type of boundary elements to create, either of + { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D } + groupName: a name of group to store all boundary elements in, + "" means not to create the group + meshName: a name of a new mesh, which is a copy of the initial + mesh + created boundary elements; "" means not to create the new mesh + toCopyAll: if True, the whole initial mesh will be copied into + the new mesh else only boundary elements will be copied into the new mesh + groups: list of :class:`sub-meshes, groups or filters ` of elements to make boundary around + + Returns: + tuple( long, mesh, groups ) + - long - number of added boundary elements + - mesh - the :class:`Mesh` where elements were added to + - group - the :class:`group ` of boundary elements or None + """ nb, mesh, group = self.editor.MakeBoundaryElements(dimension,groupName,meshName, toCopyAll,groups) @@ -4812,20 +4883,20 @@ class Mesh: def RenumberNodes(self): """ - Renumber mesh nodes (Obsolete, does nothing) - """ + Renumber mesh nodes to remove unused node IDs + """ self.editor.RenumberNodes() def RenumberElements(self): """ - Renumber mesh elements (Obsole, does nothing) - """ + Renumber mesh elements to remove unused element IDs + """ self.editor.RenumberElements() def _getIdSourceList(self, arg, idType, unRegister): """ - Private method converting *arg* into a list of SMESH_IdSource's - """ + Private method converting *arg* into a list of :class:`SMESH.SMESH_IDSource` + """ if arg and isinstance( arg, list ): if isinstance( arg[0], int ): arg = self.GetIDSource( arg, idType ) @@ -4843,22 +4914,22 @@ class Mesh: """ Generate new elements by rotation of the given elements and nodes around the axis - Parameters: - nodes: nodes to revolve: a list including ids, groups, sub-meshes or a mesh - edges: edges to revolve: a list including ids, groups, sub-meshes or a mesh - faces: faces to revolve: a list including ids, groups, sub-meshes or a mesh - Axis: the axis of rotation: AxisStruct, line (geom object) or [x,y,z,dx,dy,dz] - AngleInRadians: the angle of Rotation (in radians) or a name of variable - which defines angle in degrees - NbOfSteps: the number of steps - Tolerance: tolerance - MakeGroups: forces the generation of new groups from existing ones - TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + Parameters: + nodes: nodes to revolve: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + edges: edges to revolve: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + faces: faces to revolve: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + Axis: the axis of rotation: :class:`SMESH.AxisStruct`, line (geom object) or [x,y,z,dx,dy,dz] + AngleInRadians: the angle of Rotation (in radians) or a name of variable + which defines angle in degrees + NbOfSteps: the number of steps + Tolerance: tolerance + MakeGroups: forces the generation of new groups from existing ones + TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ unRegister = genObjUnRegister() nodes = self._getIdSourceList( nodes, SMESH.NODE, unRegister ) @@ -4885,19 +4956,19 @@ class Mesh: """ Generate new elements by rotation of the elements around the axis - Parameters: + Parameters: IDsOfElements: the list of ids of elements to sweep - Axis: the axis of rotation, AxisStruct or line(geom object) + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation (in radians) or a name of variable which defines angle in degrees NbOfSteps: the number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ return self.RotationSweepObjects([], IDsOfElements, IDsOfElements, Axis, AngleInRadians, NbOfSteps, Tolerance, @@ -4907,21 +4978,21 @@ class Mesh: MakeGroups=False, TotalAngle=False): """ Generate new elements by rotation of the elements of object around the axis - theObject object which elements should be sweeped. - It can be a mesh, a sub mesh or a group. + theObject object which elements should be sweeped. + It can be a mesh, a sub mesh or a group. - Parameters: - Axis: the axis of rotation, AxisStruct or line(geom object) + Parameters: + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation NbOfSteps: number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ return self.RotationSweepObjects( [], theObject, theObject, Axis, AngleInRadians, NbOfSteps, Tolerance, @@ -4931,21 +5002,22 @@ class Mesh: MakeGroups=False, TotalAngle=False): """ Generate new elements by rotation of the elements of object around the axis - theObject object which elements should be sweeped. - It can be a mesh, a sub mesh or a group. + theObject object which elements should be sweeped. + It can be a mesh, a sub mesh or a group. - Parameters: - Axis: the axis of rotation, AxisStruct or line(geom object) + Parameters: + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation NbOfSteps: number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, + empty list otherwise + """ return self.RotationSweepObjects([],theObject,[], Axis, AngleInRadians, NbOfSteps, Tolerance, @@ -4955,21 +5027,21 @@ class Mesh: MakeGroups=False, TotalAngle=False): """ Generate new elements by rotation of the elements of object around the axis - theObject object which elements should be sweeped. - It can be a mesh, a sub mesh or a group. + theObject object which elements should be sweeped. + It can be a mesh, a sub mesh or a group. - Parameters: - Axis: the axis of rotation, AxisStruct or line(geom object) + Parameters: + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation NbOfSteps: number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ return self.RotationSweepObjects([],[],theObject, Axis, AngleInRadians, NbOfSteps, Tolerance, MakeGroups, TotalAngle) @@ -4979,31 +5051,30 @@ class Mesh: """ Generate new elements by extrusion of the given elements and nodes - Parameters: - nodes: nodes to extrude: a list including ids, groups, sub-meshes or a mesh - edges: edges to extrude: a list including ids, groups, sub-meshes or a mesh - faces: faces to extrude: a list including ids, groups, sub-meshes or a mesh - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + Parameters: + nodes: nodes to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + edges: edges to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + faces: faces to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones scaleFactors: optional scale factors to apply during extrusion linearVariation: if *True*, scaleFactors are spread over all *scaleFactors*, - else scaleFactors[i] is applied to nodes at the i-th extrusion step + else scaleFactors[i] is applied to nodes at the i-th extrusion step basePoint: optional scaling center; if not provided, a gravity center of - nodes and elements being extruded is used as the scaling center. - It can be either - - - a list of tree components of the point or - - a node ID or - - a GEOM point + nodes and elements being extruded is used as the scaling center. + It can be either + - a list of tree components of the point or + - a node ID or + - a GEOM point Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise - :ref:`tui_extrusion` example - """ + Example: :ref:`tui_extrusion` + """ unRegister = genObjUnRegister() nodes = self._getIdSourceList( nodes, SMESH.NODE, unRegister ) edges = self._getIdSourceList( edges, SMESH.EDGE, unRegister ) @@ -5036,20 +5107,20 @@ class Mesh: """ Generate new elements by extrusion of the elements with given ids - Parameters: + Parameters: IDsOfElements: the list of ids of elements or nodes for extrusion - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones IsNodes: is True if elements with given ids are nodes Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise - :ref:`tui_extrusion` example - """ + Example: :ref:`tui_extrusion` + """ n,e,f = [],[],[] if IsNodes: n = IDsOfElements else : e,f, = IDsOfElements,IDsOfElements @@ -5060,29 +5131,29 @@ class Mesh: """ Generate new elements by extrusion along the normal to a discretized surface or wire - Parameters: - Elements: elements to extrude - a list including ids, groups, sub-meshes or a mesh. - Only faces can be extruded so far. A sub-mesh should be a sub-mesh on geom faces. + Parameters: + Elements: elements to extrude - a list including ids, :class:`a mesh, sub-meshes, groups or filters `. + Only faces can be extruded so far. A sub-mesh should be a sub-mesh on geom faces. StepSize: length of one extrusion step (the total extrusion - length will be *NbOfSteps* *StepSize*). + length will be *NbOfSteps* *StepSize*). NbOfSteps: number of extrusion steps. ByAverageNormal: if True each node is translated by *StepSize* - along the average of the normal vectors to the faces sharing the node; - else each node is translated along the same average normal till - intersection with the plane got by translation of the face sharing - the node along its own normal by *StepSize*. + along the average of the normal vectors to the faces sharing the node; + else each node is translated along the same average normal till + intersection with the plane got by translation of the face sharing + the node along its own normal by *StepSize*. UseInputElemsOnly: to use only *Elements* when computing extrusion direction - for every node of *Elements*. + for every node of *Elements*. MakeGroups: forces generation of new groups from existing ones. Dim: dimension of elements to extrude: 2 - faces or 1 - edges. Extrusion of edges - is not yet implemented. This parameter is used if *Elements* contains - both faces and edges, i.e. *Elements* is a Mesh. + is not yet implemented. This parameter is used if *Elements* contains + both faces and edges, i.e. *Elements* is a Mesh. Returns: - the list of created groups (SMESH_GroupBase) if *MakeGroups=True*, - empty list otherwise. - :ref:`tui_extrusion` example - """ + the list of created :class:`groups ` if *MakeGroups* == True, + empty list otherwise. + Example: :ref:`tui_extrusion` + """ unRegister = genObjUnRegister() if isinstance( Elements, Mesh ): @@ -5104,20 +5175,20 @@ class Mesh: """ Generate new elements by extrusion of the elements or nodes which belong to the object - Parameters: + Parameters: theObject: the object whose elements or nodes should be processed. - It can be a mesh, a sub-mesh or a group. - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + It can be a :class:`mesh, sub-mesh, group or filter `. + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones IsNodes: is True if elements to extrude are nodes Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - :ref:`tui_extrusion` example - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + Example: :ref:`tui_extrusion` + """ n,e,f = [],[],[] if IsNodes: n = theObject @@ -5128,19 +5199,19 @@ class Mesh: """ Generate new elements by extrusion of edges which belong to the object - Parameters: + Parameters: theObject: object whose 1D elements should be processed. - It can be a mesh, a sub-mesh or a group. - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + It can be a :class:`mesh, sub-mesh, group or filter `. + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: to generate new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - :ref:`tui_extrusion` example - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + Example: :ref:`tui_extrusion` + """ return self.ExtrusionSweepObjects([],theObject,[], StepVector, NbOfSteps, MakeGroups) @@ -5148,19 +5219,19 @@ class Mesh: """ Generate new elements by extrusion of faces which belong to the object - Parameters: + Parameters: theObject: object whose 2D elements should be processed. - It can be a mesh, a sub-mesh or a group. - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + It can be a :class:`mesh, sub-mesh, group or filter `. + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - :ref:`tui_extrusion` example - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + Example: :ref:`tui_extrusion` + """ return self.ExtrusionSweepObjects([],[],theObject, StepVector, NbOfSteps, MakeGroups) @@ -5169,20 +5240,20 @@ class Mesh: """ Generate new elements by extrusion of the elements with given ids - Parameters: + Parameters: IDsOfElements: is ids of elements - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps ExtrFlags: sets flags for extrusion SewTolerance: uses for comparing locations of nodes if flag - EXTRUSION_FLAG_SEW is set + EXTRUSION_FLAG_SEW is set MakeGroups: forces the generation of new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if isinstance( StepVector, geomBuilder.GEOM._objref_GEOM_Object): StepVector = self.smeshpyD.GetDirStruct(StepVector) @@ -5199,9 +5270,9 @@ class Mesh: The path of extrusion must be a meshed edge. Parameters: - Nodes: nodes to extrude: a list including ids, groups, sub-meshes or a mesh - Edges: edges to extrude: a list including ids, groups, sub-meshes or a mesh - Faces: faces to extrude: a list including ids, groups, sub-meshes or a mesh + Nodes: nodes to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + Edges: edges to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + Faces: faces to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` PathMesh: 1D mesh or 1D sub-mesh, along which proceeds the extrusion PathShape: shape (edge) defines the sub-mesh of PathMesh if PathMesh contains not only path segments, else it can be None @@ -5212,13 +5283,15 @@ class Mesh: LinearVariation: forces the computation of rotation angles as linear variation of the given Angles along path steps HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the - shape by default). The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the + shape by default). The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error - :ref:`tui_extrusion_along_path` example + list of created :class:`groups ` and + :class:`error code ` + Example: :ref:`tui_extrusion_along_path` """ unRegister = genObjUnRegister() @@ -5246,31 +5319,33 @@ class Mesh: HasRefPoint=False, RefPoint=[0,0,0], MakeGroups=False, ElemType=SMESH.FACE): """ - Generate new elements by extrusion of the given elements - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of the given elements. + The path of extrusion must be a meshed edge. - Parameters: - Base: mesh or group, or sub-mesh, or list of ids of elements for extrusion + Parameters: + Base: :class:`mesh, sub-mesh, group, filter `, or list of ids of elements for extrusion Path: 1D mesh or 1D sub-mesh, along which proceeds the extrusion NodeStart: the start node from Path. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles in radians LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps HasRefPoint: allows using the reference point - RefPoint: the point around which the elements are rotated (the mass - center of the elements by default). - The User can specify any point as the Reference Point. - RefPoint can be either GEOM Vertex, [x,y,z] or SMESH.PointStruct + RefPoint: the reference point around which the elements are rotated (the mass + center of the elements by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones ElemType: type of elements for extrusion (if param Base is a mesh) Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` + if *MakeGroups* == True, only :class:`error code ` + otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],[],[] if ElemType == SMESH.NODE: n = Base @@ -5286,29 +5361,31 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of the given elements - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of the given elements. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: IDsOfElements: ids of elements PathMesh: mesh containing a 1D sub-mesh on the edge, along which proceeds the extrusion - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles in radians HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` + if *MakeGroups* == True, only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],IDsOfElements,IDsOfElements gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, @@ -5322,30 +5399,32 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of the elements which belong to the object - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of the elements which belong to the object. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: theObject: the object whose elements should be processed. - It can be a mesh, a sub-mesh or a group. + It can be a :class:`mesh, sub-mesh, group or filter `. PathMesh: mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` if *MakeGroups* == True, + only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],theObject,theObject gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, NodeStart, @@ -5358,30 +5437,32 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of mesh segments which belong to the object - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of mesh segments which belong to the object. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: theObject: the object whose 1D elements should be processed. - It can be a mesh, a sub-mesh or a group. + It can be a :class:`mesh, sub-mesh, group or filter `. PathMesh: mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles HasRefPoint: allows using the reference point - RefPoint the point: around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` if *MakeGroups* == True, + only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],theObject,[] gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, NodeStart, @@ -5394,30 +5475,32 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of faces which belong to the object - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of faces which belong to the object. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: theObject: the object whose 2D elements should be processed. - It can be a mesh, a sub-mesh or a group. + It can be a :class:`mesh, sub-mesh, group or filter `. PathMesh: mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` if *MakeGroups* == True, + only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],[],theObject gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, NodeStart, @@ -5430,17 +5513,17 @@ class Mesh: """ Create a symmetrical copy of mesh elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Mirror: is AxisStruct or geom object(point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary + Mirror: is :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary Copy: allows to copy element (Copy is 1) or to replace with its mirroring (Copy is 0) MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5458,17 +5541,17 @@ class Mesh: """ Create a new mesh by a symmetrical copy of mesh elements - Parameters: + Parameters: IDsOfElements: the list of elements ids - Mirror: is AxisStruct or geom object (point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary + Mirror: is :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary MakeGroups: to generate new groups from existing ones NewMeshName: a name of the new mesh to create Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5485,17 +5568,17 @@ class Mesh: """ Create a symmetrical copy of the object - Parameters: - theObject: mesh, submesh or group - Mirror: AxisStruct or geom object (point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary - Copy: allows copying the element (Copy is 1) or replacing it with its mirror (Copy is 0) + Parameters: + theObject: :class:`mesh, sub-mesh, group or filter ` + Mirror: :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary + Copy: allows copying the element (Copy==True) or replacing it with its mirror (Copy==False) MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5513,17 +5596,17 @@ class Mesh: """ Create a new mesh by a symmetrical copy of the object - Parameters: - theObject: mesh, submesh or group - Mirror: AxisStruct or geom object (point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary + Parameters: + theObject: :class:`mesh, sub-mesh, group or filter ` + Mirror: :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the new mesh to create Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5540,15 +5623,15 @@ class Mesh: """ Translate the elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Vector: the direction of translation (DirStruct or vector or 3 vector components) + Vector: the direction of translation (:class:`SMESH.DirStruct` or vector or 3 vector components) Copy: allows copying the translated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5566,15 +5649,15 @@ class Mesh: """ Create a new mesh of translated elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Vector: the direction of translation (DirStruct or vector or 3 vector components) + Vector: the direction of translation (:class:`SMESH.DirStruct` or vector or 3 vector components) MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5590,15 +5673,15 @@ class Mesh: """ Translate the object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - Vector: direction of translation (DirStruct or geom vector or 3 vector components) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + Vector: direction of translation (:class:`SMESH.DirStruct` or geom vector or 3 vector components) Copy: allows copying the translated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5616,15 +5699,15 @@ class Mesh: """ Create a new mesh from the translated object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - Vector: the direction of translation (DirStruct or geom vector or 3 vector components) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + Vector: the direction of translation (:class:`SMESH.DirStruct` or geom vector or 3 vector components) MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if isinstance( theObject, Mesh ): theObject = theObject.GetMesh() @@ -5642,18 +5725,18 @@ class Mesh: """ Scale the object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - thePoint: base point for scale (SMESH.PointStruct or list of 3 coordinates) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + thePoint: base point for scale (:class:`SMESH.PointStruct` or list of 3 coordinates) theScaleFact: list of 1-3 scale factors for axises Copy: allows copying the translated elements MakeGroups: forces the generation of new groups from existing - ones (if Copy) + ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, - empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, + empty list otherwise + """ unRegister = genObjUnRegister() if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5678,16 +5761,16 @@ class Mesh: """ Create a new mesh from the translated object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - thePoint: base point for scale (SMESH.PointStruct or list of 3 coordinates) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + thePoint: base point for scale (:class:`SMESH.PointStruct` or list of 3 coordinates) theScaleFact: list of 1-3 scale factors for axises MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ unRegister = genObjUnRegister() if (isinstance(theObject, Mesh)): theObject = theObject.GetMesh() @@ -5712,16 +5795,16 @@ class Mesh: """ Rotate the elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Axis: the axis of rotation (AxisStruct or geom line) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees Copy: allows copying the rotated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if IDsOfElements == []: @@ -5740,16 +5823,16 @@ class Mesh: """ Create a new mesh of rotated elements - Parameters: + Parameters: IDsOfElements: list of element ids - Axis: the axis of rotation (AxisStruct or geom line) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5766,16 +5849,16 @@ class Mesh: """ Rotate the object - Parameters: - theObject: the object to rotate( mesh, submesh, or group) - Axis: the axis of rotation (AxisStruct or geom line) + Parameters: + theObject: the object to rotate (:class:`mesh, sub-mesh, group or filter `) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees Copy: allows copying the rotated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if MakeGroups==True, empty list otherwise + """ if (isinstance(theObject, Mesh)): theObject = theObject.GetMesh() @@ -5793,16 +5876,16 @@ class Mesh: """ Create a new mesh from the rotated object - Parameters: - theObject: the object to rotate (mesh, submesh, or group) - Axis: the axis of rotation (AxisStruct or geom line) + Parameters: + theObject: the object to rotate (:class:`mesh, sub-mesh, group or filter `) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if (isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5815,24 +5898,26 @@ class Mesh: self.mesh.SetParameters(Parameters) return Mesh( self.smeshpyD, self.geompyD, mesh ) - def Offset(self, theObject, theValue, MakeGroups=False, NewMeshName=''): + def Offset(self, theObject, Value, MakeGroups=False, CopyElements=False, NewMeshName=''): """ Create an offset mesh from the given 2D object - Parameters: - theObject: the source object (mesh, submesh, group or filter) - theValue: signed offset size - MakeGroups: forces the generation of new groups from existing ones - NewMeshName: the name of a mesh to create. If empty, offset elements are added to this mesh + Parameters: + theObject (SMESH.SMESH_IDSource): the source object (mesh, sub-mesh, group or filter) + theValue (float): signed offset size + MakeGroups (boolean): forces the generation of new groups from existing ones + CopyElements (boolean): if *NewMeshName* is empty, True means to keep original elements, + False means to remove original elements. + NewMeshName (string): the name of a mesh to create. If empty, offset elements are added to this mesh Returns: - A tuple (mesh, list_of_groups) + A tuple (:class:`Mesh`, list of :class:`groups `) """ if isinstance( theObject, Mesh ): theObject = theObject.GetMesh() - theValue,Parameters,hasVars = ParseParameters(theValue) - mesh_groups = self.editor.Offset(theObject, theValue, MakeGroups, NewMeshName ) + theValue,Parameters,hasVars = ParseParameters(Value) + mesh_groups = self.editor.Offset(theObject, Value, MakeGroups, CopyElements, NewMeshName) self.mesh.SetParameters(Parameters) # if mesh_groups[0]: # return Mesh( self.smeshpyD, self.geompyD, mesh_groups[0] ), mesh_groups[1] @@ -5842,15 +5927,15 @@ class Mesh: """ Find groups of adjacent nodes within Tolerance. - Parameters: - Tolerance: the value of tolerance - SeparateCornerAndMediumNodes: if *True*, in quadratic mesh puts - corner and medium nodes in separate groups thus preventing - their further merge. + Parameters: + Tolerance (float): the value of tolerance + SeparateCornerAndMediumNodes (boolean): if *True*, in quadratic mesh puts + corner and medium nodes in separate groups thus preventing + their further merge. Returns: the list of groups of nodes IDs (e.g. [[1,12,13],[4,25]]) - """ + """ return self.editor.FindCoincidentNodes( Tolerance, SeparateCornerAndMediumNodes ) @@ -5859,17 +5944,17 @@ class Mesh: """ Find groups of ajacent nodes within Tolerance. - Parameters: + Parameters: Tolerance: the value of tolerance - SubMeshOrGroup: SubMesh, Group or Filter + SubMeshOrGroup: :class:`sub-mesh, group or filter ` exceptNodes: list of either SubMeshes, Groups or node IDs to exclude from search SeparateCornerAndMediumNodes: if *True*, in quadratic mesh puts - corner and medium nodes in separate groups thus preventing - their further merge. + corner and medium nodes in separate groups thus preventing + their further merge. Returns: the list of groups of nodes IDs (e.g. [[1,12,13],[4,25]]) - """ + """ unRegister = genObjUnRegister() if (isinstance( SubMeshOrGroup, Mesh )): @@ -5886,31 +5971,29 @@ class Mesh: """ Merge nodes - Parameters: - GroupsOfNodes: a list of groups of nodes IDs for merging - (e.g. [[1,12,13],[25,4]], then nodes 12, 13 and 4 will be removed and replaced - by nodes 1 and 25 correspondingly in all elements and groups + Parameters: + GroupsOfNodes: a list of groups of nodes IDs for merging. + E.g. [[1,12,13],[25,4]] means that nodes 12, 13 and 4 will be removed and replaced + in all elements and groups by nodes 1 and 25 correspondingly NodesToKeep: nodes to keep in the mesh: a list of groups, sub-meshes or node IDs. - If *NodesToKeep* does not include a node to keep for some group to merge, - then the first node in the group is kept. + If *NodesToKeep* does not include a node to keep for some group to merge, + then the first node in the group is kept. AvoidMakingHoles: prevent merging nodes which cause removal of elements becoming - invalid - """ - - - # NodesToKeep are converted to SMESH_IDSource in meshEditor.MergeNodes() + invalid + """ + # NodesToKeep are converted to SMESH.SMESH_IDSource in meshEditor.MergeNodes() self.editor.MergeNodes( GroupsOfNodes, NodesToKeep, AvoidMakingHoles ) def FindEqualElements (self, MeshOrSubMeshOrGroup=None): """ Find the elements built on the same nodes. - Parameters: - MeshOrSubMeshOrGroup: Mesh or SubMesh, or Group of elements for searching + Parameters: + MeshOrSubMeshOrGroup: :class:`mesh, sub-mesh, group or filter ` Returns: the list of groups of equal elements IDs (e.g. [[1,12,13],[4,25]]) - """ + """ if not MeshOrSubMeshOrGroup: MeshOrSubMeshOrGroup=self.mesh @@ -5922,18 +6005,18 @@ class Mesh: """ Merge elements in each given group. - Parameters: - GroupsOfElementsID: a list of groups of elements IDs for merging - (e.g. [[1,12,13],[25,4]], then elements 12, 13 and 4 will be removed and - replaced by elements 1 and 25 in all groups) - """ + Parameters: + GroupsOfElementsID: a list of groups (lists) of elements IDs for merging + (e.g. [[1,12,13],[25,4]] means that elements 12, 13 and 4 will be removed and + replaced in all groups by elements 1 and 25) + """ self.editor.MergeElements(GroupsOfElementsID) def MergeEqualElements(self): """ Leave one element and remove all other elements built on the same nodes. - """ + """ self.editor.MergeEqualElements() @@ -5943,7 +6026,7 @@ class Mesh: Returns: list of SMESH.FreeBorder's - """ + """ return self.editor.FindFreeBorders( ClosedOnly ) @@ -5951,11 +6034,11 @@ class Mesh: """ Fill with 2D elements a hole defined by a SMESH.FreeBorder. - Parameters: + Parameters: FreeBorder: either a SMESH.FreeBorder or a list on node IDs. These nodes - must describe all sequential nodes of the hole border. The first and the last - nodes must be the same. Use FindFreeBorders() to get nodes of holes. - """ + must describe all sequential nodes of the hole border. The first and the last + nodes must be the same. Use :meth:`FindFreeBorders` to get nodes of holes. + """ if holeNodes and isinstance( holeNodes, list ) and isinstance( holeNodes[0], int ): @@ -5968,13 +6051,13 @@ class Mesh: """ Return groups of FreeBorder's coincident within the given tolerance. - Parameters: + Parameters: tolerance: the tolerance. If the tolerance <= 0.0 then one tenth of an average - size of elements adjacent to free borders being compared is used. + size of elements adjacent to free borders being compared is used. Returns: SMESH.CoincidentFreeBorders structure - """ + """ return self.editor.FindCoincidentFreeBorders( tolerance ) @@ -5982,24 +6065,24 @@ class Mesh: """ Sew FreeBorder's of each group - Parameters: + Parameters: freeBorders: either a SMESH.CoincidentFreeBorders structure or a list of lists - where each enclosed list contains node IDs of a group of coincident free - borders such that each consequent triple of IDs within a group describes - a free border in a usual way: n1, n2, nLast - i.e. 1st node, 2nd node and - last node of a border. - For example [[1, 2, 10, 20, 21, 40], [11, 12, 15, 55, 54, 41]] describes two - groups of coincident free borders, each group including two borders. + where each enclosed list contains node IDs of a group of coincident free + borders such that each consequent triple of IDs within a group describes + a free border in a usual way: n1, n2, nLast - i.e. 1st node, 2nd node and + last node of a border. + For example [[1, 2, 10, 20, 21, 40], [11, 12, 15, 55, 54, 41]] describes two + groups of coincident free borders, each group including two borders. createPolygons: if :code:`True` faces adjacent to free borders are converted to - polygons if a node of opposite border falls on a face edge, else such - faces are split into several ones. + polygons if a node of opposite border falls on a face edge, else such + faces are split into several ones. createPolyhedra: if :code:`True` volumes adjacent to free borders are converted to - polyhedra if a node of opposite border falls on a volume edge, else such - volumes, if any, remain intact and the mesh becomes non-conformal. + polyhedra if a node of opposite border falls on a volume edge, else such + volumes, if any, remain intact and the mesh becomes non-conformal. Returns: a number of successfully sewed groups - """ + """ if freeBorders and isinstance( freeBorders, list ): # construct SMESH.CoincidentFreeBorders @@ -6029,8 +6112,8 @@ class Mesh: Sew free borders Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewFreeBorders(FirstNodeID1, SecondNodeID1, LastNodeID1, FirstNodeID2, SecondNodeID2, LastNodeID2, @@ -6042,8 +6125,8 @@ class Mesh: Sew conform free borders Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewConformFreeBorders(FirstNodeID1, SecondNodeID1, LastNodeID1, FirstNodeID2, SecondNodeID2) @@ -6054,8 +6137,8 @@ class Mesh: Sew border to side Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewBorderToSide(FirstNodeIDOnFreeBorder, SecondNodeIDOnFreeBorder, LastNodeIDOnFreeBorder, FirstNodeIDOnSide, LastNodeIDOnSide, CreatePolygons, CreatePolyedrs) @@ -6065,15 +6148,15 @@ class Mesh: NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge): """ Sew two sides of a mesh. The nodes belonging to Side1 are - merged with the nodes of elements of Side2. - The number of elements in theSide1 and in theSide2 must be - equal and they should have similar nodal connectivity. - The nodes to merge should belong to side borders and - the first node should be linked to the second. + merged with the nodes of elements of Side2. + The number of elements in theSide1 and in theSide2 must be + equal and they should have similar nodal connectivity. + The nodes to merge should belong to side borders and + the first node should be linked to the second. Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewSideElements(IDsOfSide1Elements, IDsOfSide2Elements, NodeID1OfSide1ToMerge, NodeID1OfSide2ToMerge, @@ -6083,65 +6166,67 @@ class Mesh: """ Set new nodes for the given element. - Parameters: - ide: the element id - newIDs: nodes ids + Parameters: + ide: the element ID + newIDs: nodes IDs Returns: - If the number of nodes does not correspond to the type of element - return false - """ + False if the number of nodes does not correspond to the type of element + """ return self.editor.ChangeElemNodes(ide, newIDs) def GetLastCreatedNodes(self): """ - If during the last operation of MeshEditor some nodes were - created, this method return the list of their IDs, \n - if new nodes were not created - return empty list + If during the last operation of :class:`SMESH.SMESH_MeshEditor` some nodes were + created, this method return the list of their IDs. + If new nodes were not created - return empty list Returns: the list of integer values (can be empty) - """ + """ return self.editor.GetLastCreatedNodes() def GetLastCreatedElems(self): """ - If during the last operation of MeshEditor some elements were - created this method return the list of their IDs, \n - if new elements were not created - return empty list + If during the last operation of :class:`SMESH.SMESH_MeshEditor` some elements were + created this method return the list of their IDs. + If new elements were not created - return empty list Returns: the list of integer values (can be empty) - """ + """ return self.editor.GetLastCreatedElems() def ClearLastCreated(self): """ Forget what nodes and elements were created by the last mesh edition operation - """ + """ self.editor.ClearLastCreated() def DoubleElements(self, theElements, theGroupName=""): """ Create duplicates of given elements, i.e. create new elements based on the - same nodes as the given ones. + same nodes as the given ones. - Parameters: - theElements: container of elements to duplicate. It can be a Mesh, - sub-mesh, group, filter or a list of element IDs. If *theElements* is - a Mesh, elements of highest dimension are duplicated + Parameters: + theElements: container of elements to duplicate. It can be a + :class:`mesh, sub-mesh, group, filter ` + or a list of element IDs. If *theElements* is + a :class:`Mesh`, elements of highest dimension are duplicated theGroupName: a name of group to contain the generated elements. - If a group with such a name already exists, the new elements - are added to the existng group, else a new group is created. - If *theGroupName* is empty, new elements are not added - in any group. + If a group with such a name already exists, the new elements + are added to the existng group, else a new group is created. + If *theGroupName* is empty, new elements are not added + in any group. - Returns: - a group where the new elements are added. None if theGroupName == "". - """ + Returns: + a :class:`group ` where the new elements are added. + None if *theGroupName* == "". + """ unRegister = genObjUnRegister() if isinstance( theElements, Mesh ): @@ -6155,47 +6240,47 @@ class Mesh: """ Create a hole in a mesh by doubling the nodes of some particular elements - Parameters: - theNodes: identifiers of nodes to be doubled - theModifiedElems: identifiers of elements to be updated by the new (doubled) - nodes. If list of element identifiers is empty then nodes are doubled but - they not assigned to elements + Parameters: + theNodes: IDs of nodes to be doubled + theModifiedElems: IDs of elements to be updated by the new (doubled) + nodes. If list of element identifiers is empty then nodes are doubled but + they not assigned to elements Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodes(theNodes, theModifiedElems) def DoubleNode(self, theNodeId, theModifiedElems): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theNodeId: identifiers of node to be doubled - theModifiedElems: identifiers of elements to be updated + Parameters: + theNodeId: IDs of node to double + theModifiedElems: IDs of elements to update Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNode(theNodeId, theModifiedElems) def DoubleNodeGroup(self, theNodes, theModifiedElems, theMakeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theNodes: group of nodes to be doubled - theModifiedElems: group of elements to be updated. + Parameters: + theNodes: group of nodes to double. + theModifiedElems: group of elements to update. theMakeGroup: forces the generation of a group containing new nodes. Returns: - TRUE or a created group if operation has been completed successfully, - FALSE or None otherwise - """ + True or a created group if operation has been completed successfully, + False or None otherwise + """ if theMakeGroup: return self.editor.DoubleNodeGroupNew(theNodes, theModifiedElems) @@ -6203,17 +6288,17 @@ class Mesh: def DoubleNodeGroups(self, theNodes, theModifiedElems, theMakeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theNodes: list of groups of nodes to be doubled - theModifiedElems: list of groups of elements to be updated. + Parameters: + theNodes: list of groups of nodes to double. + theModifiedElems: list of groups of elements to update. theMakeGroup: forces the generation of a group containing new nodes. Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ if theMakeGroup: return self.editor.DoubleNodeGroupsNew(theNodes, theModifiedElems) @@ -6223,16 +6308,16 @@ class Mesh: """ Create a hole in a mesh by doubling the nodes of some particular elements - Parameters: - theElems: the list of elements (edges or faces) to be replicated - The nodes for duplication could be found from these elements - theNodesNot: list of nodes to NOT replicate + Parameters: + theElems: the list of elements (edges or faces) to replicate. + The nodes for duplication could be found from these elements + theNodesNot: list of nodes NOT to replicate theAffectedElems: the list of elements (cells and edges) to which the - replicated nodes should be associated to. + replicated nodes should be associated to Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodeElem(theElems, theNodesNot, theAffectedElems) @@ -6240,38 +6325,38 @@ class Mesh: """ Create a hole in a mesh by doubling the nodes of some particular elements - Parameters: - theElems: the list of elements (edges or faces) to be replicated - The nodes for duplication could be found from these elements - theNodesNot: list of nodes to NOT replicate + Parameters: + theElems: the list of elements (edges or faces) to replicate. + The nodes for duplication could be found from these elements + theNodesNot: list of nodes NOT to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. + located on or inside shape). + The replicated nodes should be associated to affected elements. Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodeElemInRegion(theElems, theNodesNot, theShape) def DoubleNodeElemGroup(self, theElems, theNodesNot, theAffectedElems, theMakeGroup=False, theMakeNodeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: group of of elements (edges or faces) to be replicated - theNodesNot: group of nodes not to replicated + Parameters: + theElems: group of of elements (edges or faces) to replicate. + theNodesNot: group of nodes NOT to replicate. theAffectedElems: group of elements to which the replicated nodes - should be associated to. + should be associated to. theMakeGroup: forces the generation of a group containing new elements. theMakeNodeGroup: forces the generation of a group containing new nodes. Returns: - TRUE or created groups (one or two) if operation has been completed successfully, - FALSE or None otherwise - """ + True or created groups (one or two) if operation has been completed successfully, + False or None otherwise + """ if theMakeGroup or theMakeNodeGroup: twoGroups = self.editor.DoubleNodeElemGroup2New(theElems, theNodesNot, @@ -6285,37 +6370,37 @@ class Mesh: def DoubleNodeElemGroupInRegion(self, theElems, theNodesNot, theShape): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: group of of elements (edges or faces) to be replicated - theNodesNot: group of nodes not to replicated + Parameters: + theElems: group of of elements (edges or faces) to replicate + theNodesNot: group of nodes not to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. - """ + located on or inside shape). + The replicated nodes should be associated to affected elements + """ return self.editor.DoubleNodeElemGroupInRegion(theElems, theNodesNot, theShape) def DoubleNodeElemGroups(self, theElems, theNodesNot, theAffectedElems, theMakeGroup=False, theMakeNodeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: list of groups of elements (edges or faces) to be replicated - theNodesNot: list of groups of nodes not to replicated + Parameters: + theElems: list of groups of elements (edges or faces) to replicate + theNodesNot: list of groups of nodes NOT to replicate theAffectedElems: group of elements to which the replicated nodes - should be associated to. - theMakeGroup: forces the generation of a group containing new elements. - theMakeNodeGroup: forces the generation of a group containing new nodes. + should be associated to + theMakeGroup: forces generation of a group containing new elements. + theMakeNodeGroup: forces generation of a group containing new nodes Returns: - TRUE or created groups (one or two) if operation has been completed successfully, - FALSE or None otherwise - """ + True or created groups (one or two) if operation has been completed successfully, + False or None otherwise + """ if theMakeGroup or theMakeNodeGroup: twoGroups = self.editor.DoubleNodeElemGroups2New(theElems, theNodesNot, @@ -6329,88 +6414,88 @@ class Mesh: def DoubleNodeElemGroupsInRegion(self, theElems, theNodesNot, theShape): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: list of groups of elements (edges or faces) to be replicated - theNodesNot: list of groups of nodes not to replicated + Parameters: + theElems: list of groups of elements (edges or faces) to replicate + theNodesNot: list of groups of nodes NOT to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. + located on or inside shape). + The replicated nodes should be associated to affected elements Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodeElemGroupsInRegion(theElems, theNodesNot, theShape) def AffectedElemGroupsInRegion(self, theElems, theNodesNot, theShape): """ - Identify the elements that will be affected by node duplication (actual duplication is not performed. - This method is the first step of DoubleNodeElemGroupsInRegion. + Identify the elements that will be affected by node duplication (actual duplication is not performed). + This method is the first step of :meth:`DoubleNodeElemGroupsInRegion`. - Parameters: - theElems: list of groups of nodes or elements (edges or faces) to be replicated - theNodesNot: list of groups of nodes not to replicated + Parameters: + theElems: list of groups of nodes or elements (edges or faces) to replicate + theNodesNot: list of groups of nodes NOT to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. + located on or inside shape). + The replicated nodes should be associated to affected elements Returns: - groups of affected elements in order:: volumes, faces, edges - """ + groups of affected elements in order: volumes, faces, edges + """ return self.editor.AffectedElemGroupsInRegion(theElems, theNodesNot, theShape) def DoubleNodesOnGroupBoundaries(self, theDomains, createJointElems, onAllBoundaries=False ): """ Double nodes on shared faces between groups of volumes and create flat elements on demand. - The list of groups must describe a partition of the mesh volumes. - The nodes of the internal faces at the boundaries of the groups are doubled. - In option, the internal faces are replaced by flat elements. - Triangles are transformed in prisms, and quadrangles in hexahedrons. + The list of groups must describe a partition of the mesh volumes. + The nodes of the internal faces at the boundaries of the groups are doubled. + In option, the internal faces are replaced by flat elements. + Triangles are transformed to prisms, and quadrangles to hexahedrons. - Parameters: + Parameters: theDomains: list of groups of volumes - createJointElems: if TRUE, create the elements - onAllBoundaries: if TRUE, the nodes and elements are also created on - the boundary between *theDomains* and the rest mesh + createJointElems: if True, create the elements + onAllBoundaries: if True, the nodes and elements are also created on + the boundary between *theDomains* and the rest mesh Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodesOnGroupBoundaries( theDomains, createJointElems, onAllBoundaries ) def CreateFlatElementsOnFacesGroups(self, theGroupsOfFaces ): """ Double nodes on some external faces and create flat elements. - Flat elements are mainly used by some types of mechanic calculations. + Flat elements are mainly used by some types of mechanic calculations. - Each group of the list must be constituted of faces. - Triangles are transformed in prisms, and quadrangles in hexahedrons. + Each group of the list must be constituted of faces. + Triangles are transformed in prisms, and quadrangles in hexahedrons. - Parameters: + Parameters: theGroupsOfFaces: list of groups of faces Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.CreateFlatElementsOnFacesGroups( theGroupsOfFaces ) def CreateHoleSkin(self, radius, theShape, groupName, theNodesCoords): """ - identify all the elements around a geom shape, get the faces delimiting the hole - """ + Identify all the elements around a geom shape, get the faces delimiting the hole + """ return self.editor.CreateHoleSkin( radius, theShape, groupName, theNodesCoords ) def MakePolyLine(self, segments, groupName='', isPreview=False ): """ Create a polyline consisting of 1D mesh elements each lying on a 2D element of the initial mesh. Positions of new nodes are found by cutting the mesh by the - plane passing through pairs of points specified by each PolySegment structure. + plane passing through pairs of points specified by each :class:`SMESH.PolySegment` structure. If there are several paths connecting a pair of points, the shortest path is selected by the module. Position of the cutting plane is defined by the two points and an optional vector lying on the plane specified by a PolySegment. @@ -6419,14 +6504,13 @@ class Mesh: The vector goes from the middle point to the projection point. In case of planar mesh, the vector is normal to the mesh. - Parameters: - segments - PolySegment's defining positions of cutting planes. - groupName - optional name of a group where created mesh segments will - be added. + *segments* [i].vector returns the used vector which goes from the middle point to its projection. + + Parameters: + segments: list of :class:`SMESH.PolySegment` defining positions of cutting planes. + groupName: optional name of a group where created mesh segments will be added. - Returns: - The used vector which goes from the middle point to its projection. - """ + """ editor = self.editor if isPreview: editor = self.mesh.GetMeshEditPreviewer() @@ -6441,15 +6525,13 @@ class Mesh: """ Return a cached numerical functor by its type. - Parameters: - theCriterion functor type: an item of SMESH.FunctorType enumeration. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + funcType: functor type: an item of :class:`SMESH.FunctorType` enumeration. + Note that not all items correspond to numerical functors. Returns: - SMESH_NumericalFunctor. The functor is already initialized - with a mesh - """ + :class:`SMESH.NumericalFunctor`. The functor is already initialized with a mesh + """ fn = self.functors[ funcType._v ] if not fn: @@ -6462,15 +6544,14 @@ class Mesh: """ Return value of a functor for a given element - Parameters: - funcType: an item of SMESH.FunctorType enum - Type "SMESH.FunctorType._items" in the Python Console to see all items. + Parameters: + funcType: an item of :class:`SMESH.FunctorType` enum. elemId: element or node ID isElem: *elemId* is ID of element or node Returns: the functor value or zero in case of invalid arguments - """ + """ fn = self.GetFunctor( funcType ) if fn.GetElementType() == self.GetElementType(elemId, isElem): @@ -6484,11 +6565,11 @@ class Mesh: Get length of 1D element or sum of lengths of all 1D mesh elements Parameters: - elemId mesh element ID (if not defined - sum of length of all 1D elements will be calculated) + elemId: mesh element ID (if not defined - sum of length of all 1D elements will be calculated) Returns: element's length value if *elemId* is specified or sum of all 1D mesh elements' lengths otherwise - """ + """ length = 0 if elemId == None: @@ -6500,11 +6581,11 @@ class Mesh: def GetArea(self, elemId=None): """ Get area of 2D element or sum of areas of all 2D mesh elements - elemId mesh element ID (if not defined - sum of areas of all 2D elements will be calculated) + elemId mesh element ID (if not defined - sum of areas of all 2D elements will be calculated) Returns: element's area value if *elemId* is specified or sum of all 2D mesh elements' areas otherwise - """ + """ area = 0 if elemId == None: @@ -6516,11 +6597,13 @@ class Mesh: def GetVolume(self, elemId=None): """ Get volume of 3D element or sum of volumes of all 3D mesh elements - elemId mesh element ID (if not defined - sum of volumes of all 3D elements will be calculated) + + Parameters: + elemId: mesh element ID (if not defined - sum of volumes of all 3D elements will be calculated) Returns: element's volume value if *elemId* is specified or sum of all 3D mesh elements' volumes otherwise - """ + """ volume = 0 if elemId == None: @@ -6534,11 +6617,11 @@ class Mesh: Get maximum element length. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's maximum length value - """ + """ if self.GetElementType(elemId, True) == SMESH.VOLUME: ftype = SMESH.FT_MaxElementLength3D @@ -6551,11 +6634,11 @@ class Mesh: Get aspect ratio of 2D or 3D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's aspect ratio value - """ + """ if self.GetElementType(elemId, True) == SMESH.VOLUME: ftype = SMESH.FT_AspectRatio3D @@ -6568,11 +6651,11 @@ class Mesh: Get warping angle of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's warping angle value - """ + """ return self.FunctorValue(SMESH.FT_Warping, elemId) @@ -6581,11 +6664,11 @@ class Mesh: Get minimum angle of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's minimum angle value - """ + """ return self.FunctorValue(SMESH.FT_MinimumAngle, elemId) @@ -6594,11 +6677,11 @@ class Mesh: Get taper of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's taper value - """ + """ return self.FunctorValue(SMESH.FT_Taper, elemId) @@ -6607,11 +6690,11 @@ class Mesh: Get skew of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's skew value - """ + """ return self.FunctorValue(SMESH.FT_Skew, elemId) @@ -6619,14 +6702,15 @@ class Mesh: """ Return minimal and maximal value of a given functor. - Parameters: - funType a functor type, an item of SMESH.FunctorType enum - (one of SMESH.FunctorType._items) - meshPart a part of mesh (group, sub-mesh) to treat + Parameters: + funType (SMESH.FunctorType): a functor type. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to treat Returns: tuple (min,max) - """ + """ unRegister = genObjUnRegister() if isinstance( meshPart, list ): @@ -6681,13 +6765,16 @@ class submeshProxy(SMESH._objref_SMESH_subMesh): def Compute(self,refresh=False): """ Compute the sub-mesh and return the status of the computation - refresh if *True*, Object browser is automatically updated (when running in GUI) + + Parameters: + refresh: if *True*, Object Browser is automatically updated (when running in GUI) Returns: True or False - This is a method of SMESH.SMESH_submesh that can be obtained via Mesh.GetSubMesh() or - :meth:`smeshBuilder.Mesh.GetSubMesh`. - """ + + This is a method of SMESH.SMESH_submesh that can be obtained via Mesh.GetSubMesh() or + :meth:`smeshBuilder.Mesh.GetSubMesh`. + """ if not self.mesh: self.mesh = Mesh( smeshBuilder(), None, self.GetMesh()) @@ -6796,8 +6883,8 @@ class algoCreator: def add(self, algoClass): """ - Store a python class of algorithm - """ + Store a python class of algorithm + """ if type( algoClass ).__name__ == 'classobj' and \ hasattr( algoClass, "algoType"): self.algoTypeToClass[ algoClass.algoType ] = algoClass @@ -6807,9 +6894,9 @@ class algoCreator: #print "Add",algoClass.algoType, "dflt",self.defaultAlgoType def copy(self, mesh): - """ - Create a copy of self and assign mesh to the copy - """ + """ + Create a copy of self and assign mesh to the copy + """ other = algoCreator( self.method ) other.defaultAlgoType = self.defaultAlgoType @@ -6818,9 +6905,9 @@ class algoCreator: return other def __call__(self,algo="",geom=0,*args): - """ - Create an instance of algorithm - """ + """ + Create an instance of algorithm + """ algoType = "" shape = 0 if isinstance( algo, str ): @@ -6870,9 +6957,9 @@ class hypMethodWrapper: return def __call__(self,*args): - """ - call a method of hypothesis with calling SetVarParameter() before - """ + """ + call a method of hypothesis with calling SetVarParameter() before + """ if not args: return self.method( self.hyp, *args ) # hypothesis method with no args @@ -6927,8 +7014,8 @@ for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ): try: exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName)) except Exception, e: - from salome_utils import verbose - if verbose(): print "Exception while loading %s: %s" % ( pluginBuilderName, e ) + from salome_utils import verbose + if verbose(): print "Exception while loading %s: %s" % ( pluginBuilderName, e ) continue exec( "from salome.%s import %s" % (pluginName, pluginBuilderName)) plugin = eval( pluginBuilderName )