This article explains how to use Simplify as one method for manipulating data structures.

When Simplify is set, a mark like “Y” will appear at the edge of the component as shown here.
How to set up Simplify and its effect
First, let’s look at how to set up Simplify and its effects.

Components used: (1) Entwine
As an example, we will use three lists, each containing four values, connected to Entwine, and the data combined.

To set it to Simplify, right-click on the end terminal of the component and select Simplify.
In this case, we set Simplify on the Entwine(R).

Then you will see a Y-like mark like this.
This completes the Simplify setup.

Let’s check the data structure before setting to Simplify.
Before setting up, the branch is {0;0}, {0;1}, and {0;2}, as shown in the image above.

The data structure is easier to understand if you think of it as a box.
Before setting to Simplify, there is one big box of 0s with smaller boxes of 0s, 1s, and 2s.
However, the big box of 0’s does not contain any individual data other than the small boxes.

Let’s look at the data structure after setting to Simplify.
After setting up, the hierarchy is {0}, {1}, and {2}, as shown in the image above.

Let’s also look at the data structure after setting to Simplify as a box.
This time, there are only three small boxes, and the large box that surrounded the three boxes is gone.
This is what Simplify does: it erases the big boxes and leaves only the small boxes if the big boxes contain no individual data other than the small boxes.
It is called Simplify because it simplifies the branch in this way.
Examples of Simplify Usage
Let’s look at an example of using Simplify to see how it changes before and after use.
In this case, we used Merge to compare how branches are combined before and after Simplify.

Additional Components: (1) Merge
First, let’s use Merge to combine the data before and after Simplify Entwine.
The branch before Simplify is {0;0}, {0;1}, and {0;2}.
After Simplify, the branch is {0}, {1}, and {2}.
Looking at the data output from Merge, the branches {0;0}, {0;1}, and {0;2} and {0}, {1}, and {2} are combined without being merged.

Next, the two Entwines were set to Simplify.
Therefore, the two data structures are both combined with {0}, {1}, and {2}.
Looking at the data output from Merge, each number in the same branch is grouped together.
Therefore, the two {0} branches, which originally contained four numbers, are now one, and you can see that there are eight numbers in that branch.
The same is true for {1} and {2}.
As you can see, the result can change depending on whether the branch is the same or not, so remember that you can utilize Simplify to change the data structure.
List of Grasshopper articles using Simplify↓
Comment