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
salome.salome_init()

View File

@ -1,4 +1,4 @@
# Use existing faces algorithm
# Usage of "Use Faces to be Created Manually" algorithm
import salome
@ -109,8 +109,8 @@ mesh.Compute()
# compute 2D mesh
mesh.Quadrangle()
mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing()
mesh.UseExistingFaces(f2)
mesh.UseExistingFaces(f1) # UseExistingFaces() allows using my2DMeshing();
mesh.UseExistingFaces(f2) # assign UseExistingFaces() BEFORE calling my2DMeshing()!
my2DMeshing( f1 )
my2DMeshing( f2 )
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 radial_quadrangle_1D2D_algo_page "for meshing special 2d faces (circles and part of circles)"</li>
</ul>
\ref use_existing_anchor "Use existing edges" and
\ref use_existing_anchor "Use existing faces" algorithms can be
\ref use_existing_anchor "Use Edges to be Created Manually" and
\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.
\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>
\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
(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
this, there exist two algorithms: <b>Use existing edges</b> and <b>Use
existing faces</b>.
For example, you want to use standard algorithms to generate 1D and 3D
this, there exist two algorithms: <b>Use Edges to be Created
Manually</b> and <b>Use Faces to be Created Manually</b>.
Imagine, you want to use standard algorithms to generate 1D and 3D
meshes and to create 2D mesh by your python code. Then you
<ol>
<li> create a mesh object, assign a 1D algorithm,</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> invoke \b Compute command, which computes a 3D mesh.</li>
</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
\ref tui_use_existing_faces "Use existing faces" algorithm for
construction of a 2D mesh using Python commands.
\ref tui_use_existing_faces "Use Faces to be Created Manually"
algorithm for construction of a 2D mesh using Python commands.
\image html use_existing_face_sample_mesh.png
<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.
\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
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>
</ul>
</li>
<li>\ref tui_import "Use Existing Elements" algorithm</li>
<li>\ref tui_import "Import 2D Elements from Another Mesh" algorithm</li>
</ul>
<br>
@ -124,7 +124,7 @@ This page provides example codes of \ref tui_defining_meshing_algos
\tui_script{defining_hypotheses_ex15.py}
\anchor tui_import
<h2>"Use Existing Elements" example </h2>
<h2>"Import 2D Elements from Another Mesh" example </h2>
\tui_script{defining_hypotheses_ex16.py}
\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,
which is actulally just a stub allowing to use your own 2D algoritm
This sample demonstrates how to use <b>Use Faces to be Created Manually</b> algorithm,
which is actually just a stub allowing to use your own 2D algorithm
implemented in Python.
\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
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
@ -17,13 +18,14 @@ part, by storing meshes of parts in files and then fusing them
together using these algorithms.
<br>
<b>Use Existing 1D Elements</b> algorithm allows to define the mesh of
a geometrical edge (or group of edges)
<b>Import 1D Elements from Another Mesh</b> algorithm allows to define
the mesh of a geometrical edge (or group of edges)
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),
<b>Use existing 1D elements</b> in the list of 1D algorithms and click the
<em>"Add Hypothesis"</em> button.
<b>Import 1D Elements from Another Mesh</b> in the list of 1D
algorithms and click the <em>"Add Hypothesis"</em> button.
The following dialog box will appear:
\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>
</ul>
<b>Use Existing 2D Elements</b> algorithm allows to define the mesh of
a geometrical face (or group of faces)
<b>Import 2D Elements from Another Mesh</b> 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.
\n To apply this algorithm select the geometrical face to be meshed (indicated in
with the created 2D elements.<br>
To apply this algorithm select the geometrical face to be meshed (indicated in
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
<em>"Add Hypothesis"</em> button.
<b>Import 2D Elements from Another Mesh</b> in the list of 2D
algorithms and click the <em>"Add Hypothesis"</em> button.
The following dialog box will appear:
\image html hyp_source_faces.png
@ -63,7 +65,7 @@ the same groups as in the imported source mesh.</li>
</ul>
<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 type ="Import_1D"
label-id="Use Existing 1D Elements"
label-id="Import 1D Elements from Another Mesh"
icon-id ="mesh_algo_regular.png"
hypos ="ImportSource1D"
output ="EDGE"
@ -392,7 +392,7 @@
</algorithm>
<algorithm type ="Import_1D2D"
label-id ="Use Existing 2D Elements"
label-id ="Import 2D Elements from Another Mesh"
icon-id ="mesh_algo_quad.png"
hypos ="ImportSource2D"
output ="QUAD,TRIA"
@ -431,7 +431,7 @@
</algorithm>
<algorithm type ="UseExisting_1D"
label-id="Use Existing Edges"
label-id="Use Edges to be Created Manually"
icon-id ="mesh_algo_regular.png"
input ="VERTEX"
output ="EDGE"
@ -442,7 +442,7 @@
</algorithm>
<algorithm type ="UseExisting_2D"
label-id="Use Existing Faces"
label-id="Use Faces to be Created Manually"
icon-id ="mesh_algo_quad.png"
input ="EDGE"
output ="QUAD,TRIA"