Working with Lists

Danil Nagy
Introduction to Grasshopper
8 min readJun 26, 2020

--

At the heart of any Grasshopper definition is the data. Grasshopper components process and create data, while wires transport the data between different components. In the last exercise, you may have already noticed that some wires look different from each other. This is because the visualization of the wire changes based on the structure of the data flowing through it. There are three types of data that can flow through a wire in Grasshopper:

  • Item — one data element, for example one curve object
  • List — an ordered set of elements, for example 10 points
  • DataTree — a more complex data structure composed of two or more Lists

DataTrees are the subject of the <next lesson>. For now, let’s focus on Lists, and how to work with them in Grasshopper.

Creating lists

Many components generate Lists of items as a result of their operation. For example, the Divide Curve component we saw in the first exercise uses one curve and a value specifying the number of divisions to create a List of Points along the Curve.

To create your own List from scratch, you can input multiple values into a Panel component. A shortcut for creating a Panel is to double-click on the canvas to bring up the search bar, then type ‘//’. This will create a new Panel, and place any text you…

--

--

Introduction to Grasshopper
Introduction to Grasshopper

Published in Introduction to Grasshopper

This course teaches the basics of computational design through Grasshopper, a computational design platform built on top of the Rhino 3d modeling software.