From b8875f79d4aa70bf16764a3158cf4466a93d3c7a Mon Sep 17 00:00:00 2001 From: gzy Date: Fri, 21 Sep 2018 16:41:21 +0300 Subject: [PATCH] translation and rotation --- .../doc/TUI_rotation3pointsFeature.rst | 11 ++ .../doc/TUI_rotationaxisFeature.rst | 11 ++ .../doc/TUI_translation2pointsFeature.rst | 11 ++ .../doc/TUI_translationdxdydzFeature.rst | 11 ++ .../doc/TUI_translationvectorFeature.rst | 12 ++ src/FeaturesPlugin/doc/examples/rotation1.py | 12 ++ src/FeaturesPlugin/doc/examples/rotation2.py | 12 ++ .../doc/examples/translation2points.py | 12 ++ .../doc/examples/translationDXDYDZ.py | 12 ++ .../doc/examples/translationvector.py | 12 ++ src/FeaturesPlugin/doc/images/rotation.png | Bin 0 -> 705 bytes .../doc/images/rotation_3pt_32x32.png | Bin 0 -> 1491 bytes .../doc/images/rotation_axis_32x32.png | Bin 0 -> 1507 bytes .../doc/images/translation_2pt_32x32.png | Bin 0 -> 873 bytes .../doc/images/translation_dxyz_32x32.png | Bin 0 -> 957 bytes .../doc/images/translation_vector_32x32.png | Bin 0 -> 850 bytes src/FeaturesPlugin/doc/rotationFeature.rst | 76 +++++++++++- src/FeaturesPlugin/doc/translationFeature.rst | 109 +++++++++++++++++- 18 files changed, 296 insertions(+), 5 deletions(-) create mode 100644 src/FeaturesPlugin/doc/TUI_rotation3pointsFeature.rst create mode 100644 src/FeaturesPlugin/doc/TUI_rotationaxisFeature.rst create mode 100644 src/FeaturesPlugin/doc/TUI_translation2pointsFeature.rst create mode 100644 src/FeaturesPlugin/doc/TUI_translationdxdydzFeature.rst create mode 100644 src/FeaturesPlugin/doc/TUI_translationvectorFeature.rst create mode 100644 src/FeaturesPlugin/doc/examples/rotation1.py create mode 100644 src/FeaturesPlugin/doc/examples/rotation2.py create mode 100644 src/FeaturesPlugin/doc/examples/translation2points.py create mode 100644 src/FeaturesPlugin/doc/examples/translationDXDYDZ.py create mode 100644 src/FeaturesPlugin/doc/examples/translationvector.py create mode 100644 src/FeaturesPlugin/doc/images/rotation.png create mode 100644 src/FeaturesPlugin/doc/images/rotation_3pt_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/rotation_axis_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/translation_2pt_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/translation_dxyz_32x32.png create mode 100644 src/FeaturesPlugin/doc/images/translation_vector_32x32.png diff --git a/src/FeaturesPlugin/doc/TUI_rotation3pointsFeature.rst b/src/FeaturesPlugin/doc/TUI_rotation3pointsFeature.rst new file mode 100644 index 000000000..b6af697ee --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_rotation3pointsFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_rotation_3points: + +Rotation by center and points +============================= + +.. literalinclude:: examples/rotation2.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_rotationaxisFeature.rst b/src/FeaturesPlugin/doc/TUI_rotationaxisFeature.rst new file mode 100644 index 000000000..de089c14d --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_rotationaxisFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_rotation_axis: + +Rotation by axis and angle +========================== + +.. literalinclude:: examples/rotation1.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_translation2pointsFeature.rst b/src/FeaturesPlugin/doc/TUI_translation2pointsFeature.rst new file mode 100644 index 000000000..b26f8e762 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_translation2pointsFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_translation_2points: + +Translation by 2 points +======================= + +.. literalinclude:: examples/translation2points.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_translationdxdydzFeature.rst b/src/FeaturesPlugin/doc/TUI_translationdxdydzFeature.rst new file mode 100644 index 000000000..e3e273ce8 --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_translationdxdydzFeature.rst @@ -0,0 +1,11 @@ + + .. _tui_translation_DXDYDZ: + +Translation by vector +===================== + +.. literalinclude:: examples/translationDXDYDZ.py + :linenos: + :language: python + +:download:`Download this script ` \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/TUI_translationvectorFeature.rst b/src/FeaturesPlugin/doc/TUI_translationvectorFeature.rst new file mode 100644 index 000000000..70278fa9f --- /dev/null +++ b/src/FeaturesPlugin/doc/TUI_translationvectorFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_translation_vector: + +Translation by axis and distance +================================ + +.. literalinclude:: examples/translationvector.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/FeaturesPlugin/doc/examples/rotation1.py b/src/FeaturesPlugin/doc/examples/rotation1.py new file mode 100644 index 000000000..a82d443bb --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/rotation1.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() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Rotation_1 = model.addRotation(Part_1_doc, [model.selection("COMPOUND", "all-in-Cone_1")], model.selection("EDGE", "PartSet/OX"), 120) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/rotation2.py b/src/FeaturesPlugin/doc/examples/rotation2.py new file mode 100644 index 000000000..489541f93 --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/rotation2.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() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_3"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_2")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/translation2points.py b/src/FeaturesPlugin/doc/examples/translation2points.py new file mode 100644 index 000000000..d06a7ecad --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/translation2points.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() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Cone_1_1/Face_1&Cone_1_1/Face_2")) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/translationDXDYDZ.py b/src/FeaturesPlugin/doc/examples/translationDXDYDZ.py new file mode 100644 index 000000000..d06cf3bcf --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/translationDXDYDZ.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() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], 10, 20, 50) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/examples/translationvector.py b/src/FeaturesPlugin/doc/examples/translationvector.py new file mode 100644 index 000000000..5ebee45fa --- /dev/null +++ b/src/FeaturesPlugin/doc/examples/translationvector.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() +Cone_1 = model.addCone(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 10, 5, 10) +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cone_1_1")], model.selection("EDGE", "Cone_1_1/Face_1"), 40) +model.do() +model.end() diff --git a/src/FeaturesPlugin/doc/images/rotation.png b/src/FeaturesPlugin/doc/images/rotation.png new file mode 100644 index 0000000000000000000000000000000000000000..cfc31b4ab5456fa180159a905066532c4e425a47 GIT binary patch literal 705 zcmV;y0zUnTP)?X3+(LLXyaWz=A|vv{1-RM&PPNi_8=xV=xs0yQoP7wvnln9A>OR$Flx^PKz3u zi`EBc@qWC|`+bLV1TnQ|8+EBRDql}>S>0W8PC$LEC!!1yAu{r^a0P;tjdW6c_iXR1k?3qY0~l1wn|6*NE0Ca1g!$F7p7 zfQFmbUwD1KLd|Al=aEvbIdfR+x(LUDR=t9jn@MAREt|{h z=o=iRqO^dawg=3NO>bQ&cC}_7KbpTHDHKHqPHO2J+2Wl8e}DmiPqVb#y3hNriD4I# zrZCXw?jIg`^U64U;LtOtGk>OZ-`+GABNY<7L7oZS8B0mE%dSxWA5Yj`Q$iAXlb5jP#RB1MT z>9v*B;{ZZL!vKj1rXLDa`39a$M)oylO{4m9eoS+DNdigcwzstOBGkVPrKq^04++1<&Ww3d;SFLM#@TX zT!1|-J)`}0YcQ<4db%gvL(hv=gX01eMNyL1SS(>}Hkm~{5?#vw48R8!b>d$e%tQRM n0i@beziJpKrrkaM)dGG4jEKGP1HRY*00000NkvXXu0mjf`A9G5 literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/rotation_3pt_32x32.png b/src/FeaturesPlugin/doc/images/rotation_3pt_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..e2493da0536e6f13d854618c14dfeb5feb20b872 GIT binary patch literal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^Eg;h4#2c2 zQ%PHrjLqLRY;ms!60Z$8v-@a6rc&ao!rC&N9Lh5IZrF^yE~+LPEWTT{!~)Z$FfrXRmI2i~$3QHweRI49z-= zD>fBhP!~CMCHdvP(tR38l%iS)!iVBVMn>lC%~|t0XB(1F_!|#L69`%tLP7ul002ov JPDHLkV1nSG(ux28 literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/translation_2pt_32x32.png b/src/FeaturesPlugin/doc/images/translation_2pt_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..5e6860737c62103a82c2cfca7742d61882170dea GIT binary patch literal 873 zcmV-v1D5=WP)!+UeidCvd$JTK1&Bp`uf0!Ib11nvneN~GU-&6U6v0TJ*B3=6FOYXD&gn?QdU zqWN$6+JIFisOW)L;h8(a5ZlJv%p4(MC!dK2`p*^5hGL<4vT zxB)xxW-dJI)ma7Tgbtawr9>295m*|z25u9&M9u(*fd&P&e`@0B?3H-n_SEis>-BmI z&A<*|mV$PHXTall8pbPgVQFdq;1G?uiuLwzF!%SG9;c&aR?+}ct@iW2Kwm!aest3N z{d-=rjDG>t?XRtfl-yob`Oz?fNd<^?86{g!Ck#aA5bK@w9&fSh>7)s*bi z%gPG;2?LZA*xZSX{}X_m+~U%%NJ*!oWnR(%EEdZrzuz}9R-IuOHXtPta{!g-QR;NG z#Clgo)nsqO{{a6!K-;7NWM|EIlAg+@L;-#P$?yp@w)0|&00000NkvXXu0mjfi!g=N literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/translation_dxyz_32x32.png b/src/FeaturesPlugin/doc/images/translation_dxyz_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..a11f680d65edb0378bad9b8d6e9b9fc7b490f3d9 GIT binary patch literal 957 zcmV;u148_XP)990;GpL6DPGt*2$w@Ej(>qTiQ7HiXss8zg) zN~kdgv=CZB@U8{h7-@=P@uKKW1%EDzQoK>91KHn^1(lFfj0a?|Gm3IEUdV8r0Uo!N^R8kAZ=ZmJ3tK#Kthc7I;P= zDe$Vmor}nf0=s}75mBq%4aXhZzQeKYiRuR^)LTpe2n4_@3XWW-#|9p3c6cme=+_n< zehw$=F)*5vZ(7WyT-f4!4-Wkq1c6^`0;U2)D&D(|p|^E4PZUdRxpyo6u7^}x@BPZ! z6o>Xlf;8}Ly{}u0j9i^U1%Rwt#U3ZZ@aJ!7^T0OHn%1)6%mhRt`~rADq)`CPwEz?f z9MX#8FTW${LUEzt)b~=%Wcjqw;7R~p4FG7RX^Xa?j9F;->}#2w^GPljfMI?DK{-6y z$_G8&YGCv=ha3(od+asX&8B$7RToF zZ1z9cnzAfwP9$go)>hX#_$}#hba5&aVS7mrE504H>dTdhOQyP=YvoBZR*;0vj z0Y+02sdWr%Y3QYqanJMbHh>C%-ez_`e2?n<@aQ$+@6Tiy1~3}G6mV)OfnhS|zN9Nz!DWX6A$6Ehi}D>oMdMwT-iK*vDY0{H@n%!iLn%89@JVSkuWVB2y4 zn0DZp54(SoOM4EnF6*J1f0oqcEEj+mYj_nf*)Ra06!4M9?R$R|HVVAqvjf;s$NP4p z;lP&$NS}4x*jMpQZl{PcO3CXL9l974N6wG`UhNcks*&WjX!P`yb@71O+}GFSDfbhE z{*c~_Q^~}Ju!X)D`=fa&0N-_Wct?~9OuVz}*!1-DZNQo8rrC7nu6hgY+`c}$6o9f+ za&lV2iu(=@O_hQ`*P1}1()C+bR<{6dI)JI)LPxxB@b9qV8khB{L?XW;0JiO1_Husd zdbOZbigD#v-jHe@!&(|X{K8mvF1vk=OH(5gxaoV~7Qp`=Ael-e>Rv!s1R&PF?gxj= flPtW@+_3%yR+cV}->C(+00000NkvXXu0mjfRY1c4 literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/images/translation_vector_32x32.png b/src/FeaturesPlugin/doc/images/translation_vector_32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..2c1a4b2b73e37080edabcd9699543ec286f40734 GIT binary patch literal 850 zcmV-Y1FigtP)eyF~#ca1uUqyRs!<^mAr9B%H|%AU468HU3A*}={(6>@p# zNQXH<#vI>#UO$zezR=zJP=(@y4_+!?NYc5K003qc#j?dVJMQ(v&v5|0;vQufnvYegn{%dYZUsW@4o4^kzQ+b7 z+lI+h-*~+z5D4sw_1KnY;$3s2*c3DG8-$9By4&gDR5Z#X_cRA&l$M$1=}-p0%HGr< z3eO(-S@ym`IB-FCPkE`9lIOp2eY(!2behKi{0Q8mlSqKiLr`&1_e^=Ik&P|<5QHhK2kxahZ-q)y42?I`y6n)rYUP~Q{9tpG%0zq9Oi(1=0W4~`q?KX zkC(%Fy~Xk-GhjR|N;NIZHBAR_JVEZT!`{9*(L`+@Rn|fPw4FqR5XxXJD7hPD#0Gqb zPx4OtO6QyCOsNPj1Ry4n^gh2<|4onTda?>ER*5d7Wz&Cv6$eP=Ra{t9r8yG?9rkw1 zk^!vAT0IdAh2>l^U5^$3YZhY;^K8Rpirwc9dwVKR`-EEYf8amBKM(M5#Q-+sTVLmy c&=w2u14JqkN^)JDa{vGU07*qoM6N<$f&oB-zW@LL literal 0 HcmV?d00001 diff --git a/src/FeaturesPlugin/doc/rotationFeature.rst b/src/FeaturesPlugin/doc/rotationFeature.rst index ff0380d0c..38bef70b9 100644 --- a/src/FeaturesPlugin/doc/rotationFeature.rst +++ b/src/FeaturesPlugin/doc/rotationFeature.rst @@ -2,16 +2,88 @@ Rotation ======== +The feature **Rotation** makes rotation of a selected shape. + +To create Rotation in the active part: + +#. select in the Main Menu *Part - > Rotation* item or +#. click **Rotation** button in the toolbar + +.. image:: images/rotation.png + :align: center + +.. centered:: + **Rotation** button + +Two rotation algorithms are: + + .. image:: images/rotation_axis_32x32.png + :align: left + by axis and angle + + .. image:: images/rotation_3pt_32x32.png + :align: left + by center and 2 points + +Rotation by axis and angle +-------------------------- .. image:: images/Rotation1.png :align: center .. centered:: - Rotation by axis and angle + Rotation by axis and angle property panel + +Input fields: + +- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser; +- **Axis** defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser; +- **Angle** defines the angle by which the object is rotated. + +**TUI Command**: *model.addRotation(Part_doc, [shape], axis, angle)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (angle value). + +Result +"""""" + +Result of operation is rotated initial shape. +.. image:: images/rotation_axis.png + :align: center + +.. centered:: + Rotation by axis and angle + +**See Also** a sample TUI Script of a :ref:`tui_rotation_axis` operation. + +Rotation by center and points +----------------------------- .. image:: images/Rotation2.png :align: center .. centered:: - Rotation by center and points + Rotation by center and 2 points property panel + +Input fields: + +- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser; +- **Center point**, **Start point**, **End point** define 3 points or vertices selected in 3D OCC viewer or object browser. Rotation axis will pass through the **Center point** and will be will be orthogonal to a plane defined by three points. Rotation Angle is the angle between two vectors directed from the **Center point** to **Start point** and **End point**. + +**TUI Command**: *model.addRotation(Part_doc, [shape], point1, point2, point3)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 points in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of operation is rotated initial shape. + +.. image:: images/rotation_3points.png + :align: center + +.. centered:: + Rotation by center and 2 points + +**See Also** a sample TUI Script of a :ref:`tui_rotation_3points` operation. \ No newline at end of file diff --git a/src/FeaturesPlugin/doc/translationFeature.rst b/src/FeaturesPlugin/doc/translationFeature.rst index 99ce5db72..b3bbd5edc 100644 --- a/src/FeaturesPlugin/doc/translationFeature.rst +++ b/src/FeaturesPlugin/doc/translationFeature.rst @@ -2,23 +2,126 @@ Translation =========== +The feature **Translation** makes translation of a selected shape. + +To create Translation in the active part: + +#. select in the Main Menu *Part - > Translation* item or +#. click **Translation** button in the toolbar + +.. image:: images/translation_vector_32x32.png + :align: center + +.. centered:: + **Translation** button + +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/Translation1.png :align: center .. centered:: - Translation by axis and distance + Translation by axis and distance property panel + +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **Axis** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser; +- **Distance** defines the distance along the **Vector of translation**. + +**TUI Command**: *model.addTranslation(Part_doc, [shape], axis, dist)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (distance value). + +Result +"""""" + +Result of operation is shifted initial shape. + +.. image:: images/translation_vector.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/Translation2.png :align: center .. centered:: - By vector + Translation by vector property panel +Input fields: + +- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser; +- **DX**, **DY**, **DZ** define vector using coordinates along the axis. + +**TUI Command**: *model.addTranslation(Part_1_doc, [shape], DX, DY, DZ)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 real (coordinate values). + +Result +"""""" + +Result of operation is shifted initial shape. + +.. image:: images/translation_vector.png + :align: center + +.. centered:: + Translation by vector + +**See Also** a sample TUI Script of a :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**: *model.addTranslation(Part_doc, [shape], point1, point2)* + +**Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 2 points in format *model.selection(TYPE, shape)*. + +Result +"""""" + +Result of operation is shifted initial shape. + +.. image:: images/translation_vector.png + :align: center + +.. centered:: + Translation by two points + +**See Also** a sample TUI Script of a :ref:`tui_translation_2points` operation. + -- 2.39.2