Measure particular segments

Please help, I’d like to list and measure the sum of these segments, each one is identified by a change in elevation of each mid point. TYIA … (PS I’m running Rhino 7)

Measure segments.3dm (40.4 KB)

image

missing

A plugin but no GH file :interrobang:

Points make a polyline, length of polyline is sum of positions.

That’s weird … here’s the GH file
Measure segments.gh (5.7 KB)

Measure segments.gh (29.4 KB)

Note that this does not work if there are consecutive high points.

This also work with consecutive high points.


Measure segments.gh (9.9 KB)

2 Likes

Thanks. Super clever. Don’t have much experience using expressions like that.

@Volker_Rakow Thank You!! That was a lot simpler then I expected

@Volker_Rakow …one tweak, how to we make it so Z is a variable, meaning its not necessarily Zero,

Much appreciated!

I don’t quite understand what you mean. Could you be more specific?

If the Base Z coordinate is anything other than Zero it won’t calculate the desired segments. How can the script be adjusted so that no matter what the Z elevation is the segments are still gathered?


Measure segments movable Z example.gh (16.3 KB)

@ThomasE thank you … I didn’t mean combine the two I was just showing two different examples of the z changing … I internalized the data of the curve with the Z not at zero … weather Z is at 0, 12, 42 or 654 It needs to be able to identify the segments.
Measure segments r1.gh (8.7 KB)

Thanks again

Measure segments_v2.gh (10.3 KB)

@ThomasE

The script worked with my initial example, but when I try different linework the numbers don’t line up

Measured segemnts alt.gh (16.1 KB)

After SortList you need aList item to pick just the lowest value. You delete it…

1 Like

Thank you … not sure how that happened