From the course: Grasshopper and Rhino: C# Scripting

Unlock the full course today

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

Splitting

Splitting

From the course: Grasshopper and Rhino: C# Scripting

Start my 1-month free trial

Splitting

- [Instructor] We now have a grid of panels forming a facade. So, let's examine how we can make them a little bit more exciting by creating voids within them. I currently have the exercise file open for this lesson which is where we left off from in the last lesson. Let's start by opening the C# component and after line 76, where we create the nerve service panel, let's create a method which will take that panel, split it, and return a breadth. For this, we need a breadth variable which we'll call "split breadth". We'll assign to this a new method which we'll create called "make split" and, then, parse in the panel as a parameter. Then, on line 80, instead of adding the panel, let's add the "split breadth". For this to work, we also need to change the type of object that the panel's list is storing. Let's change this to, "breadth". Great, what we need to do now is create that "make split" method. So, let's scroll…

Contents