I want to get the cumulative height difference of a curve, preferably using geometry nodes. For example, if one curve goes from 0→100m Z in a straight line and another goes from 0→100→0→100 (i.e. twice fom 0→100), just getting the bounding box would in both cases give 100m, but the second curve has a cumulative Z increase of 200m that I would like to get.
How would I go about getting this value?
I am thinking to use resampling of the curve to, say, 1m steps and then check for positive Z changes between all the points, worrying about the curve direction later. I am still trying to wrap my head around how to operate on points and do not know where to start, but I suppose it involves comparing consecutive points somehow.
Solved: Adding to the solution provided by Chris. I think I reduced it to the bare minimum without messing anything up. It misbehaves if object origin is below the spline of the curve, but otherwise seems to work perfectly.