How to extract the last curve of each massive addition count?

Hello, the image represents what I am trying to do.
I have two lists, I want to extract every 5 meters approximately the last line to which this sum corresponds.
I have not been able to understand how to address this problem. any help would be great thanks

massive addition of curves.gh (44.3 KB)

“addiction”? https://www.merriam-webster.com/dictionary/addiction
This is the wrong forum for that problem.

:grin: OK

Try this

massive addition of curves2.gh (43.3 KB)

1 Like

that works thank you very much :grinning:

However can I ask something else?
if I change the series of elements. I see that the values very close to each other share the same point.
How can I average those items that have those characteristics?

You can do average like this , i don’t know about your other question;
maybe with converting numbers to points or logic math with floor and ceiling

massive addition of curves2.gh (39.8 KB)

1 Like

it’s about item 27 shown on the panel. it is not taken into account in the boolean as a value close to 35