algorithmic modeling for Rhino

I've heard Python is a strange animal.... however its definition as an object based language makes me think it is this way so, because its a perfect accompaniment to 3D modelling and Grasshopper?

Can someone enlighten me and let me know which is the best language to learn for 3D modelling in Rhino and through Grasshopper for automation and or use in complex design systems co-ordinations?

for example when generating complex multi-object geometries, 3D tessellated patterns or BIM for example.

Views: 2068

Replies to This Discussion

Grasshopper works equally well with all .NET languages, be they Python, VB, C# or anything else that you can manage to compile to MSIL code. The question is what works best with you as an individual.

Grasshopper is written in VB.NET and C#, Grasshopper2 will be written only in C#.


David Rutten


A bit of a deep question this, you say gh 2 will be written in c# only. I myself have only coded in What wS your rational to go to c# only? I'm concerned about the legacy of and wondering if i should change. Also, how are you managing to rewrite gh1 to c#? Why have you decided to go the c# route? I understand at the end of the day both languages compile to msil, just interested on your take and whether i should consider switching


I am one of the few people in mcneel who likes VB. In an effort to open up the code base to other RMA employees we decided that switching to C# was called for. There's nothing more to it than that.

You don't have to switch, we'll keep supporting VB.

GH2 will be (is being) rewritten from scratch which is why it doesn't really matter if we change languages. There is a slight issue with running VB code cross-platform as it relies on a specific assembly called Microsoft.VisualBasic which may or may not be available everywhere. The Mono people don't seem to care much for VB and their support for the language is notably lacking behind C# and F# support. This is not an issue on Windows where we can use the Microsoft implementation of .NET, but on Mac it may be a slight problem.


David Rutten

Got it, thanks as ever for the response. If you have time, what is your experience about switching to C#. Isn't it a massive undertaking to re-write everything again in C#?

This maybe not the best place for this question but, as regards GH2.0. Are there any major things as GH developers we need to know about it? How backwards compatible will any components developed for GH1.0 be? 

Thanks Luis, thats great for small scripts but i suspect its not so simple when you have 10 000 lines of code, i will keep an eye on it, thanks again

It is a big job, but I'm not mindlessly translating code from VB into C#. I've learned a lot about proper coding in the last 5 years and I want to make a lot of changes to the way things work internally. Quite frankly the work involved in translating code from VB to C# pales in comparison to the amount of work involved in validating code and rewriting it if it doesn't pass muster (which is often).

At the moment I'm still working on core classes such as datatrees and the initial implementation was so messy that I decided to not even look at the original code too much. 

Yes, it's a huge amount of work and it won't be done within the next few weeks/months.

If you install SharpDevelop, it has functionality to convert entire projects from VB into C#. We did this for Monkey a few years back and it seems to have worked fairly well.


David Rutten

There's no such thing as a "best language". Language choice depends on your experience, the platform you are writing software for, your development environment, and who you would like to collaborate with, in addition to the technical demands of the particular software project.

All the languages David mentioned (VB, C#, Python) work well for 3D modeling in Rhino, and can be used for the tasks you've described. You should try all of them in the long run.

Python is commonly used for introductory college courses in programming, so it has a reputation for being beginner friendly.

the type of Python you would use in Rhino is not the standard Python, but is a variation that itself is actually written in C#, called IronPython. There are a few quirks to using IronPython that you wouldn't have to deal with if you were programming in C# or VB.NET, or if you were programming in Python outside of Rhino.

If you wanted to build plugins for Rhino or on Windows computers generally, I would push you towards C# or VB.NET. If you are brand new to programming I would push you to try Python (because it's easy), and encourage you to try other languages down the road.

Python is a great scripting language but not a development language, my main beef about it is that it is not a strongly typed language and you can get into a mess trying to error trap things and because everything does not need to be declared, everything is an object, ( yes even in .net the base class of everything is an object) objects are late bound and slow, due to unboxing, compared to c# and Anyway, any language discussion is pointless, it all depends on application and context,






  • Add Photos
  • View All


  • Add Videos
  • View All

© 2021   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service