22504: [CEA 1078] The creation of a sub-mesh UseExistingFaces suppresses the created elements

Rename the algorithms in the dialog box:
- Use existing faces => Use faces to be created manually
- Use existing 2D elements => Import 1D-2D elements from another mesh

- Use existing edges => Use edges to be created manually
- Use existing 1D elements => Import 1D elements from another mesh
This commit is contained in:
eap 2014-03-18 17:28:37 +04:00
parent 0ea528b07f
commit e85ddd2bb0
9 changed files with 42 additions and 37 deletions

View File

@ -1,4 +1,4 @@
# "Use Existing Elements" example # "Import 2D Elements from Another Mesh" example
import salome import salome
salome.salome_init() salome.salome_init()

View File

@ -1,4 +1,4 @@
# Use existing faces algorithm # Usage of "Use Faces to be Created Manually" algorithm
import salome import salome
@ -109,8 +109,8 @@ mesh.Compute()
# compute 2D mesh # compute 2D mesh
mesh.Quadrangle() mesh.Quadrangle()
mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing() mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing();
mesh.UseExistingFaces(f2) mesh.UseExistingFaces(f2) # assign UseExistingFaces() BEFORE calling my2DMeshing()!
my2DMeshing( f1 ) my2DMeshing( f1 )
my2DMeshing( f2 ) my2DMeshing( f2 )
assert mesh.Compute() assert mesh.Compute()

View File

@ -59,8 +59,8 @@ There is also a number of more specific algorithms:
<li>\subpage prism_3d_algo_page "for meshing prismatic shapes"</li> <li>\subpage prism_3d_algo_page "for meshing prismatic shapes"</li>
<li>\subpage radial_quadrangle_1D2D_algo_page "for meshing special 2d faces (circles and part of circles)"</li> <li>\subpage radial_quadrangle_1D2D_algo_page "for meshing special 2d faces (circles and part of circles)"</li>
</ul> </ul>
\ref use_existing_anchor "Use existing edges" and \ref use_existing_anchor "Use Edges to be Created Manually" and
\ref use_existing_anchor "Use existing faces" algorithms can be \ref use_existing_anchor "Use Faces to be Created Manually" algorithms can be
used to create a 1D or a 2D mesh in a python script. used to create a 1D or a 2D mesh in a python script.
\ref constructing_meshes_page "Constructing meshes" page describes in \ref constructing_meshes_page "Constructing meshes" page describes in

View File

@ -347,26 +347,29 @@ By default, the information box is always shown after mesh computation operation
<br><br> <br><br>
\anchor use_existing_anchor \anchor use_existing_anchor
<h2>"Use existing edges" and "Use existing faces" algorithms</h2> <h2>"Use Edges to be Created Manually" and "Use Faces to be Created Manually" algorithms</h2>
It is possible to create a 1D or a 2D mesh in a python script It is possible to create a 1D or a 2D mesh in a python script
(using <em>AddNode, AddEdge</em> and <em>AddFace</em> commands) and (using <em>AddNode, AddEdge</em> and <em>AddFace</em> commands) and
then use such sub-meshes in the construction of a 2D or a 3D mesh. For then use such sub-meshes in the construction of a 2D or a 3D mesh. For
this, there exist two algorithms: <b>Use existing edges</b> and <b>Use this, there exist two algorithms: <b>Use Edges to be Created
existing faces</b>. Manually</b> and <b>Use Faces to be Created Manually</b>.
For example, you want to use standard algorithms to generate 1D and 3D Imagine, you want to use standard algorithms to generate 1D and 3D
meshes and to create 2D mesh by your python code. Then you meshes and to create 2D mesh by your python code. Then you
<ol> <ol>
<li> create a mesh object, assign a 1D algorithm,</li> <li> create a mesh object, assign a 1D algorithm,</li>
<li> invoke \b Compute command, which computes a 1D mesh,</li> <li> invoke \b Compute command, which computes a 1D mesh,</li>
<li> assign <b>Use existing faces</b> and a 3D algorithm,</li> <li> assign <b>Use Faces to be Created Manually</b> and a 3D algorithm,</li>
<li> run your python code, which creates a 2D mesh,</li> <li> run your python code, which creates a 2D mesh,</li>
<li> invoke \b Compute command, which computes a 3D mesh.</li> <li> invoke \b Compute command, which computes a 3D mesh.</li>
</ol> </ol>
\warning <b>Use Edges to be Created Manually</b> and <b>Use Faces to
be Created Manually</b> algorithms should be assigned _before_
mesh generation by the Python code.
Consider trying a sample script demonstrating the usage of Consider trying a sample script demonstrating the usage of
\ref tui_use_existing_faces "Use existing faces" algorithm for \ref tui_use_existing_faces "Use Faces to be Created Manually"
construction of a 2D mesh using Python commands. algorithm for construction of a 2D mesh using Python commands.
\image html use_existing_face_sample_mesh.png \image html use_existing_face_sample_mesh.png
<em> Mesh computed by \ref tui_use_existing_faces "the sample script" <em> Mesh computed by \ref tui_use_existing_faces "the sample script"

