From: Grigory ZHIVOTOVSKY Date: Tue, 14 Aug 2018 11:06:05 +0000 (+0300) Subject: Create Build/Vertex help page X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=21d4e04e3181d2786508232c41e11ff04632969a;p=modules%2Fshaper.git Create Build/Vertex help page --- diff --git a/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst b/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst new file mode 100644 index 000000000..9256a9d66 --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_cylinder: + +Create /Cylinder +================ + +.. literalinclude:: examples/cylinder.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst b/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst new file mode 100644 index 000000000..f4012bcce --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_sphereFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_sphere: + +Create / Sphere +=============== + +.. literalinclude:: examples/sphere.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/boxFeature.rst b/src/PrimitivesPlugin/doc/boxFeature.rst index 84cf765e8..749f5d185 100644 --- a/src/PrimitivesPlugin/doc/boxFeature.rst +++ b/src/PrimitivesPlugin/doc/boxFeature.rst @@ -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. diff --git a/src/PrimitivesPlugin/doc/cylinderFeature.rst b/src/PrimitivesPlugin/doc/cylinderFeature.rst index e5f18db01..d273e81c7 100644 --- a/src/PrimitivesPlugin/doc/cylinderFeature.rst +++ b/src/PrimitivesPlugin/doc/cylinderFeature.rst @@ -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 index 000000000..7c7c2bf4a --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/cylinder.py @@ -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 index 000000000..ec35791dd --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/sphere.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() +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 index 000000000..5bc6dc939 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 index 000000000..046ffae7b 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 index 000000000..fcc6c918a 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 index 000000000..da841675f 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 index 000000000..b88fb513e Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Portion_cylinder.png differ diff --git a/src/PrimitivesPlugin/doc/images/Sphere.png b/src/PrimitivesPlugin/doc/images/Sphere.png index a88b7a59b..6798a66ac 100644 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 index 000000000..fb13d34b0 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 index 000000000..93c6f73dc Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Sphere_res.png differ diff --git a/src/PrimitivesPlugin/doc/sphereFeature.rst b/src/PrimitivesPlugin/doc/sphereFeature.rst index cb731b3c2..33abdfcd6 100644 --- a/src/PrimitivesPlugin/doc/sphereFeature.rst +++ b/src/PrimitivesPlugin/doc/sphereFeature.rst @@ -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.