[Grasshopper] How to use Tree Item to retrieve data within a specified branch

[Grasshopper] How to use Tree Item to retrieve data within a specified branch Grasshopper component EN

This section explains how to use Tree Item to retrieve data within a specified branch.

Tree Item1
Tree Item2

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


↑Youtube Channel

Retrieve data within a specified branch

Using the Tree Item allows you to retrieve data within a specified branch.

Retrieve data within a specified branch

Components used: ①Entwine ②Tree Item

For this example, we will use data created in Entwine, where values from 0 to 8 are divided into three levels.

Connect data organized into arbitrary branches to Tree Items(T).

This time, we’re connecting Entwine.

Next, connect the desired branch name (Path) to the Tree Item(P).

This time, we are connecting {0;1}.

Furthermore, connect the index number corresponding to the data within the desired branch to Tree Item(i).

This time, we are connecting 1.

Then, as shown in the image above, we were able to retrieve the data corresponding to index number 1 in the {0;1} branch, which is the value 4.

multiple path names

You can also specify multiple path names.

The image above specifies two branch names, {0;1} and {0;2}, for the Tree Item(P).

Then, we were able to retrieve the values 4 and 7 from the data with index number 1 in {0;1} and {0;2}.

multiple index numbers

You can also specify multiple index numbers.

The image above specifies two index numbers, 1 and 2, for Tree Item(i).

Then, as shown in the image above, we were able to retrieve the data corresponding to index numbers 1 and 2 within the {0;1} branch, namely data 4 and 5.

List of Grasshopper articles using Tree Item component↓

Comment

Translate »