I’m making a specialized application which will be heavily based on Rhino and GrassHopper components using RhinoCommon, and I plan to use a separate User Interface where some Rhino Viewports peeps through the windows Forms without exposing its own UI.
Is that possible with Rhino? (only displaying the Rhino Viewports from within a .NET application, that is)
Type of Win App?
If the Viewport thing is possible, I would also need some advice regarding the type of Win App to start from. WinForms or WPF? (I’m new to .NET)
Since I am currently learning both Rhino, Gh and .NET in one go I would humbly and readily listen to advice from experienced .NET. developers. (I’m an ol’ Delphi guy from the pre historic but glamourous days of Delphi 7 & 2007)
VS2015 Project
I will code the main form (and possibly the main app) using either VB.NET or Remobject’s Elements Oxygene using VS2015 Community for now (I’m currently evaluating both VB.NET and Oxygene).
Specific Problem Domain
Not that I’m ashamed of “putting Rhino on display”, but the end users of the app will have no idea about CAD tools, and will need only to see the (interactive) graphical results of their “parametric” user input of some predefined specific geometries within only a specific problem domain. No drawing or even editing will be performed by the users.
Most of the logic will be based on and executed by GrassHopper (Rhino5).
Platforms
Although I can live with ending up supporting Windows only, it is always a good idea to consider platform independent solutions. UI technology usually is a showstopper in this regard. Should I forget about multi-platform altogether, given the basic approach I’m taking?
OK, but if the application is GH based, it can use the entire .NET world (?) and then the question again - can a GH application pick only the Viewport(s) and insert it/them into a new form? It doesn’t matter if I would have to “fake” the visual impression of the viewport being integrated into the form, technically it doesn’t matter, if it only looks like it is. “Viewport on top of another form” would be good enough.
I notice that viewports can be manually detached from Rhino as a “free-floating” window, so if this could be done with code, and kind of fake integration with (or on top of) another form, the form in the “background” then… see the picture again.
We have a very basic prototype working that you can experiment with and let us know where it would need to be changes. Here is a sample script that uses the Rhino.UI.Controls.ViewportControl control.