Measuring Curves In Reference to the Z plane

Hello Everybody,

Please forgive me for being a complete novice at Grasshopper. I’m trying automate some of my work which includes measuring the lengths of line segments that represent structural components, but I need the algorithm to output the segment that starts closets to the z-plan and then move up vertically.

Currently the " length" component will output the lengths in a random order.

Hi @Reed,

you’re forgiven!!

But so the question is

do you want to sort your segments vertically based on Z value?


do you need to just sort the lengths ?

or both? or do you need the lengths to be sorted and also the segments to be sorted vertically?

Check this example (just note I am using polylines then exploding them into segments, which is what you might have been doing): (15.1 KB)


Thanks for your help @_corellaman! This is what I ended up designing for myself.

1 Like