]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Create Build/Vertex help page
authorGrigory ZHIVOTOVSKY <gzy@salomex.nnov.opencascade.com>
Tue, 14 Aug 2018 13:33:28 +0000 (16:33 +0300)
committerGrigory ZHIVOTOVSKY <gzy@salomex.nnov.opencascade.com>
Tue, 14 Aug 2018 13:33:28 +0000 (16:33 +0300)
src/PrimitivesPlugin/doc/TUI_torusFeature.rst [new file with mode: 0644]
src/PrimitivesPlugin/doc/examples/torus.py [new file with mode: 0755]
src/PrimitivesPlugin/doc/images/Torus_button.png [new file with mode: 0755]
src/PrimitivesPlugin/doc/images/Torus_res.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/torusFeature.rst

diff --git a/src/PrimitivesPlugin/doc/TUI_torusFeature.rst b/src/PrimitivesPlugin/doc/TUI_torusFeature.rst
new file mode 100644 (file)
index 0000000..6690d7b
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_torus:
+
+Create / Cone
+=============
+
+.. literalinclude:: examples/torus.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/torus.py>` 
+   
diff --git a/src/PrimitivesPlugin/doc/examples/torus.py b/src/PrimitivesPlugin/doc/examples/torus.py
new file mode 100755 (executable)
index 0000000..2603cda
--- /dev/null
@@ -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 (executable)
index 0000000..c1e0c21
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 (file)
index 0000000..0a86b47
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Torus_res.png differ
index 6b5be953a1b51324835e6ae4687b8db0eca9a6a2..5d3d558392fb7e33a0b6435360a93ce4d427b55d 100644 (file)
@@ -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.
+