Steps / vector misplacement

Hello,

I want to place some steps to connect a number of ledges that are aligned on various heights. My definition works when connecting individual ledges, but I can’t make it work for all of them at once.
The vectors get assembled by the last ledge and the steps are misplaced.

Any idea how I can short the data to get the right result ?

Thnx

STAIRS ON LEDGE.gh (16.9 KB)

Looks like a basic data tree problem…It is recommended that you do not do flatten before checking the structure of the data tree.
My fixes are in the red groups…

STAIRS ON LEDGE_re.gh (23.8 KB)

Thanks for the fix Kim.
Very elegant solution, shortest list and attention is what I should have used from the beginning.

Hello,

The script is getting mixed up when I insert small values.
It misplaces the the steps in relation to the ledges.

In my example the number of steps /ledge is 3,4,5.
In the end they are placed by 5,3,4.

Any idea how I can correct that ?

STAIRS ON LEDGE-03.gh (13.5 KB)

Seems like join can’t indentify the order of the input lines, thus yield wrong ordered joined steps.
It seem like join messing up the order in both R5 & R6, so, I can hardly say its a known bug or buggy behavior…
Separating pair of input lines before join should do the trick.

STAIRS ON LEDGE-03_re.gh (18.1 KB)

Thanks a lot Kim, it actually does the trick.