[Grasshopper] How to use List Length to obtain the number of items and length of a list

[Grasshopper] How to use List Length to obtain the number of items and length of a list Grasshopper component EN

This article explains how to use List Length to obtain the number of items and length of a list.

List Length1
List Length2

On the Grasshopper, it is represented by either of the two above.


↑Youtube Channel

Obtaining the number of items and length of a list

Obtaining the number of items and length of a list

By connecting a list to List Length, the number of items in the list can be obtained.

In the case of the image above, there are a total of 7 data items (0~6), so 7 is output.

other data

Components used: (1) Rectangle ( 2 ) Surface (3) Deconstruct Brep (4) List Length

Although the data in the previous example was numerical data, other data can be used in the same way.

In this case, we created a rectangle with Rectangle, converted it to a surface with Surface, and obtained the four edge lines with Deconstruct Brep.

Connecting the four line data to List Length yields 4 as the result.

List of Grasshopper articles using List Length component↓

Comment

Translate »