View File

@ -24,7 +24,7 @@ Note that these functions either encapsulate the python programming interface of
The functions are distributed in the python package \b salome.smesh. The functions are distributed in the python package \b salome.smesh.
\note \note
The main package \bsalome contains other sub-packages that are distributed with the other The main package \b salome contains other sub-packages that are distributed with the other
SALOME modules. For example, the KERNEL module provides the python package \b salome.kernel SALOME modules. For example, the KERNEL module provides the python package \b salome.kernel
and GEOM the package \b salome.geom. and GEOM the package \b salome.geom.

View File

@ -37,7 +37,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
<li> \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis </li> <li> \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis </li>
</ul> </ul>
</li> </li>
<li>\ref tui_import "Use Existing Elements" algorithm</li> <li>\ref tui_import "Import 2D Elements from Another Mesh" algorithm</li>
</ul> </ul>
<br> <br>
@ -124,7 +124,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
\tui_script{defining_hypotheses_ex15.py} \tui_script{defining_hypotheses_ex15.py}
\anchor tui_import \anchor tui_import
<h2>"Use Existing Elements" example </h2> <h2>"Import 2D Elements from Another Mesh" example </h2>
\tui_script{defining_hypotheses_ex16.py} \tui_script{defining_hypotheses_ex16.py}
\anchor tui_viscous_layers \anchor tui_viscous_layers

View File

