--- /dev/null
+
+ .. _tui_create_cylinder:
+
+Create /Cylinder
+================
+
+.. literalinclude:: examples/cylinder.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/cylinder.py>`
+
--- /dev/null
+
+ .. _tui_create_sphere:
+
+Create / Sphere
+===============
+
+.. literalinclude:: examples/sphere.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/sphere.py>`
+
The description of input fields for **By dimensions** tab is given below:
-- **DX**, **DY**, **DZ** specify box dimensions along the coordinate axes for box with corner coinciding with coordinate origin.
+- **DX**, **DY**, **DZ** specify box dimensions along the coordinate axes for box with vertex coinciding with coordinate origin.
+
+**TUI Command**: *model.addBox(Part_doc, DX, DY, DZ)*
+
+**Arguments**: Name + Part + 3 values (dimensions at origin).
The description of input fields for **By two points** tab is given below:
-- **Point 1** and **Point 2** define the opposite corners of the box.
+- **Point 1** and **Point 2** define the opposite vertices of the box.
+
**Apply** button creates box with defined parameters.
-**Cancel** button cancels operation.
+**Cancel** button cancels operation.
+
+
+**TUI Command**: *model.addBox(Part_doc, FirstPoint, SecondPoint)*
+
+**Arguments**: Name + Part + 2 selected points (opposite vertices of the box)
+
The Result of operation will be a SOLID. The edges of the box will be parallel to the coordinate axes.
* **Box_1**, **Box_2**, ... to Feature;
* **Box_1_1**, **Box_2_1**, ... to Result.
+Example is shown below.
+
+.. image:: images/Boxes.png
+ :align: center
+
+.. centered::
+ Boxes created
+
**See Also** a sample TUI Script of a :ref:`tui_create_box` operation.
Cylinder
========
+To create a Cylinder in the active part:
-.. image:: images/Cylinder1.png
- :align: center
+#. select in the Main Menu *Primitives - > Cylinder* item or
+#. click **Cylinder** button in the toolbar
+
+.. image:: images/Cylinder_button.png
+ :align: center
.. centered::
- Create a cylinder
+ **Cylinder** button
+
+There are 2 algorithms for creation of a Cylinder:
+.. image:: images/Cylinder.png
+ :align: center
+
+.. centered::
+ **Cylinder**
-.. image:: images/Cylinder2.png
- :align: center
+and
+.. image:: images/Portion_cylinder.png
+ :align: center
+
.. centered::
- Create a sector of cylinder
+ **Portion of cylinder**
+
+The description of input fields for **Cylinder** tab is given below:
+
+- **Point** defines center of the cylinder base;
+- **Vector** defines the axis of the cylinder;
+- **Radius**;
+- **Height**.
+
+Input fields for ***Portion of cylinder** tab includes in addition **Angle** to create a portion of cylinder.
+
+**Apply** button creates cylinder with defined parameters.
+
+**Cancel** button cancels operation.
+
+**TUI Commands**:
+
+* *model.addCylinder(Part_doc, Point, Axis, Radius, Height)*
+* *model.addCylinder(Part_doc, Point, Axis, Radius, Height,Angle)*
+
+**Arguments**: Name + 1 Part + 1 vertex +1 vector + 2 or 3 values (dimensions: radius, height and angle).
+
+The Result of operation will be a SOLID.
+
+Name is assigned automatically:
+
+* **Cylinder_1**, **Cylinder_2**, ... to Feature;
+* **Cylinder_1_1**, **Cylinder_2_1**, ... to Result.
+
+Example is shown below.
+
+.. image:: images/Cylinders.png
+ :align: center
+
+.. centered::
+ Cylinders created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_cylinder` operation.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+Cylinder_2 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Cylinder_1_1/Face_1&Cylinder_1_1/Face_2"), model.selection("EDGE", "PartSet/OX"), 5, 10, 45)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10)
+model.do()
+model.end()
Sphere
======
+To create a Sphere in the active part:
+
+#. select in the Main Menu *Primitives - > Sphere* item or
+#. click **Sphere** button in the toolbar
+
+.. image:: images/Sphere_button.png
+ :align: center
+
+.. centered::
+ **Sphere** button
+
+The following input panel appears.
.. image:: images/Sphere.png
:align: center
.. centered::
- Create a sphere
+ Sphere input panel
+
+The description of input fields is given below:
+
+- **Point** defines center of the sphere;
+- **Radius** defines the radius.
+
+**Apply** button creates sphere with defined parameters.
+
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addSphere(Part_doc, Point, Radius)*.
+
+**Arguments**: Name + 1 Part + 1 vertex +1 value (radius).
+
+The Result of operation will be a SOLID.
+
+Name is assigned automatically:
+
+* **Sphere_1**, **Sphere_2**, ... to Feature;
+* **Sphere_1_1**, **Sphere_2_1**, ... to Result.
+
+Example is shown below.
+
+.. image:: images/Sphere_res.png
+ :align: center
+
+.. centered::
+ Sphere created
+
+**See Also** a sample TUI Script of a :ref:`tui_create_sphere` operation.