I just saw this way to let the user define a plane and I think it’s very nice. Actually I have been looking for this. It let’s one chose an Xaxis and then consecutively Y. The nice thing is that you pretty much see the outcome of the operation in advance.
I did not find this in the Rhino.Input namespace.
Any ideas here?
@tobias.stoltmann, I don’t personally recognise the screenshot, so I’d guess so. You may be able to de-compile the plugin with ilspy and find the answers in there
it is likely a point picker with a dynamic display override to draw geometries. Below is a simple python example which might help. Use _EditPythonScript to open and run it. If you pick the third point with elevation (hold CTRL) before you pick, you’ll see the geometries follow dynamically.
what kind is “e” in this case.
I am trying to reproduce this in C# and I have to admit that I am not very profound with events.
(I’d like to learn though.)
it is Rhino.Input.Custom.GetPointMouseEventArgs but in this delegate it is just calling the base class, so it is unused. The script will work the same if you remove the whole function.
I’ve left it in for reference because usually it is a bad habit to perform calculations directly in the OnDynamicDraw function (it is meant for display and called for every frame). The code would be technically better if it makes all calucations in the OnMouseMove function and stores the data in class wide variables which are then accessed from OnDynamicDraw.
OnMouseMove is called but empty. But OnDynamicDraw is called in all views by default on every frame, eg. If you change your view orientation. You can get the view it draws at a time from e.Viewport. Does this help ?
@clement, thanks for the detailed explanation first of all.
public void OnDynamicDraw(??? e)
I think basically I am struggling with the type of event that is passed into the function. Sorry if I am not able to articulate myself more specific, I am kind of lost in this topic.
I think once I have understood what event and more specifically which even type is called I can make up my mind about what you epxlained.