Grasshopper

algorithmic modeling for Rhino

I am trying to use Split List to split a list into the last item and the remaining list, which can vary in length. Splitting into the first item and remainder is easy using for example index=1. But you cant seem to do it with negative numbers as you can do with any other of the list components.

Shouldn't index=-1 do exactly what I want. How come it doesn't work in this instance?

Is there another single component way of splitting a list into last item and remainder?

Views: 1495

Attachments:

Replies to This Discussion

Shouldn't index=-1 do exactly what I want.

Yep.

How come it doesn't work in this instance?

I was lazy. Or maybe forgetful. Probably both. When I added negative index support to various components I did not do it for Split List.

Hihi, okay, so you are human after all! ;)

Nice one, thanks!

if you wanted to avoid a custom script (and don't need the same code to handle negative / positive variably) this is a workaround requiring no extra components:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service