Parameters of same type become tree not list

Could someone explain to me why the situation as shown in the screenshot is happening?

I am connecting 2 instances of Rhino.Geometry.Curve to the Curve parameter and instead of getting a list, I am getting 2 different data tree branches. Even if I pass the Line through a Curve parameter to make them both read “Line-like Curve”, the effect remains.

I have stumbled upon this in other instances of my custom components and I am wondering if I can do something to prevent it.

Yes, you’ve kind of already answer it by yourself – one is {0;0} and the other is {0}.
They are different structures.

To convert a single {0;0} to {0}, the simplify won’t work. You need the Surify component.

That’s obvious.. and I never realised it.

The question now becomes, why does my component output go to {0;0} instead of {0}?

The Curve parameter is set up with list access and I am only using SetDataList once on it.

I also have another component with a list output that gives a single list with a path 4 layers deep {0;0;0;0}! Could someone explain why Grasshopper does this?

This is automatically done by the components internally.

Without looking at the code of what’s inside, I cannot tell you why.

As far as I know there are some mechanisms to guarantee different circumstances are all handled well by the development of grasshopper.

If you want to build a good mental model of how Grasshopper handles this, @andheum made a really good summary

1 Like