Python gives us the ability to iterate through lists of data, performing functions as we do. In this video, learn how the for loop works, greatly extending the functionality of Grasshopper.
- [Narrator] While scripting with large lists…in Grasshopper, we often need to perform…a single or set of instructions…for every item in the list.…Say, for example, we had a list of numbers.…We may want to create a list of points…or objects based on those numbers.…To do this in Python, we need to learn…about a programing concept know as looping.…Looping allows us to execute an instruction…repeatedly until a certain condition is met.…Say, for example, we a loop through…every item in a list.…
There are two types of looping in Python:…the for loop and the while loop.…Let's start by having a look at the for loop.…Say, for example, we have a list…of numbers zero through to five.…A for loop will allow us to iterate…or loop over every item in the list…and perform an instruction.…To do this, we need a temporary variable…say, Var for example.…However, this could be any variable we like.…And for each loop through the list,…the item will be temporarily assigned to that variable…So looping through our list of numbers,…in the first loop Var would equal zero,…
- Python components
- Accessing the Rhino API
- Python programming basics
- Importing modules and libraries
- Grasshopper workflows
- Evaluating surfaces
- Creating and splitting surfaces
- Transforming geometry
- Baking geometry from Python into Rhino
- Adding text objects
- Exporting rendered frames for animation
Skill Level Intermediate
1. Working with Python
2. Python Basics
3. Importing Modules and Libraries
4. Grasshopper Workflows
Next steps3m 53s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.