looo wrote: ↑Tue Oct 08, 2019 9:38 pm
So while this might miss some documentation, the work was directly added to pivy which in my eyes makes the most sense for such a library (as it is not really dependent on FreeCAD). Anyway, I think your work is a great addition and I will for sure test the examples.
That's not a bad way to look at it.
I'll have to look at your code - I admit my grasp of what Coin3D has to offer is probably a bit limited, as I don't recognize some of the references in it.
Unfortunately, in order to offer a more fully-featured system, I had to include some dependencies - like the DraftGui.todo class (which depends on QTimer), as well as the need to reference a 3DInventorViewer object, which is entirely a FreeCAD class. There may be a way to better abstract the view state code to help eliminate that dependency. There's also a dependency on SoFcSelection...
Anyway, I'm sure there's a lot of things I could do better. Nevertheless, I've sort of developed an arbitrary rule that each class / file will have no more than 200 lines (and preferrably less than 100), which seems to help me break things down and keep the code more manageable.
I'll be working on it over the next couple of weeks. Hopefully will have drag functionality added soon as well as more examples.
Right now, the example only allows you to do simple single-select and multi-selection of elements (as well as mouseover highlighting).