Salome HOME
Redesign SALOME documentation
[modules/smesh.git] / doc / salome / gui / SMESH / input / define_mesh_by_script.rst
1 .. _use_existing_page:
2
3 **************************************
4 Use Edges/Faces to be Created Manually
5 **************************************
6
7 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. 
8
9 For example, you want to use standard algorithms to generate 1D and 3D
10 meshes and to create 2D mesh by your python code. For this, you
11
12 #. create a mesh object, assign a 1D algorithm,
13 #. invoke **Compute** command, which computes a 1D mesh,
14
15 #. assign **Use Faces to be Created Manually** and a 3D algorithm,
16 #. run your python code, which creates a 2D mesh,
17 #. invoke **Compute** command, which computes a 3D mesh.
18
19 .. 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.
20
21 Consider trying a sample script demonstrating the usage of :ref:`tui_use_existing_faces` algorithm for construction of a 2D mesh using Python commands.
22
23         .. image:: ../images/use_existing_face_sample_mesh.png
24                 :align: center
25
26 **Mesh computed by** :ref:`tui_use_existing_faces` shown in a Shrink mode.
27   
28