I’m evaluating CAD Packages and Rhino 7 is on the list.
I’m very interested in Rhino 7’s capability of facilitating users writing their own plugins.
I’m specifically interested in using Rhino as a tool for Simple Architectural Design… Floor Slabs, Walls, Colums, Beams, Web Trusses…etc. So 99.99% of the time I’ll be dealing with straight lines and flat surfaces.
What I’d like to try to do is to design a two-screen setup.
The first screen would run a stand-alone WPF Program, which I would design, and that program would essentially be a “large dashboard” that is customized for creating quick architectural designs. It would create these designs on the fly by sending “Rhino Macros” over to Rhino running on the second screen.
So, on the Rhino side the plugin needs to do two things:
-
It has to participate in a IPC(InterProcess Communications) with the WPF program for the transfer of the “macro text”. Two possibilities for IPC are “Named Pipes” or WM_COPYDATA.
Here is a link to some WM_COPYDATA info:
Interprocess Communication Between .NET and MFC Using WM_COPYDATA - CodeProject -
Secondly, the plugin needs to find a way of sending the macro to the command line for processing.
In reading some of the Rhino Developer Docs, I see a Macro can either be assigned an Alias…or assigned to a Button Icon. The Alias method is a non-starter, since it too has to be typed into the console. The button method might work if there is a way for the C# plugin code to define the button…constantly reload the button with new macros…and simulate a button push that would fire off that macro in the Command Line or message loop
Of course, there may be size restrictions on the string length of the Macro text being held in the button…but that would just mean shorter macros…but more of them.
Another issue that comes to mind is if the command line ever throws up error messages/dialog boxes that need user intervention to clear. Hopefully all errors to the keyboard/mouse/command line message loop are non-blocking…and simply display as lines of “error message text” in the “command line log”.
One more thing:
I know graphic objects in WPF have properties of “Visible” or “Hidden”.
I’m sure Rhino graphic objects are the same (which is probably how layers are hidden or visible).
And of course, both WPF and Rhino can set the surface colors.
WPF also has an “opacity property”…which affects the transparency of the object.
This is a very useful capability…and hopefully Rhino has it as a settable property for their Graphical Objects.
I’d appreciate any input…
Thanks!