.NET Plugin development

I´m a C# programmer for a while, and I´d like to play it with Rhino.
However, I have a few questions?

  1. Is the Express Edition o VS enough for it?
  2. Is there a limitation about not using C++ with MFC?
  3. Where do I find resources or sample files?

Thanks

  1. Yes, use the project wizards from this page http://wiki.mcneel.com/developer/rhinocommon

  2. For C++ plug-in you need VS professional or better because MFC is not included in Express Edition. Note that the latest community edition of Visual Studio (which was recently announced) may work with C++ plug-ins - untested though…

  3. Start here http://wiki.mcneel.com/developer/home for more info

Express doesn’t support extensions. Do the wizards work with the Express editions?

It says so on the page (“including C# Express and VB Express”). I do remember that I had to tinker with CSPROJ files in the past to get them to work in Express version though… YMMV

I use the VB Express edition and yes I can create rhino plugins (rhp) and windows applications. Also I havn’t found a limatation in the Express version.

1 Like

Jordy

Is there a limitation using .NET over C++/MFC for plugin development?

Sorry i can’t give you an answer on that question, because… I dont know. :frowning:

I’m using VB.Net and till now I could solve all the problems with it.
Maybe @stevebaer can give you a propper explanation (sorry if I linked the wrong person but I thought you were the right guy for this).

If I may jump in here: there is much you can do in .NET but not everything that can be done in C++. Can you maybe elaborate what you want to make a plug-in for and what it should be capable of?

My experience is (but I am biased with more (recent) experience with .NET than with C++) that development of .NET plug-in code goes much faster than in C++. Having to manage memory, finding my way around the large and sometimes confusing SDK is and not having a rich and intuitive framework to fall back to are the main causes for this IMHO.

In fact I just want to do some things to myself (not for sale).
I just don´t want to learn something and have to stop in the middle because it´s not capable to go on.
By the way, MFC are is an old framework, and C++ is not that easy as C#.

True; but these limitations are usually easily fixed by expanding the .NET SDK to cover some functionality that is missing (this is getting to be less and less with every service release.)

The counter can also be said; there are things that you can do in the .NET SDK that you can not do in pure C++\MFC. This would include pretty big things like being able to work pretty easily with things like python and grasshopper. Also, user interface in general is easier to write with .NET than with MFC.

if you are just starting to learn a new language, I would start with C# over C++. It is going to be less frustrating to get things started and there are enough similarities that you can use what you learn from C# if you ever feel the need to write C++ code.

3 Likes

Maybe I will share a bit of my experience with plug-in development over the past two and a half years. We have developed, with a team of 2 people, several plug-ins in the marine field. One is a plug-in that creates ship propeller surface for (model) production milling and with sufficient accuracy for advanced computational fluid dynamics (CFD) calculations. This is done in C# only.

Another plug-in is for grid generation: creating meshes on (ship hull) surfaces for use in CFD and other calculations. Also, C# only.

The latest plug-ins that we are currently developing relate to ship hull drawing. Here we had to go to C++ because of the fact that not all desired functionality was available in C# (custom control points) and for performance too. Performance for example to get to ~30 fps live updating contours and Gaussian curvature whilst the surface is being edited by control point dragging.

I would definitely recommend getting started with C# - it is so much easier and so much faster to develop in C#. For me, especially when I was starting out with C++ with over a year of C# plug-in development done, it was like stepping off a high-speed train and onto a horse drawn carriage.

Also, it is not a choice of either/or. In the Rhino.Runtime.Interop namespace in C# there are utility functions to go back and forth between C# and C++. So, if (and not when) you end up in a point where you can’t do in C# what you can do in C++, you can mix and match to get the desired functionality done.

2 Likes