]> 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 11:06:05 +0000 (14:06 +0300)
committerGrigory ZHIVOTOVSKY <gzy@salomex.nnov.opencascade.com>
Tue, 14 Aug 2018 11:06:05 +0000 (14:06 +0300)
15 files changed:
src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst [new file with mode: 0644]
src/PrimitivesPlugin/doc/TUI_sphereFeature.rst [new file with mode: 0644]
src/PrimitivesPlugin/doc/boxFeature.rst
src/PrimitivesPlugin/doc/cylinderFeature.rst
src/PrimitivesPlugin/doc/examples/cylinder.py [new file with mode: 0644]
src/PrimitivesPlugin/doc/examples/sphere.py [new file with mode: 0644]
src/PrimitivesPlugin/doc/images/Boxes.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/images/Cylinder.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/images/Cylinder_button.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/images/Cylinders.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/images/Portion_cylinder.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/images/Sphere.png
src/PrimitivesPlugin/doc/images/Sphere_button.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/images/Sphere_res.png [new file with mode: 0644]
src/PrimitivesPlugin/doc/sphereFeature.rst

diff --git a/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst b/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst
new file mode 100644 (file)
index 0000000..9256a9d
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_cylinder:
+
+Create /Cylinder
+================
+
+.. literalinclude:: examples/cylinder.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/cylinder.py>` 
+   
diff --git a/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst b/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst
new file mode 100644 (file)
index 0000000..f4012bc
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_create_sphere:
+
+Create / Sphere
+===============
+
+.. literalinclude:: examples/sphere.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/sphere.py>` 
+   
index 84cf765e8469ecc51828fd2c463af288b10b08e5..749f5d18536ea160255b02c3827cc2f3149cef88 100644 (file)
@@ -33,15 +33,26 @@ and
 
 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.
 
@@ -50,4 +61,12 @@ Name is assigned automatically:
 * **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.
index e5f18db01ed42254e8e3a54bb21f9a714a117196..d273e81c784fd55a732c5c8e6b2a2391a366c39b 100644 (file)
@@ -2,16 +2,66 @@
 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.
diff --git a/src/PrimitivesPlugin/doc/examples/cylinder.py b/src/PrimitivesPlugin/doc/examples/cylinder.py
new file mode 100644 (file)
index 0000000..7c7c2bf
--- /dev/null
@@ -0,0 +1,12 @@
+# -*- 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()
diff --git a/src/PrimitivesPlugin/doc/examples/sphere.py b/src/PrimitivesPlugin/doc/examples/sphere.py
new file mode 100644 (file)
index 0000000..ec35791
--- /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()
+Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10)
+model.do()
+model.end()
diff --git a/src/PrimitivesPlugin/doc/images/Boxes.png b/src/PrimitivesPlugin/doc/images/Boxes.png
new file mode 100644 (file)
index 0000000..5bc6dc9
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Boxes.png differ
diff --git a/src/PrimitivesPlugin/doc/images/Cylinder.png b/src/PrimitivesPlugin/doc/images/Cylinder.png
new file mode 100644 (file)
index 0000000..046ffae
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinder.png differ
diff --git a/src/PrimitivesPlugin/doc/images/Cylinder_button.png b/src/PrimitivesPlugin/doc/images/Cylinder_button.png
new file mode 100644 (file)
index 0000000..fcc6c91
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinder_button.png differ
diff --git a/src/PrimitivesPlugin/doc/images/Cylinders.png b/src/PrimitivesPlugin/doc/images/Cylinders.png
new file mode 100644 (file)
index 0000000..da84167
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinders.png differ
diff --git a/src/PrimitivesPlugin/doc/images/Portion_cylinder.png b/src/PrimitivesPlugin/doc/images/Portion_cylinder.png
new file mode 100644 (file)
index 0000000..b88fb51
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Portion_cylinder.png differ
index a88b7a59b413da86b37d7d75b0323b9e1d81a708..6798a66ac6da0572b33c03ae40572e3da7b9ab22 100644 (file)
Binary files a/src/PrimitivesPlugin/doc/images/Sphere.png and b/src/PrimitivesPlugin/doc/images/Sphere.png differ
diff --git a/src/PrimitivesPlugin/doc/images/Sphere_button.png b/src/PrimitivesPlugin/doc/images/Sphere_button.png
new file mode 100644 (file)
index 0000000..fb13d34
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Sphere_button.png differ
diff --git a/src/PrimitivesPlugin/doc/images/Sphere_res.png b/src/PrimitivesPlugin/doc/images/Sphere_res.png
new file mode 100644 (file)
index 0000000..93c6f73
Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Sphere_res.png differ
index cb731b3c2430ab34cedab56fa7e64c6f6e63f115..33abdfcd63fffb2c89f8bbb48db8cb24f9aedc46 100644 (file)
@@ -2,9 +2,51 @@
 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.