X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2Fdoc%2FtranslationFeature.rst;h=5c552c2171b1ddc97051e9afcbabd67dc88b103c;hb=7eb4c88d46d8fa7d664bc5f505952f4677fd4628;hp=99ce5db7232fa6ed2c6474e21183452d94db93ea;hpb=c5ec43297b55923e1cf2ee39978bf42d733ee465;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/doc/translationFeature.rst b/src/FeaturesPlugin/doc/translationFeature.rst index 99ce5db72..5c552c217 100644 --- a/src/FeaturesPlugin/doc/translationFeature.rst +++ b/src/FeaturesPlugin/doc/translationFeature.rst @@ -1,24 +1,142 @@ +.. _featureTranslation: +.. |translation_vector_32x32.icon| image:: images/translation_vector_32x32.png Translation =========== +**Translation** feature translates a selected shape. -.. image:: images/Translation1.png +To create a Translation in the active part: + +#. select in the Main Menu *Part - > Translation* item or +#. click |translation_vector_32x32.icon| **Translation** button in the toolbar + +The Vector of translation can be defined in three different ways: + + .. image:: images/translation_vector_32x32.png + :align: left + by by axis and distance + + .. image:: images/translation_dxyz_32x32.png + :align: left + by vector + + .. image:: images/translation_2pt_32x32.png + :align: left + by two points + +Translation by axis and distance +-------------------------------- + +.. image:: images/Translation2.png :align: center .. centered:: - Translation by axis and distance + Translation by axis and distance property panel +Input fields: -.. image:: images/Translation2.png +- **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser; +- **Axis** defines a vector along which the object will be translated. The vector is an edge or axis selected in 3D OCC viewer or object browser; +- **Distance** defines the distance along the **Vector of translation**. + +**TUI Command**: + +.. py:function:: model.addTranslation(Part_doc, [shape], axis, dist) + + :param part: The current part object. + :param list: A list of shapes in format *model.selection(TYPE, shape)*. + :param object: axis in format *model.selection(TYPE, shape)*. + :param real: Distance value. + :return: Result object. + +Result +"""""" + +The result of operation is a shifted initial shape. + +.. image:: images/translation_XYZ.png + :align: center + +.. centered:: + Translation by axis and distance + +**See Also** a sample TUI Script of a :ref:`tui_translation_vector` operation. + +Translation by vector +--------------------- + +.. image:: images/Translation1.png :align: center .. centered:: - By vector + Translation by vector property panel +Input fields: + +- **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser; +- **DX**, **DY**, **DZ** define vector using coordinates along the axis. + +**TUI Command**: + +.. py:function:: model.addTranslation(Part_1_doc, [shape], DX, DY, DZ) + + :param part: The current part object. + :param list: A list of shapes in format *model.selection(TYPE, shape)*. + :param real: dX value. + :param real: dY value. + :param real: dZ value. + :return: Result object. + +Result +"""""" + +The result of operation is a shifted initial shape. + +.. image:: images/translation_vector.png + :align: center + +.. centered:: + Translation by vector + +**See Also** a sample TUI Script of :ref:`tui_translation_DXDYDZ` operation. + + +Translation by two points +------------------------- .. image:: images/Translation3.png :align: center .. centered:: - By two points + Translation by two points property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **Start point** defines start vector point as point or vertex selected in 3D OCC viewer or object browser; +- **End point** defines end vector point as point or vertex selected in 3D OCC viewer or object browser; + +**TUI Command**: + +.. py:function:: model.addTranslation(Part_doc, [shape], point1, point2) + + :param part: The current part object. + :param list: A list of shapes in format *model.selection(TYPE, shape)*. + :param object: A point in format *model.selection(TYPE, shape)*. + :param object: A point in format *model.selection(TYPE, shape)*. + :return: Result object. + +Result +"""""" + +The result of operation is a shifted initial shape. + +.. image:: images/translation_2points.png + :align: center + +.. centered:: + Translation by two points + +**See Also** a sample TUI Script of :ref:`tui_translation_2points` operation. +