How to Distinct data tree's (string)

Hi,

I was wondering if it would be possible to distinct data tree’s together. For example, there are 3 data tree’s that are combined with entwine, but i want to distinct branches that are the same and make a new list/data tree out of it. Is there a way to do this? I have tried to code it myself, but i get a error everytime i try to use the Distinct() method.

Regards,

Giorgio

That’s rather easy via code. If you are in the C# bsndwagon… what is your Level? (say 1 to 10).

I would say 6-7, but im used to program code in visual studio. In the C# component of grasshopper it works a little different i have seen. The component keeps making loops and i cant really use other extensions. Normally I only need to use using LINQ but that doesn’t work in the component even if I imported the DLL.

What i had in mind was making a new class, calling it for example : DataTreeInfo that can take up to 3 strings as info in it.

Then use the class to add the info from the branch in a list of the class DataTreeInfo. Then i wanted to distinct that list.

What means this? I hardly can imagine having any issue with C# (and no VS - the from/to part breaks my nerves) .

Anyway I’m in some sort of extended wave windsurfing vacation but if there’s no wind I’ll prepare a suitable demo (DistinctBy/LINQ and the likes) for the occasion.
Screen Shot 028

1 Like

works perfectly fine.

1 Like

… i didn’t know i could type the extra using’s underneath it with the white space there. Thanks a lot!

Enjoy your vacation! No need to make haste for the demo. Really appreciate the effort and i rather have you enjoy your vacation than trying to solve my problem here. :slight_smile:

Hope dies last (wind is dying).

In the mean time read this classic :

1 Like

Disaster : (a) Indeed there’s no wind (b) No pretty girl needs some kind of help (In the Name Of Science - obviously) with her gear.

So let’s start writing some lines and do some random trees related with proper bikes. Note: Green is reserved for Kawasakis (ZX10R and the likes):

Then do various LINQ stuff and find the Truth Out There.

More soon (or “soon”).

1 Like

Well … there’s wind. Plus this w/e is MotoGP w/e … meaning that all activities (bar windsurfing) are on halt. Race preparations are under way (with regard Fabio - I hate him).

However, get some start-up stuff and add your own queries:

Lists_Distinct_EntryLevel_V1.gh (124.8 KB)

1 Like