From: vsv Date: Wed, 26 Sep 2018 15:43:29 +0000 (+0300) Subject: Modification of Primitives plugin documentation X-Git-Tag: CEA_2018-2~65 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d3636d9a263bea301d2f8e5c5951c6d0dce0fbf2;p=modules%2Fshaper.git Modification of Primitives plugin documentation --- diff --git a/src/PrimitivesPlugin/doc/TUI_boxByPoints.rst b/src/PrimitivesPlugin/doc/TUI_boxByPoints.rst new file mode 100644 index 000000000..31eaf4bf8 --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_boxByPoints.rst @@ -0,0 +1,11 @@ + + .. _tui_create_boxpnt: + +Create Box by points +==================== + +.. literalinclude:: examples/box2.py + :linenos: + :language: python + +:download:`Download this script ` diff --git a/src/PrimitivesPlugin/doc/TUI_boxDimensions.rst b/src/PrimitivesPlugin/doc/TUI_boxDimensions.rst new file mode 100644 index 000000000..ddeabf16f --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_boxDimensions.rst @@ -0,0 +1,12 @@ + + .. _tui_create_boxdim: + +Create Box by dimensions +======================== + +.. literalinclude:: examples/box1.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/TUI_boxFeature.rst b/src/PrimitivesPlugin/doc/TUI_boxFeature.rst deleted file mode 100644 index 78ae3ad40..000000000 --- a/src/PrimitivesPlugin/doc/TUI_boxFeature.rst +++ /dev/null @@ -1,12 +0,0 @@ - - .. _tui_create_box: - -Create Box -========== - -.. literalinclude:: examples/box.py - :linenos: - :language: python - -:download:`Download this script ` - diff --git a/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst b/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst index 9256a9d66..dc326819c 100644 --- a/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst +++ b/src/PrimitivesPlugin/doc/TUI_cylinderFeature.rst @@ -1,12 +1,12 @@ .. _tui_create_cylinder: -Create /Cylinder +Create cylinder ================ -.. literalinclude:: examples/cylinder.py +.. literalinclude:: examples/cylinder1.py :linenos: :language: python -:download:`Download this script ` +:download:`Download this script ` diff --git a/src/PrimitivesPlugin/doc/TUI_cylinderPortion.rst b/src/PrimitivesPlugin/doc/TUI_cylinderPortion.rst new file mode 100644 index 000000000..8d2bad8fb --- /dev/null +++ b/src/PrimitivesPlugin/doc/TUI_cylinderPortion.rst @@ -0,0 +1,12 @@ + + .. _tui_create_cylportion: + +Create portion of cylinder +========================== + +.. literalinclude:: examples/cylinder2.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/PrimitivesPlugin/doc/boxFeature.rst b/src/PrimitivesPlugin/doc/boxFeature.rst index b1eb661dd..ac3a81a8e 100644 --- a/src/PrimitivesPlugin/doc/boxFeature.rst +++ b/src/PrimitivesPlugin/doc/boxFeature.rst @@ -28,7 +28,7 @@ There are 2 algorithms for creation of a Box: By dimensions -""""""""""""" +------------- Box is created by dimensions along X, Y, Z axis starting from the origin. @@ -43,9 +43,18 @@ Input fields: **Arguments**: Part + 3 real values (dimensions at origin). +Result +"""""" + +A solid box based on origin and with edges parallel to the coordinate axes. + +.. image:: images/Box1.png + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_create_boxdim` operation. By two points -""""""""""""" +------------- Box is created by two points of the box diagonal. @@ -63,12 +72,12 @@ Input fields: Result """""" -The edges of the created boxes are parallel to the coordinate axes. +A solid box based on two points and with edges parallel to the coordinate axes. -.. image:: images/Boxes.png +.. image:: images/Box2.png :align: center .. centered:: Boxes created -**See Also** a sample TUI Script of a :ref:`tui_create_box` operation. \ No newline at end of file +**See Also** a sample TUI Script of a :ref:`tui_create_boxpnt` operation. diff --git a/src/PrimitivesPlugin/doc/cylinderFeature.rst b/src/PrimitivesPlugin/doc/cylinderFeature.rst index d04badfb8..0308890ad 100644 --- a/src/PrimitivesPlugin/doc/cylinderFeature.rst +++ b/src/PrimitivesPlugin/doc/cylinderFeature.rst @@ -26,7 +26,7 @@ There are 2 algorithms for creation of a Cylinder: **Portion of cylinder** creates one segment of cylinder. Cylinder -"""""""" +-------- .. image:: images/Cylinder.png :align: center @@ -42,14 +42,25 @@ Input fields: - **Radius**; - **Height**. -**TUI Commands**: - -* *model.addCylinder(Part_doc, Point, Axis, Radius, Height)* +**TUI Commands**: *model.addCylinder(Part_doc, Point, Axis, Radius, Height)* **Arguments**: Part + 1 vertex +1 vector + 2 real values (radius, height). +Result +"""""" + +Example is shown below. + +.. image:: images/Cylinder1.png + :align: center + +.. centered:: + Cylinder + +**See Also** a sample TUI Script of a :ref:`tui_create_cylinder` operation. + Portion of cylinder -""""""""""""""""""" +------------------- .. image:: images/Portion_cylinder.png :align: center @@ -59,9 +70,7 @@ Portion of cylinder Input fields for ***Portion of cylinder** tab includes in addition **Angle** to create a portion of cylinder. -**TUI Commands**: - -* *model.addCylinder(Part_doc, Point, Axis, Radius, Height,Angle)* +**TUI Commands**: *model.addCylinder(Part_doc, Point, Axis, Radius, Height,Angle)* **Arguments**: 1 Part + 1 vertex +1 vector + 3 real values (radius, height and angle). @@ -70,10 +79,10 @@ Result Example is shown below. -.. image:: images/Cylinders.png +.. image:: images/Cylinder2.png :align: center .. centered:: - Cylinders created + Portion of cylinder -**See Also** a sample TUI Script of a :ref:`tui_create_cylinder` operation. +**See Also** a sample TUI Script of a :ref:`tui_create_cylportion` operation. diff --git a/src/PrimitivesPlugin/doc/examples/box.py b/src/PrimitivesPlugin/doc/examples/box.py deleted file mode 100644 index 0b9b5e665..000000000 --- a/src/PrimitivesPlugin/doc/examples/box.py +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- - -from salome.shaper import model - -model.begin() -partSet = model.moduleDocument() -Part_1 = model.addPart(partSet) -Part_1_doc = Part_1.document() -Box_1 = model.addBox(Part_1_doc, 10, 10, 10) -Point_2 = model.addPoint(Part_1_doc, 20, 30, 40) -Point_3 = model.addPoint(Part_1_doc, 40, 40, 50) -Box_2 = model.addBox(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")) -model.do() -model.end() diff --git a/src/PrimitivesPlugin/doc/examples/box1.py b/src/PrimitivesPlugin/doc/examples/box1.py new file mode 100644 index 000000000..2b2392e9a --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/box1.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() +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/examples/box2.py b/src/PrimitivesPlugin/doc/examples/box2.py new file mode 100644 index 000000000..e7b4228e4 --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/box2.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Point_2 = model.addPoint(Part_1_doc, 20, 30, 40) +Point_3 = model.addPoint(Part_1_doc, 40, 40, 50) +Box_2 = model.addBox(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/examples/cylinder.py b/src/PrimitivesPlugin/doc/examples/cylinder.py deleted file mode 100644 index 7c7c2bf4a..000000000 --- a/src/PrimitivesPlugin/doc/examples/cylinder.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- 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/cylinder1.py b/src/PrimitivesPlugin/doc/examples/cylinder1.py new file mode 100644 index 000000000..642088324 --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/cylinder1.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() +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +model.do() +model.end() diff --git a/src/PrimitivesPlugin/doc/examples/cylinder2.py b/src/PrimitivesPlugin/doc/examples/cylinder2.py new file mode 100644 index 000000000..f84d24c94 --- /dev/null +++ b/src/PrimitivesPlugin/doc/examples/cylinder2.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() +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/images/Box1.png b/src/PrimitivesPlugin/doc/images/Box1.png new file mode 100644 index 000000000..4e8a1d2a8 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Box1.png differ diff --git a/src/PrimitivesPlugin/doc/images/Box2.png b/src/PrimitivesPlugin/doc/images/Box2.png new file mode 100644 index 000000000..53dffcce4 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Box2.png differ diff --git a/src/PrimitivesPlugin/doc/images/Boxes.png b/src/PrimitivesPlugin/doc/images/Boxes.png deleted file mode 100644 index 2d24ec883..000000000 Binary files a/src/PrimitivesPlugin/doc/images/Boxes.png and /dev/null differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinder1.png b/src/PrimitivesPlugin/doc/images/Cylinder1.png new file mode 100644 index 000000000..ecc30d6aa Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinder1.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinder2.png b/src/PrimitivesPlugin/doc/images/Cylinder2.png new file mode 100644 index 000000000..087db9bf2 Binary files /dev/null and b/src/PrimitivesPlugin/doc/images/Cylinder2.png differ diff --git a/src/PrimitivesPlugin/doc/images/Cylinders.png b/src/PrimitivesPlugin/doc/images/Cylinders.png deleted file mode 100644 index 5c637ff8d..000000000 Binary files a/src/PrimitivesPlugin/doc/images/Cylinders.png and /dev/null differ