@@ -380,13 +380,18 @@ class Geom2d_Transformation : public MMgt_TShared {
380380 :rtype: None
381381" ) Multiply;
382382 void Multiply (const Handle_Geom2d_Transformation & Other);
383- %feature(" compactdefaultargs" ) operator *=;
384- %feature(" autodoc" , " :param Other:
385- :type Other: Handle_Geom2d_Transformation &
386- :rtype: None
387- " ) operator *=;
388- void operator *= (const Handle_Geom2d_Transformation & Other);
389- %feature(" compactdefaultargs" ) Power;
383+
384+ %extend{
385+ void __imul_wrapper__ (const Handle_Geom2d_Transformation other) {
386+ *self *= other;
387+ }
388+ }
389+ %pythoncode {
390+ def __imul__ (self, right):
391+ self.__imul_wrapper__ (right)
392+ return self
393+ }
394+ %feature(" compactdefaultargs" ) Power;
390395 %feature(" autodoc" , " * Raised if N < 0 and if the transformation is not inversible
391396
392397 :param N:
@@ -1160,12 +1165,6 @@ class Geom2d_Direction : public Geom2d_Vector {
11601165 :rtype: float
11611166" ) Crossed;
11621167 Standard_Real Crossed (const Handle_Geom2d_Vector & Other);
1163- %feature(" compactdefaultargs" ) operator ^;
1164- %feature(" autodoc" , " :param Other:
1165- :type Other: Handle_Geom2d_Vector &
1166- :rtype: float
1167- " ) operator ^;
1168- Standard_Real operator ^ (const Handle_Geom2d_Vector & Other);
11691168 %feature(" compactdefaultargs" ) Transform;
11701169 %feature(" autodoc" , " * Applies the transformation T to this unit vector, then normalizes it.
11711170
@@ -1785,13 +1784,18 @@ class Geom2d_VectorWithMagnitude : public Geom2d_Vector {
17851784 :rtype: None
17861785" ) Add;
17871786 void Add (const Handle_Geom2d_Vector & Other);
1788- %feature(" compactdefaultargs" ) operator +=;
1789- %feature(" autodoc" , " :param Other:
1790- :type Other: Handle_Geom2d_Vector &
1791- :rtype: None
1792- " ) operator +=;
1793- void operator += (const Handle_Geom2d_Vector & Other);
1794- %feature(" compactdefaultargs" ) Added;
1787+
1788+ %extend{
1789+ void __iadd_wrapper__ (const Handle_Geom2d_Vector other) {
1790+ *self += other;
1791+ }
1792+ }
1793+ %pythoncode {
1794+ def __iadd__ (self, right):
1795+ self.__iadd_wrapper__ (right)
1796+ return self
1797+ }
1798+ %feature(" compactdefaultargs" ) Added;
17951799 %feature(" autodoc" , " * Adds the vector Other to <self>.
17961800
17971801 :param Other:
@@ -1813,12 +1817,6 @@ class Geom2d_VectorWithMagnitude : public Geom2d_Vector {
18131817 :rtype: float
18141818" ) Crossed;
18151819 Standard_Real Crossed (const Handle_Geom2d_Vector & Other);
1816- %feature(" compactdefaultargs" ) operator ^;
1817- %feature(" autodoc" , " :param Other:
1818- :type Other: Handle_Geom2d_Vector &
1819- :rtype: float
1820- " ) operator ^;
1821- Standard_Real operator ^ (const Handle_Geom2d_Vector & Other);
18221820 %feature(" compactdefaultargs" ) Divide;
18231821 %feature(" autodoc" , " * Divides <self> by a scalar.
18241822
@@ -1827,13 +1825,18 @@ class Geom2d_VectorWithMagnitude : public Geom2d_Vector {
18271825 :rtype: None
18281826" ) Divide;
18291827 void Divide (const Standard_Real Scalar);
1830- %feature(" compactdefaultargs" ) operator /=;
1831- %feature(" autodoc" , " :param Scalar:
1832- :type Scalar: float
1833- :rtype: None
1834- " ) operator /=;
1835- void operator /= (const Standard_Real Scalar);
1836- %feature(" compactdefaultargs" ) Divided;
1828+
1829+ %extend{
1830+ void __itruediv_wrapper__ (const Standard_Real other) {
1831+ *self /= other;
1832+ }
1833+ }
1834+ %pythoncode {
1835+ def __itruediv__ (self, right):
1836+ self.__itruediv_wrapper__ (right)
1837+ return self
1838+ }
1839+ %feature(" compactdefaultargs" ) Divided;
18371840 %feature(" autodoc" , " * Divides <self> by a scalar. A new vector is returned.
18381841
18391842 :param Scalar:
@@ -1863,13 +1866,18 @@ class Geom2d_VectorWithMagnitude : public Geom2d_Vector {
18631866 :rtype: None
18641867" ) Multiply;
18651868 void Multiply (const Standard_Real Scalar);
1866- %feature(" compactdefaultargs" ) operator *=;
1867- %feature(" autodoc" , " :param Scalar:
1868- :type Scalar: float
1869- :rtype: None
1870- " ) operator *=;
1871- void operator *= (const Standard_Real Scalar);
1872- %feature(" compactdefaultargs" ) Normalize;
1869+
1870+ %extend{
1871+ void __imul_wrapper__ (const Standard_Real other) {
1872+ *self *= other;
1873+ }
1874+ }
1875+ %pythoncode {
1876+ def __imul__ (self, right):
1877+ self.__imul_wrapper__ (right)
1878+ return self
1879+ }
1880+ %feature(" compactdefaultargs" ) Normalize;
18731881 %feature(" autodoc" , " * Normalizes <self>. //! Raised if the magnitude of the vector is lower or equal to Resolution from package gp.
18741882
18751883 :rtype: None
@@ -1889,13 +1897,18 @@ class Geom2d_VectorWithMagnitude : public Geom2d_Vector {
18891897 :rtype: None
18901898" ) Subtract;
18911899 void Subtract (const Handle_Geom2d_Vector & Other);
1892- %feature(" compactdefaultargs" ) operator -=;
1893- %feature(" autodoc" , " :param Other:
1894- :type Other: Handle_Geom2d_Vector &
1895- :rtype: None
1896- " ) operator -=;
1897- void operator -= (const Handle_Geom2d_Vector & Other);
1898- %feature(" compactdefaultargs" ) Subtracted;
1900+
1901+ %extend{
1902+ void __isub_wrapper__ (const Handle_Geom2d_Vector other) {
1903+ *self -= other;
1904+ }
1905+ }
1906+ %pythoncode {
1907+ def __isub__ (self, right):
1908+ self.__isub_wrapper__ (right)
1909+ return self
1910+ }
1911+ %feature(" compactdefaultargs" ) Subtracted;
18991912 %feature(" autodoc" , " * Subtracts the vector Other to <self>. A new vector is returned.
19001913
19011914 :param Other:
0 commit comments