From the course: Grasshopper and Rhino: Python Scripting

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Grasshopper library

Grasshopper library

From the course: Grasshopper and Rhino: Python Scripting

Start my 1-month free trial

Grasshopper library

- [Instructor] Besides adding external libraries like Excel to our path and script, there are also many libraries ready to import like Rhino comma, which assists with working with Grasshopper in Python. One of these is the Grasshopper library, which provides classes and functions that help us to work with Grasshopper objects, such as DataTrees. In our last exercise, we imported a list of points from Excel. However, these came in a single list not broken into separate branches. By doing this, it might help us to use them in an ordered way. You'll notice that I placed a Point component which includes the internalized points from the last exercise, just in case you didn't have Excel. Let's go ahead and place a new Python component. And we'll change the input to points, which will be List Access. And Type hint to Point3D. Then let's change the output to tree. Then let's plug our points into the Python component, and open it up to create a DataTree. First let's remove the rhinoscriptsyntax…

Contents