In [68]:
import Part
class MyFeature(Part.BSplineSurface):
pass
In [66]:
import FreeCAD as App
class MyVector(App.Rotation):
pass
In [2]:
import eigen
class MyEigenVector(eigen.vector3):
def size(self):
return 4
In [3]:
a = MyEigenVector([1,2,3])
b = eigen.vector3([1,2,3])
In [11]:
a.size()
Out[11]:
In [5]:
b.size()
Out[5]:
In [7]:
len(a)
Out[7]:
In [8]:
len(b)
Out[8]:
PROBLEM: eigen.vector3 (python) is the wrapped Eigen::Vector3d (c++). The method "size" calls the method "size" of the c++ object. len also calls the c++ method size. But overwriting the method size won't change the result of len.
In [ ]: