Python comes standard with modules that can be imported into our scripts and used within Grasshopper. In this video, learn how to import and use some of those modules, including the math, random. and csv modules.
- [Instructor] As we have learned in an earlier video,…Python provides built-in functions that we can use as needed…within our Python scripts.…We have also learned that we can import libraries…such as RhinoCommon and use all the classes…structs and functions, among other types…contained within them.…Python also offers built-in Python modules…which contain classes, functions, and variables…that we can us as needed.…In the context of Python,…modules simply refer to a Python file…which contain these classes and functions.…
These modules allow us to bring in classes and functions…for a variety of different uses…such as using math functions,…or working with CSV files,…among many others.…In Grasshopper, let's import one of these modules…and use it within our script.…I've gone ahead and I've placed three sliders,…which are being input into three inputs…on a Python component.…These being amplitude, length, and frequency.…Let's double click the Python component…to open it up.…As you can see, I've also replaced…the Rhino script syntax import…
- 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.