From: Grigory ZHIVOTOVSKY Date: Tue, 14 Aug 2018 13:11:51 +0000 (+0300) Subject: Create Build/Vertex help page X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=289ec28ee767f868097776d0e5bff3e9c8842523;p=modules%2Fshaper.git Create Build/Vertex help page --- diff --git a/src/PrimitivesPlugin/doc/TUI_coneFeature.rst b/src/PrimitivesPlugin/doc/TUI_coneFeature.rst new file mode 100644 index 000000000..aa95fa132 --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_coneFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_cone: + +Create / Cone +============= + +.. literalinclude:: examples/cone.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/boxFeature.rst b/src/PrimitivesPlugin/doc/boxFeature.rst index 749f5d185..ed8afe425 100644 --- a/src/PrimitivesPlugin/doc/boxFeature.rst +++ b/src/PrimitivesPlugin/doc/boxFeature.rst @@ -37,11 +37,11 @@ The description of input fields for **By dimensions** tab is given below: **TUI Command**: *model.addBox(Part_doc, DX, DY, DZ)* -**Arguments**: Name + Part + 3 values (dimensions at origin). +**Arguments**: 1 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 vertices of the box. +- selected **Point 1** and **Point 2** define the opposite vertices of the box. **Apply** button creates box with defined parameters. @@ -51,7 +51,7 @@ The description of input fields for **By two points** tab is given below: **TUI Command**: *model.addBox(Part_doc, FirstPoint, SecondPoint)* -**Arguments**: Name + Part + 2 selected points (opposite vertices of the box) +**Arguments**: 1 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. diff --git a/src/PrimitivesPlugin/doc/coneFeature.rst b/src/PrimitivesPlugin/doc/coneFeature.rst index 118d42dbd..cd976f576 100644 --- a/src/PrimitivesPlugin/doc/coneFeature.rst +++ b/src/PrimitivesPlugin/doc/coneFeature.rst @@ -2,9 +2,59 @@ Cone ==== +To create a Cone in the active part: + +#. select in the Main Menu *Primitives - > Cone* item or +#. click **Cone** button in the toolbar + +.. image:: images/Cone_button.png + :align: center + +.. centered:: + **Cone** button + +The following property panel appears. .. image:: images/Cone.png :align: center .. centered:: - Create a cone + Cone property panel + +The description of input fields is given below: + +- selected **Point** defines center of the cone base; +- selected **Vector** defines the axis of the cone; +- Dimensions: + - **Base Radius**; + - **Top radius**; + - **Height**. + +**Apply** button creates cone with defined parameters. + +**Cancel** button cancels operation. + +**TUI Command**: *model.addCone(Part_doc, Point, Axis, Radius1, Radius2, Height)* + +**Arguments**: 1 Part + 1 vertex + 1 vector + 3 values (Dimensions: base and top radii, heght). + +The Result of operation will be a SOLID. + +If both radii are non-zero, then the cone will be truncated. + +If the radii are equal, the Cylinder will be created instead of cone. + +Name is assigned automatically: + +* **Cone_1**, **Cone_2**, ... to Feature; +* **Cone_1_1**, **Cone_2_1**, ... to Result. + +Example is shown below. + +.. image:: images/Cone_res.png + :align: center + +.. centered:: + Sphere created + +**See Also** a sample TUI Script of a :ref:`tui_create_cone` operation. diff --git a/src/PrimitivesPlugin/doc/cylinderFeature.rst b/src/PrimitivesPlugin/doc/cylinderFeature.rst index d273e81c7..ab226b584 100644 --- a/src/PrimitivesPlugin/doc/cylinderFeature.rst +++ b/src/PrimitivesPlugin/doc/cylinderFeature.rst @@ -31,10 +31,11 @@ and 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**. +- selected **Point** defines center of the cylinder base; +- selected **Vector** defines the axis of the cylinder; +- Dimensions: + - **Radius**; + - **Height**. Input fields for ***Portion of cylinder** tab includes in addition **Angle** to create a portion of cylinder. @@ -47,7 +48,7 @@ Input fields for ***Portion of cylinder** tab includes in addition **Angle** to * *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). +**Arguments**: 1 Part + 1 vertex +1 vector + 2 or 3 values (dimensions: radius, height and angle). The Result of operation will be a SOLID. diff --git a/src/PrimitivesPlugin/doc/examples/cone.py b/src/PrimitivesPlugin/doc/examples/cone.py new file mode 100644 index 000000000..fe66a9688 --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/cone.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() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/images/Cone_button.png b/src/PrimitivesPlugin/doc/images/Cone_button.png new file mode 100755 index 000000000..ae5491d43 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cone_button.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cone_res.png b/src/PrimitivesPlugin/doc/images/Cone_res.png new file mode 100755 index 000000000..35ef6805a Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cone_res.png differ diff --git a/src/PrimitivesPlugin/doc/sphereFeature.rst b/src/PrimitivesPlugin/doc/sphereFeature.rst index 33abdfcd6..2755c16ff 100644 --- a/src/PrimitivesPlugin/doc/sphereFeature.rst +++ b/src/PrimitivesPlugin/doc/sphereFeature.rst @@ -13,17 +13,17 @@ To create a Sphere in the active part: .. centered:: **Sphere** button -The following input panel appears. +The following property panel appears. .. image:: images/Sphere.png :align: center .. centered:: - Sphere input panel + Sphere property panel The description of input fields is given below: -- **Point** defines center of the sphere; +- selected **Point** defines center of the sphere; - **Radius** defines the radius. **Apply** button creates sphere with defined parameters. @@ -32,7 +32,7 @@ The description of input fields is given below: **TUI Command**: *model.addSphere(Part_doc, Point, Radius)*. -**Arguments**: Name + 1 Part + 1 vertex +1 value (radius). +**Arguments**: 1 Part + 1 vertex +1 value (radius). The Result of operation will be a SOLID.