Grasshopper

algorithmic modeling for Rhino

Has anyone seen a list of the commands in GH with their python/rhinoscript equivalents?  Does this exist? Would this be helpful for someone transitioning from GH to Python? Your thoughts...

Thanks

Views: 1729

Replies to This Discussion

Hi Stan,

A list of one-to-one "Python function <-> Grasshopper component" equivalents does not exist. That said, as far as I understand, most Grasshopper components now implement classes from the RhinoCommon SDK. This SDK is also exposed for use with Rhino.Python by simply importing Rhino. There is also the RhinoScriptSyntax library, which is essentially a list of Python functions which emulate RhinoScript functionality. Note that all these functions also implement RhinoCommon (they are a bit like easy-to-use wrappers around RhinoCommon). If you are just starting out I would recommend plowing through these resources over on the Rhino.Python forum.

Hope that helps,

/Anders

Attached a very basic example of how to use RhinoCommon. I've noticed that this seems to trip most people up a bit in the beginning, so hopefully this will help :)

Attachments:

Nice, Thank you Anders, that should get me going. Thanks for your help.

Stan

Very nice Anders.
Just one question:

The "random", is a name of the native Python module, and the name of the function within the "random" module?

random.random()

That's right. You can find the documentation for the Python random module here. The function I was using is just the most basic one. Have fun :)

Thank you once again.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service