From: vsv Date: Wed, 15 Aug 2018 14:20:38 +0000 (+0300) Subject: Create Construction plugin help pages X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b23c800862fb86c1a80998629fafa20668aee85;p=modules%2Fshaper.git Create Construction plugin help pages --- diff --git a/src/ConstructionPlugin/doc/TUI_axisFeature.rst b/src/ConstructionPlugin/doc/TUI_axisFeature.rst new file mode 100644 index 000000000..01587e8b8 --- /dev/null +++ b/src/ConstructionPlugin/doc/TUI_axisFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_axis: + +Create Axis +=========== + +.. literalinclude:: examples/axis.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ConstructionPlugin/doc/TUI_planeFeature.rst b/src/ConstructionPlugin/doc/TUI_planeFeature.rst new file mode 100644 index 000000000..e3e8684ab --- /dev/null +++ b/src/ConstructionPlugin/doc/TUI_planeFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_plane: + +Create Plane +============ + +.. literalinclude:: examples/plane.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ConstructionPlugin/doc/TUI_pointFeature.rst b/src/ConstructionPlugin/doc/TUI_pointFeature.rst new file mode 100644 index 000000000..4aec38749 --- /dev/null +++ b/src/ConstructionPlugin/doc/TUI_pointFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_create_point: + +Create Point +============ + +.. literalinclude:: examples/point.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ConstructionPlugin/doc/axisFeature.rst b/src/ConstructionPlugin/doc/axisFeature.rst index bb372bbca..d630af72c 100644 --- a/src/ConstructionPlugin/doc/axisFeature.rst +++ b/src/ConstructionPlugin/doc/axisFeature.rst @@ -1,3 +1,83 @@ Axis ==== + +Axis is a construction object and it can be created as in a part as in part set. To create an axis: + +#. select in the Main Menu *Construction - > Axis* item or +#. click **Axis** button in the toolbar + +.. image:: images/axis_button.png + :align: center + +.. centered:: + **Axis** button + +There are 6 algorithms for creation of an Axis: + +.. image:: images/Axis1.png + :align: center + +.. centered:: + **By dX, dY, dZ values** + +In this case user has to define dX, dY, dZ values of a vector. + +.. image:: images/Axis2.png + :align: center + +.. centered:: + **By two points** + +In this case user has to select two points or vertices. + +.. image:: images/Axis3.png + :align: center + +.. centered:: + **By a line** + +In this case user has to select a linear edge. + +.. image:: images/Axis4.png + :align: center + +.. centered:: + **By a cylinder** + +In this case user has to select a cylindrical face. Axis of the cylinder will define an axis object. + +.. image:: images/Axis5.png + :align: center + +.. centered:: + **By a plane and point** + +In this case user has to select a point or vertex and plane (or planar face). Axis will be defined as a normal from the point to the plane. + +.. image:: images/Axis6.png + :align: center + +.. centered:: + **By two planes** + +In this case user has to select two planes. Intersection of that planes defines an axis. User can define offset for axis definition from both planes. + +**TUI Commands**: + +#. *model.addAxis(Part_doc, 10, 10, 10)* **Arguments**: Part + 3 values (dX, dY, dZ values). +#. *model.addAxis(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"))* **Arguments**: Part + 2 vertices. +#. *model.addAxis(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"))* **Arguments**: Part + edge. +#. *model.addAxis(Part_doc, model.selection("FACE", "Cylinder_1_1/Face_1"))* **Arguments**: Part + cylindrical face. +#. *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"))* **Arguments**: Part + plane + point. +#. *model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False)* **Arguments**: Part + plane + offcet value + is reversed flag + plane + offcet value + is reversed flag. + +The Result of the operation will be an axis: + +.. image:: images/CreatedAxis.png + :align: center + +.. centered:: + Axis created + +**See Also** a sample TUI Script of a :ref:`tui_create_axis` operation. diff --git a/src/ConstructionPlugin/doc/examples/axis.py b/src/ConstructionPlugin/doc/examples/axis.py new file mode 100644 index 000000000..7072fc265 --- /dev/null +++ b/src/ConstructionPlugin/doc/examples/axis.py @@ -0,0 +1,18 @@ +# -*- 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) +Axis_4 = model.addAxis(Part_1_doc, 10, 10, 10) +Axis_5 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom")) +Axis_6 = model.addAxis(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")) +Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10) +Axis_7 = model.addAxis(Part_1_doc, model.selection("FACE", "Cylinder_1_1/Face_1")) +Axis_8 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top")) +Axis_9 = model.addAxis(Part_1_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False) +model.do() +model.end() diff --git a/src/ConstructionPlugin/doc/examples/plane.py b/src/ConstructionPlugin/doc/examples/plane.py new file mode 100644 index 000000000..31580ae1f --- /dev/null +++ b/src/ConstructionPlugin/doc/examples/plane.py @@ -0,0 +1,20 @@ +# -*- 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) +Plane_4 = model.addPlane(Part_1_doc, + model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom")) +Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), + model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False) +Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), 10, False) +Plane_7 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), + model.selection("FACE", "Box_1_1/Right")) +model.do() +model.end() diff --git a/src/ConstructionPlugin/doc/examples/point.py b/src/ConstructionPlugin/doc/examples/point.py new file mode 100644 index 000000000..51465bd3f --- /dev/null +++ b/src/ConstructionPlugin/doc/examples/point.py @@ -0,0 +1,16 @@ +# -*- 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, 50, 50, 50) +Point_3 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False) +Point_4 = model.addPoint(Part_1_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top")) +Point_5 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False) +Point_6 = model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1")) +model.do() +model.end() diff --git a/src/ConstructionPlugin/doc/images/Axis1.png b/src/ConstructionPlugin/doc/images/Axis1.png new file mode 100644 index 000000000..b0d5a1a63 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis1.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis2.png b/src/ConstructionPlugin/doc/images/Axis2.png new file mode 100644 index 000000000..f9f534363 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis2.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis3.png b/src/ConstructionPlugin/doc/images/Axis3.png new file mode 100644 index 000000000..ca6dd923b Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis3.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis4.png b/src/ConstructionPlugin/doc/images/Axis4.png new file mode 100644 index 000000000..10cf6c4b7 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis4.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis5.png b/src/ConstructionPlugin/doc/images/Axis5.png new file mode 100644 index 000000000..46cab458e Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis5.png differ diff --git a/src/ConstructionPlugin/doc/images/Axis6.png b/src/ConstructionPlugin/doc/images/Axis6.png new file mode 100644 index 000000000..8d6baa5e4 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Axis6.png differ diff --git a/src/ConstructionPlugin/doc/images/CreatePoint.png b/src/ConstructionPlugin/doc/images/CreatePoint.png new file mode 100644 index 000000000..07cc04f89 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatePoint.png differ diff --git a/src/ConstructionPlugin/doc/images/CreatedAxis.png b/src/ConstructionPlugin/doc/images/CreatedAxis.png new file mode 100644 index 000000000..8ec0084ca Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatedAxis.png differ diff --git a/src/ConstructionPlugin/doc/images/CreatedPlane.png b/src/ConstructionPlugin/doc/images/CreatedPlane.png new file mode 100644 index 000000000..1558ae3c1 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/CreatedPlane.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane1.png b/src/ConstructionPlugin/doc/images/Plane1.png new file mode 100644 index 000000000..6adfafbaf Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane1.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane2.png b/src/ConstructionPlugin/doc/images/Plane2.png new file mode 100644 index 000000000..23b4c7eea Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane2.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane3.png b/src/ConstructionPlugin/doc/images/Plane3.png new file mode 100644 index 000000000..335139565 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane3.png differ diff --git a/src/ConstructionPlugin/doc/images/Plane4.png b/src/ConstructionPlugin/doc/images/Plane4.png new file mode 100644 index 000000000..2c53d7a57 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Plane4.png differ diff --git a/src/ConstructionPlugin/doc/images/Point1.png b/src/ConstructionPlugin/doc/images/Point1.png new file mode 100644 index 000000000..f9172860e Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point1.png differ diff --git a/src/ConstructionPlugin/doc/images/Point2.png b/src/ConstructionPlugin/doc/images/Point2.png new file mode 100644 index 000000000..e272ee752 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point2.png differ diff --git a/src/ConstructionPlugin/doc/images/Point3.png b/src/ConstructionPlugin/doc/images/Point3.png new file mode 100644 index 000000000..fa9d4c95d Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point3.png differ diff --git a/src/ConstructionPlugin/doc/images/Point4.png b/src/ConstructionPlugin/doc/images/Point4.png new file mode 100644 index 000000000..8072605cf Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point4.png differ diff --git a/src/ConstructionPlugin/doc/images/Point5.png b/src/ConstructionPlugin/doc/images/Point5.png new file mode 100644 index 000000000..fe7f84f4c Binary files /dev/null and b/src/ConstructionPlugin/doc/images/Point5.png differ diff --git a/src/ConstructionPlugin/doc/images/axis_button.png b/src/ConstructionPlugin/doc/images/axis_button.png new file mode 100755 index 000000000..015d270bf Binary files /dev/null and b/src/ConstructionPlugin/doc/images/axis_button.png differ diff --git a/src/ConstructionPlugin/doc/images/plane_button.png b/src/ConstructionPlugin/doc/images/plane_button.png new file mode 100755 index 000000000..1da328269 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/plane_button.png differ diff --git a/src/ConstructionPlugin/doc/images/point_button.png b/src/ConstructionPlugin/doc/images/point_button.png new file mode 100755 index 000000000..96149ebf3 Binary files /dev/null and b/src/ConstructionPlugin/doc/images/point_button.png differ diff --git a/src/ConstructionPlugin/doc/planeFeature.rst b/src/ConstructionPlugin/doc/planeFeature.rst index dbe2ac344..2822fde09 100644 --- a/src/ConstructionPlugin/doc/planeFeature.rst +++ b/src/ConstructionPlugin/doc/planeFeature.rst @@ -1,3 +1,69 @@ Plane ===== + +Plane is a construction object and it can be created as in a part as in part set. To create a plane: + +#. select in the Main Menu *Construction - > Plane* item or +#. click **Point** button in the toolbar + +.. image:: images/plane_button.png + :align: center + +.. centered:: + **Plane** button + +There are 4 algorithms for creation of a Plane: + +.. image:: images/Plane1.png + :align: center + +.. centered:: + **By three points** + +In this case user has to select three points in a viewer to define a new plane. + +.. image:: images/Plane2.png + :align: center + +.. centered:: + **Line and point** + +In this case user has to select a linear edge and point to define a plane. It is possible to make the new plane perpendicular to the selected edge. + +.. image:: images/Plane3.png + :align: center + +.. centered:: + **By other plane** + +In this case user has to select an already existing plane (planar face). There are following possibilities to define a new plane: + +#. By distance from the selected plane. +#. By coincidence to a point. +#. By rotation around an edge on a specified angle. + +.. image:: images/Plane4.png + :align: center + +.. centered:: + **By two parallel planes** + +In this case user has to select two parallel planes. A new plane will be defined between them. + +**TUI Commands**: + +#. *model.addPlane(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Bottom"))* **Arguments**: Part + 3 vertices. +#. *model.addPlane(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"), False)* **Arguments**: Part + line + point + is perpendicular to line flag. +#. *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Front"), 10, False)* **Arguments**: Part + a plane + offset + is reverse flag. +#. *model.addPlane(Part_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))* **Arguments**: Part + 2 planes. + +The Result of the operation will be a plane: + +.. image:: images/CreatedPlane.png + :align: center + +.. centered:: + Plane created + +**See Also** a sample TUI Script of a :ref:`tui_create_plane` operation. diff --git a/src/ConstructionPlugin/doc/pointFeature.rst b/src/ConstructionPlugin/doc/pointFeature.rst index 64f21b167..fcb00f6b2 100644 --- a/src/ConstructionPlugin/doc/pointFeature.rst +++ b/src/ConstructionPlugin/doc/pointFeature.rst @@ -1,3 +1,80 @@ Point ===== + +Point is a construction object and it can be created as in a part as in part set. To create a point: + +#. select in the Main Menu *Construction - > Point* item or +#. click **Point** button in the toolbar + +.. image:: images/point_button.png + :align: center + +.. centered:: + **Point** button + +There are 5 algorithms for creation of a Point: + +.. image:: images/Point1.png + :align: center + +.. centered:: + **By X,Y,Z coordinates** + +In this case user has to input X, Y, and Z coordinates. + +.. image:: images/Point2.png + :align: center + +.. centered:: + **Along an edge** + +In this case user has to select an edge in a viewer and to define a distance along the edge where point will be defined. This distance can be defined as by an absolute value as by relative as a ratio to the edge length. The direction of the edge can be reverced by the corresponded check box. + +.. image:: images/Point3.png + :align: center + +.. centered:: + **By projection** + +In this case user has to select an existing point or vertex and an edge or face. The new point will be created by projection of the selected point on the edge or face. + +.. image:: images/Point4.png + :align: center + +.. centered:: + **Intersection of objects** + +In this case user has to select: + +#. two edges, +#. edge and plane, +#. three planes + +The new point will be defined by intersection of selected objects. + +.. image:: images/Point5.png + :align: center + +.. centered:: + **By geometrical property** + +In this case the new point can be defined as a center of gravity of selected object or as a center of a circle. User has to select desirable object. + +**TUI Commands**: + +#. *model.addPoint(Part_doc, 50, 50, 50)* **Arguments**: Part + 3 values (X, Y, Z coordinates). +#. *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)* **Arguments**: Part + edge + value + is by ratio flag + to reverce flag. +#. *model.addPoint(Part_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"))* **Arguments**: Part + vertex + edge (or plane). +#. *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)* **Arguments**: Part + edge + plane (planar face) + offset value + is offcet reversed. +#. *model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))* **Arguments**: Part + solid + +The Result of the operation will be a construction point: + +.. image:: images/CreatePoint.png + :align: center + +.. centered:: + Point created + +**See Also** a sample TUI Script of a :ref:`tui_create_point` operation.