X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FSMESH%2Finput%2Fsmeshpy_interface.rst;h=a08cb2d0ab0207d03c82a4f8898815bba22873b4;hp=ce80d7411d90c8e4871ad583682fedb4d592c9f5;hb=3f36e2f8be3687a5c1b48595f878df46c4d81e74;hpb=5c79b298dac9a473ac3c9ed5b5a892a116d53bdf diff --git a/doc/salome/gui/SMESH/input/smeshpy_interface.rst b/doc/salome/gui/SMESH/input/smeshpy_interface.rst index ce80d7411..a08cb2d0a 100644 --- a/doc/salome/gui/SMESH/input/smeshpy_interface.rst +++ b/doc/salome/gui/SMESH/input/smeshpy_interface.rst @@ -29,7 +29,6 @@ A usual workflow to generate a mesh on geometry is following: #. Create an instance of :class:`smeshBuilder.smeshBuilder`: .. code-block:: python - :linenos: from salome.smesh import smeshBuilder smesh = smeshBuilder.New() @@ -37,13 +36,11 @@ A usual workflow to generate a mesh on geometry is following: #. Create a :class:`smeshBuilder.Mesh` object: .. code-block:: python - :linenos: mesh = smesh.Mesh( geometry ) #. Create and assign :ref:`algorithms ` by calling corresponding methods of the mesh. If a sub-shape is provided as an argument, a :ref:`sub-mesh ` is implicitly created on this sub-shape: .. code-block:: python - :linenos: regular1D = mesh.Segment() mefisto = mesh.Triangle( smeshBuilder.MEFISTO ) @@ -52,16 +49,14 @@ A usual workflow to generate a mesh on geometry is following: #. Create and assign :ref:`hypotheses ` by calling corresponding methods of algorithms: .. code-block:: python - :linenos: segLen10 = regular1D.LocalLength( 10. ) maxArea = mefisto.LocalLength( 100. ) netgen.SetMaxSize( 20. ) netgen.SetFineness( smeshBuilder.VeryCoarse ) -#. :ref:`compute_anchor` the mesh (generate mesh nodes and elements): +#. :ref:`Compute the mesh ` (generate mesh nodes and elements): .. code-block:: python - :linenos: mesh.Compute() @@ -71,10 +66,10 @@ GUI and then to get a corresponding Python script via all methods of any object in hand (e.g. a mesh group or a hypothesis) by calling *dir()* Python built-in function. -All methods of the Mesh Group can be found in :ref:`tui_create_standalone_group` sample script. +All methods of the :class:`Mesh Group ` can be found in :ref:`tui_create_standalone_group` sample script. An example below demonstrates usage of the Python API for 3D mesh -generation and for retrieving information on mesh nodes and elements. +generation and for retrieving basic information on mesh nodes, elements and groups. .. _example_3d_mesh: @@ -82,7 +77,6 @@ Example of 3d mesh generation: ############################## .. literalinclude:: ../../../examples/3dmesh.py - :linenos: :language: python :download:`Download this script <../../../examples/3dmesh.py>`