From: Grigory ZHIVOTOVSKY Date: Tue, 14 Aug 2018 13:33:28 +0000 (+0300) Subject: Create Build/Vertex help page X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e43d27883ab40c3c423ef5efd5e3a22c2e035d54;p=modules%2Fshaper.git Create Build/Vertex help page --- diff --git a/src/PrimitivesPlugin/doc/TUI_torusFeature.rst b/src/PrimitivesPlugin/doc/TUI_torusFeature.rst new file mode 100644 index 000000000..6690d7bef --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_torusFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_torus: + +Create / Cone +============= + +.. literalinclude:: examples/torus.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/examples/torus.py b/src/PrimitivesPlugin/doc/examples/torus.py new file mode 100755 index 000000000..2603cdaac --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/torus.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Torus_1 = model.addTorus(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 15, 3) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/images/Torus_button.png b/src/PrimitivesPlugin/doc/images/Torus_button.png new file mode 100755 index 000000000..c1e0c2156 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Torus_button.png differ diff --git a/src/PrimitivesPlugin/doc/images/Torus_res.png b/src/PrimitivesPlugin/doc/images/Torus_res.png new file mode 100644 index 000000000..0a86b47e0 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Torus_res.png differ diff --git a/src/PrimitivesPlugin/doc/torusFeature.rst b/src/PrimitivesPlugin/doc/torusFeature.rst index 6b5be953a..5d3d55839 100644 --- a/src/PrimitivesPlugin/doc/torusFeature.rst +++ b/src/PrimitivesPlugin/doc/torusFeature.rst @@ -2,9 +2,55 @@ Torus ===== +To create a Torus in the active part: + +#. select in the Main Menu *Primitives - > Torus* item or +#. click **Torus** button in the toolbar + +.. image:: images/Torus_button.png + :align: center + +.. centered:: + **Torus** button + +The following property panel appears. .. image:: images/Torus.png :align: center .. centered:: - Create a torus + Torus + + The description of input fields is given below: + +- selected **Point** defines center of the torus; +- selected **Vector** defines the axis of the torus; +- Dimensions: + - **Radius**; + - **Ring radius**. + +**Apply** button creates torus with defined parameters. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addTorus(Part_doc, Point, Axis, Radius1, Radius2)* + +**Arguments**: 1 Part + 1 vertex + 1 vector + 2 values (Dimensions: first and second radii). + +The Result of operation will be a SOLID. + +Name is assigned automatically: + +* **Torus_1**, **Torus_2**, ... to Feature; +* **Torus_1_1**, **Torus_2_1**, ... to Result. + +Example is shown below. + +.. image:: images/Torus_res.png + :align: center + +.. centered:: + Torus created + +**See Also** a sample TUI Script of a :ref:`tui_create_torus` operation. +