-# "Use Existing Elements" example
+# "Import 2D Elements from Another Mesh" example
import salome
salome.salome_init()
-# Use existing faces algorithm
+# Usage of "Use Faces to be Created Manually" algorithm
import salome
# 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()
<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
<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"
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.
<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>
\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
/*!
-\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}
/*!
-\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
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
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
</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".
*/
</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"
</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"
</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"
</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"