X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fgui%2Finput%2Fdefine_mesh_by_script.rst;fp=doc%2Fgui%2Finput%2Fdefine_mesh_by_script.rst;h=43d7f89afbc0f0a92215b1dd3f0146c7c26b7bb4;hp=0000000000000000000000000000000000000000;hb=4cf07a14111e98e8889620ee7e6371574c31a50c;hpb=d9f4b53e489dd5857db264ede6acded7b076c9f1 diff --git a/doc/gui/input/define_mesh_by_script.rst b/doc/gui/input/define_mesh_by_script.rst new file mode 100644 index 000000000..43d7f89af --- /dev/null +++ b/doc/gui/input/define_mesh_by_script.rst @@ -0,0 +1,28 @@ +.. _use_existing_page: + +************************************** +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. + +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. + * Nodes and elements created in your script must be assigned to geometry entities by calling *SetMeshElementOnShape*, *SetNodeOnVertex*, *SetNodeOnEdge* etc. in order to be used by an algorithm of upper dimension. + +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. + +.. figure:: ../images/use_existing_face_sample_mesh.png + :align: center + +**See also** :ref:`the sample script ` creating the mesh shown in the image in a Shrink mode. +