Thank you so much for replying.
looo wrote: ↑Sun May 13, 2018 12:39 pm
I think it's the way how it should be implemented. But maybe the clip-node should be inserted when the scenegraph is created.
I am not sure I understand (My coin knowledge is reduced). The scenegraph hangs from the 3D Viewer. The 3D Viewer "multiplexes" ViewProviders. This clip-node is inserted on creation of a ViewProvider, so when the ViewProvider is added to the 3D Viewer, it already has a clip node. On the Constructor of ViewProvider, the clip-node, the transform-node and the switch-node are added (in this order). Do you mean that it should
not be added on construction?
looo wrote: ↑Sun May 13, 2018 12:39 pm
In an ideal world every view-object should decide on it's own how to deal with a clip-plane: shell: clipping, solid: clipping + capping, 2d-objects like sketch: no clipping.
I admit to have googled capping with coin without success. But I think I am starting to understanding what you mean here, what about creating a virtual function (e.g. initializeScenegraph) in ViewProvider, and moving the node insertion from the constructor to there (still calling it from the constructor). This way, any ViewProvider could overload the function in order to "not add clipping nodes", "add one, two, or whichever nodes are necessary to implement the clippingnode" ? Then the functions to interact with the clipping plane should be made virtual too, so for example, if I set a clipping plane node (defining the plane of clipping), in the case of the sketcher the function will be made virtual to ignore it as there is no clipping plane, in the clipping+capping object, it will operate with both the clipping and the capping (whatever that is)... is something like this what you would like to see?
looo wrote: ↑Sun May 13, 2018 12:39 pm
So I think inserting 3 clip-planes (half-views, quarter-views ...) at the root of the scenegraph is a future prove concept.
Here I cannot follow you. By scenegraph you are referring to the view scenegraph or the ViewProvider portion of it. What for 3 clip-planes and how do they relate to the half-views, quarter-views,...?
I take advantage of your great Python knowledge. I wanted to set an SbPlane from Python to c++
here.
I did not manage to make it, so I am passing a full "SoClipPlane *". Do you know by any chance how this could be accomplish? The thing is that for a SoClipPlane is already a little bit hackish, but if this would be implemented with other nodes in other circumnstances (I have no idea how capping is implemented), the passing a SoClipPlane to just to define a plane when a SoClipPlane may not even be used, that is a little bit ackward...