Hi everyone, I was hoping if someone could give me some ideas on how to achieve the following:
I am currently trying to find the places of most accumulation of water, to make it simple I am assuming these are the places where more streams intersect.

You can use a tool like spiderweb to create the graph an then extract the vertex degrees, and there are other graph measurements like betweeness, Centrality, and depth that can help you get a more precise solution

You can make a program (C# â€¦) to count from trunk to leaves â€¦ Is it more orthodox ?
Counting is recursive so graph traversing is necessary.
An example here.

Indeed. Notify if you want the usual freaky stuff (a recursive dendrogram in plain English). Hereâ€™s a similar thing in action (random order curves >> ccx dendogram).

Paths (the sequel of indices, that is) in the tree shown are actually the routing to a given curve meaning â€¦ blah, blah.

Hi Peter, that looks very promising, I only need to find the number of accumulative intersections of the streams and draw a circle with a size that reflects that number.

The only thing I assume you need is to know where to stop counting and draw the circle.
To this I say, draw a circle at every intersection.

BTW: From time to time you post stuff that is very easily addressed via code. For instance the C# posted requires about 15-30 minutes to do from scratch (but I had it already [cluster analysis etc etc]). If you know what are you doing is very easy: see how simple is the core Method for clustering the curves:

Thank you Peter, I have now checked your script. And I am afraid it needs a little twist:

To clarify the direction is towards the river, this means from many nodes towards one node. I think in the script you provided is the other way around.

And also, what I really need is the accumulation count of nodes as you travel down the tree. (You start to count from the branches towards the trunk as stated above).

So once you get to the trunk a number should represent the quantity of branches in that tree. Being able to tell the biggest trees from the smaller ones.

Thatâ€™s one line more but Iâ€™m not at home right now â€¦ for a given node you just have to resrtict counting only to first generation (of nodeâ€™s child paths in the dendrogram >> GH_Path.IsAncestor Method ).

BTW: As you travel towards the root sub-branch (towards the river [ i.e. a branch with a single dimension represending the index of the curve]) the first text Dot number is the sum of all child paths â€¦ so if you want to calculate some imaginary flow (using the second text Dot number)â€¦ blah, blah.

In any case the general solution is an object type node DataTree (with lotâ€™s of info other than the node Point3d â€¦ like the gen 1 childs, all childs, lengths, depth, cats and dogs) .

Then you can choose anything you want to play with.

Hereâ€™s a preview of the new nodeTree (minus the stupid bug that escaped the quality control (%#$ happens) : sorry about the double node points). Not sure if I can find the time for changing some things (tDot display etc) as well (required for the new structure).

I know what to do, and in time, I will. I often find myself limited: things I want to do vs things I can do.
Recursion is such a basic but elemental feature in any scripting language. I donâ€™t know why David left it out of grasshopper. I think at most it is sort of implicit in some components like â€śseriesâ€ť. I am starting with python and planning to move into C# then when I understand the basics. It is my understanding that once you learn any coding language you can move much easier to another.