Please excuse my ignorance, I am trying to understand a GHpyhon code from a tutorial as attached.
I understood most of it, except that I couldn’t figure out what the “i” does in the function
def (r,i):
I guess the “r” can be replaced by a geometry to form a loop, but what is the role of the i?
if anyone can let me know in simple “English”(lol I am rather overwhelmed by codes ) I would really be grateful!
Thanks for your answers, do you mean the ghpthon library should be used less?
Would you have any suggestions of where to learn ghpthon properly?
Thanks !
Correct, it’s basically a Python module that wraps the RhinoCommon node-in-code namespace, which in turn wraps parts of Grasshopper. That’s a whole lot of indirection, when one can usually simply implement RhinoCommon directly (i.e. import Rhino). That said, a lot of Grasshopper components go beyond RhinoCommon and therefor may require using ghpythonlib.components if one cannot implement their underlying functionality directly.
I see that the Rhino.Python Guides appear to have mostly removed its GhPython content. But there is still a lot of relevant learning material there. If you’re willing/able to pay for it I’d suggest enrolling in this class the next time it’s available. It would be great if it was made publicly available similar to the C# classes @LongNguyen has taught over the years.
This McNeel produced video content might also help: