Tree Statistics: Path output in brackets - what's the benefit?

@DavidRutten: What is the benefit of having the Tree Statistics path output within curly brackets?

More often than not I end up extracting the number for further manipulation.

Its the data format of “Paths”. That way you can use them as Paths again without having to add the brackets yourself. If you for example use Tree Branch component that expects the Paths data format for its P input.

Say you want to randomly pick a bunch of branches from a data tree you can use tree statistics to get all the paths, select a bunch of them randomly and then use Tree Branch to get the actual data.

Also dont forget that its not “just a number in brackets”. That is only true if you have just one hierarchy level. If you have more than that it might be something like {0;0;1;0;4;5}, which you cannot reduce to a single number, but only to a string.

I know that it is the data format.

However, at least the Tree Branch component does not require the path to be in curly brackets for the component to function. It works with concatenated numbers. Deconstruct Path and Path mapper also assume that a string with ; somewhere in between is a path. So what’s the point?

Alright, I see your point. In the context of Grasshopper it could be displayed without the brackets. But I think in the actual code environment its much easier to use a proper syntax where you can signify what is a path and what isn’t. Just like any programming language has certain conventions of writing arrays, variables, etc. Of course you could always infer the meaning without much convention, but only in the single context. As soon as you mix different data types its essential that the code can tell them appart.

So why display it differently in Grasshopper? You HAVE to have the ; between the numbers anyways, so why not the { }? That way you display the data in GH the same way you represent it in the written code.

You know there is Construct Path and Deconstruct Path that will turn the Paths into indiviual integers for you already with their own tree structure and then you dont even have to use text split and concatenate and all that where there is unneccessary conversion between the Path, String and Integer datatype.

Haven’t used Deconstruct Path much, thanks!!

For the sake of an argument, we also have all sorts of numbers with units yet we always calculate with numbers. For display purpose we add units. I can deal with it.