I was unavailable yesterday so I could not advance on my work or give feedback. Sorry about that.
Today, I almost finished implementing the
CurvePoint today. It is not totally finished due to a problem (bug ?) with the
CurvePoint(CurvePoint *iA, CurvePoint *iB, float t2d) constructor. I’ll see with Stéphane about the problem.
I corrected the Python classes to allow rich comparison, providing the ability to override the default comparison operators. I also modified the C to Python conversion utilities, allowing more general cases and better exception testing. I provided some of the classes with the
__copy__ method (known as ‘dupplicate’ in Freestyle).
I have not ported the
userdata variable in some classes yet, not really knowing if it should be given in the API. Also, whenever the API should provide a result as a set, I’ll provide it as a list. The reason is that the STL
PySet implementations differ greatly: the STL version is based on a binary search tree (you just need to define a
operator< on the underlying type), while the Python one is hash-based (you need to associate a unique key to each element). It doesn’t really matter for our API: C++ will no matter what keep it as a set and assure the integrity. The list type will just be used for access.