o Common - just like C#. But Rhino Python has a "Scripting Language Wrapper" which breaks commonly used taks down to simpler functions.
Here's a general Example:
Take a look at the code on this website http://wiki.mcneel.com/developer/rhinocommonsamples/addline). Generally it's Rhino Common code in three language to create a line. They look equally difficult.
But if you use Rhino Python Scripting you can use an simplified syntax to get the same result. It's very similar to Rhino Script.
The code would be:
import rhinoscriptsyntax as rsstart_point = rs.GetPoint("Get start point")end_point = rs.GetPoint("Get end point")line_id = rs.AddLine(start_point, end_point)
OK - No Error Tracking here, but still you can see that the syntax is much simpler. (And in the end you just have less lines of code you have to debug.
And the good thing about Rhino Python is, that you can mix these approaches. Once you reach a level where Rhino Python Script doesn't get you there, which by the way happens very rarely, you can still use the Rhino Common methods.
Also, in Python Sycripting 99% of what you probably would like to do is available as a "wrapped" script function.
Rhino Python Script is currently also better documented than Rhino Common for C# and VB.Net. If you have used Rhino VB Script before, these functions will be very familar to you.
I'm not sure, why it's currently a separate plug-in. I belive the reason is that Rhino 4 (which is supported by GH) doesn't support Rhino Python. Also it's currently WIP, so it needed to be updated more frequently than GH itself. In the long run (I believe) it might be integrated into GH as a general component
- Martin
P.S.: To use Rhino Python within GH is a little more tricky than my example - but nothing compared to developing C#
P.S.2 Here's the code with Error Tracking:
import rhinoscriptsyntax as rsdef AddLine(): start_point = rs.GetPoint("Get start point") if start_point is None: print "No start point was selected" return end_point = rs.GetPoint("Get end point") if end_point is None: print "No end point was selected" return line_id = rs.AddLine(start_point, end_point) return line_idAddLine()
…