@ -1,9 +1,9 @@
/*! /*!
\page tui_use_existing_faces Use existing faces algorithm \page tui_use_existing_faces Usage of "Use Faces to be Created Manually" algorithm
This sample demonstrates how to use <b>Use existing faces</b> algorithm, This sample demonstrates how to use <b>Use Faces to be Created Manually</b> algorithm,
which is actulally just a stub allowing to use your own 2D algoritm which is actually just a stub allowing to use your own 2D algorithm
implemented in Python. implemented in Python.
\tui_script{use_existing_faces.py} \tui_script{use_existing_faces.py}

View File

@ -1,8 +1,9 @@
/*! /*!
\page import_algos_page Use Existing Elements Algorithms \page import_algos_page "Import nD Elements from Another Mesh" Algorithms
\n <em>Use Existing Elements </em>algorithms allow to define the mesh of a geometrical \n <em>Import nD Elements from Another Mesh </em>algorithms allow to
define the mesh of a geometrical
object by importing suitably located mesh elements from another object by importing suitably located mesh elements from another
mesh. The mesh elements to import from the other mesh should be contained in mesh. The mesh elements to import from the other mesh should be contained in
groups. If several groups are used to mesh the same geometry, validity of groups. If several groups are used to mesh the same geometry, validity of
@ -17,13 +18,14 @@ part, by storing meshes of parts in files and then fusing them
together using these algorithms. together using these algorithms.
<br> <br>
<b>Use Existing 1D Elements</b> algorithm allows to define the mesh of <b>Import 1D Elements from Another Mesh</b> algorithm allows to define
a geometrical edge (or group of edges) the mesh of a geometrical edge (or group of edges)
by importing mesh edges contained in a group (or groups) from another mesh. by importing mesh edges contained in a group (or groups) from another mesh.
\n To apply this algorithm select the edge to be meshed (indicated in <br>
To apply this algorithm select the edge to be meshed (indicated in
the field \b Geometry of <b>Create mesh</b> dialog box), the field \b Geometry of <b>Create mesh</b> dialog box),
<b>Use existing 1D elements</b> in the list of 1D algorithms and click the <b>Import 1D Elements from Another Mesh</b> in the list of 1D
<em>"Add Hypothesis"</em> button. algorithms and click the <em>"Add Hypothesis"</em> button.
The following dialog box will appear: The following dialog box will appear:
\image html hyp_source_edges.png \image html hyp_source_edges.png
@ -38,16 +40,16 @@ mesh. In this case <b>To copy groups</b> checkbox allows to create
the same groups as in the imported source mesh.</li> the same groups as in the imported source mesh.</li>
</ul> </ul>
<b>Use Existing 2D Elements</b> algorithm allows to define the mesh of <b>Import 2D Elements from Another Mesh</b> algorithm allows to define
a geometrical face (or group of faces) the mesh of a geometrical face (or group of faces)
by importing mesh faces contained in a group (or groups) from another by importing mesh faces contained in a group (or groups) from another
(or this) mesh. 1D elements on the boundary of the geometrical face (or this) mesh. 1D elements on the boundary of the geometrical face
(if not yet present) are also created by the algorithm in conformity (if not yet present) are also created by the algorithm in conformity
with the created 2D elements. with the created 2D elements.<br>
\n To apply this algorithm select the geometrical face to be meshed (indicated in To apply this algorithm select the geometrical face to be meshed (indicated in
the field \b Geometry of <b>Create mesh</b> dialog box), the field \b Geometry of <b>Create mesh</b> dialog box),
<b>Use existing 2D elements</b> in the list of 2D algorithms and click the <b>Import 2D Elements from Another Mesh</b> in the list of 2D
<em>"Add Hypothesis"</em> button. algorithms and click the <em>"Add Hypothesis"</em> button.
The following dialog box will appear: The following dialog box will appear:
\image html hyp_source_faces.png \image html hyp_source_faces.png
@ -63,7 +65,7 @@ the same groups as in the imported source mesh.</li>
</ul> </ul>
<br><b>See Also</b> a sample TUI Script of a <br><b>See Also</b> a sample TUI Script of a
\ref tui_import "Use Existing Elements Algorithms". \ref tui_import "Import 2D Elements from Another Mesh".
*/ */

View File

@ -379,7 +379,7 @@
</algorithm> </algorithm>
<algorithm type ="Import_1D" <algorithm type ="Import_1D"
label-id="Use Existing 1D Elements" label-id="Import 1D Elements from Another Mesh"
icon-id ="mesh_algo_regular.png" icon-id ="mesh_algo_regular.png"
hypos ="ImportSource1D" hypos ="ImportSource1D"
output ="EDGE" output ="EDGE"
@ -392,7 +392,7 @@
</algorithm> </algorithm>
<algorithm type ="Import_1D2D" <algorithm type ="Import_1D2D"
label-id ="Use Existing 2D Elements" label-id ="Import 2D Elements from Another Mesh"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
hypos ="ImportSource2D" hypos ="ImportSource2D"
output ="QUAD,TRIA" output ="QUAD,TRIA"
@ -431,7 +431,7 @@
</algorithm> </algorithm>
<algorithm type ="UseExisting_1D" <algorithm type ="UseExisting_1D"
label-id="Use Existing Edges" label-id="Use Edges to be Created Manually"
icon-id ="mesh_algo_regular.png" icon-id ="mesh_algo_regular.png"
input ="VERTEX" input ="VERTEX"
output ="EDGE" output ="EDGE"
@ -442,7 +442,7 @@
</algorithm> </algorithm>
<algorithm type ="UseExisting_2D" <algorithm type ="UseExisting_2D"
label-id="Use Existing Faces" label-id="Use Faces to be Created Manually"
icon-id ="mesh_algo_quad.png" icon-id ="mesh_algo_quad.png"
input ="EDGE" input ="EDGE"
output ="QUAD,TRIA" output ="QUAD,TRIA"