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.
Accessing the Rhino document
From the course: Grasshopper and Rhino: Python Scripting
Accessing the Rhino document
- [Instructor] Geometry generated in Grasshopper is eventually baked and stored within a Rhino file. Using Python, we're able to bake geometry and assign attributes including layout and object colors. In order to do this, we need to be able to access the Rhino document we're working in, and make some changes. This is done through a few different namespaces. The first is the Rhino.DocObjects namespace, within here is where we can find all the object types, that are found in the document, so classes for breps, curves, and dimensions for example. These types differ to the types we've been working with in the Rhino.Geometry namespace, in that they have attributes attached to them such as color, layer, and reference to the underlying geometry types that make them. So in order to bake, we first need to create an attributes object and set it's properties such as color and layer, and then add our geometry to the document along with these attributes. So by accessing this namespace, we can…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Evaluating surfaces9m 45s
-
(Locked)
Creating panels5m 13s
-
(Locked)
Splitting11m 35s
-
(Locked)
Sorting8m 49s
-
(Locked)
Attractors10m 2s
-
(Locked)
Transforming11m 49s
-
(Locked)
Lofting9m 46s
-
(Locked)
Analysis12m 35s
-
(Locked)
Accessing the Rhino document2m 33s
-
(Locked)
Baking form13m 56s
-
(Locked)
Adding text9m 3s
-
(Locked)
Animating form6m 7s
-
(Locked)
Animating renders8m 22s
-
(Locked)
-