Now we are finally ready to see how we can work with the data we obtained in the previous section.

Examples of tree operations

An important property of a tree is that each branch is processed separately. For example, let's build a polyline using our points - PolyLine.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/da8e1e13-a5a2-4a2e-8576-5ee747f06ca9/Untitled.png

We get separate lines for each branch, so we can work with large models but manipulate individual branches as if they are not connected to each other.

Let's make these lines closed - the 2nd input of the PolyLine node "C" is responsible for this, it takes a boolean value 0 or 1 or False or True.

False - do not close the line, True - close it.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/e7940b7a-3a6b-41b6-88ef-2e2e4f51bdd3/Untitled.png

By default, False is set.

To change this, we add a Boolean Toggle node and double-click the left mouse button to switch to True.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/aa75b760-0baa-440e-9542-aa08535b0fc8/Untitled.png

<aside> 📌 Many nodes have a quick switch between False and True. Right-click on the input of a node where a logical data type is expected and select Invert.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/11273583-32a9-4554-bf7c-367eb1ce322d/Untitled.png

This mode flips the value to the opposite - if the default value was False → True and vice versa.

⚠️ This method will work even if we connect the Boolean Toggle to the input "C" and set the value to True, then the Invert function will return the value to False and in this case, the line will not be closed!

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/1ce95357-efe7-496f-8cbb-b51f831fbcdb/Untitled.png

</aside>

Now let's extrude these lines to create volumetric objects. We add the Extrude node, which performs extrusion in a certain direction. To choose the direction, we will use the UnitZ node, which specifies the direction along the Z-axis, and connect a Number slider to indicate the distance, for example, 46.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/ed5dd9da-e8a6-466d-a70a-46d8bd062b39/Untitled.png

<aside> ⚠️ Now we are focused on trees, so we will do more complex things in practical exercises.

</aside>

Selecting a specific branch of a tree

For working with trees, there are many nodes, but for now, let's look at a node that allows us to select a specific branch.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/815e1155-726b-431a-bd09-09c36ec536c8/Untitled.png

Or multiple branches

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/3a71b81e-a432-4013-800a-36d10a96f11b/Untitled.png