Grasshopper

algorithmic modeling for Rhino

does anyone know where I can find the component to extract the first and the end item of a list?

Views: 6500

Replies to This Discussion

You can use List Item, to select the first just use List Item with 0 as setting, and for the last item, use a combination of List length component and List Item, input List Length - 1 in the setting of List Item, and this should do the trick.

If you enable Wrapping on the input (w=true), you can also use -1 as the index to find the last component.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I usually use list item 0 for both.  To get the first, just use list item, with index 0.  To get the last, copy the same component, but this time 'reverse' the input to 'L'

thanks Luis I also do the same, but can't read propertly a definition that I made using that component, the script is broken because i used that.

Have you never used that called first -end list item ?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service