Grasshopper

algorithmic modeling for Rhino

Hi guys,

 

Very simple question:

What is the best way to remove the last item of a list (an extra control point for example)?

 

many thanks,

 

Arthur

Views: 26350

Replies to This Discussion

Maybe a reduce list component ?
Hi, I would suggest this..
with a little preference for the VB component..
raf
Attachments:
Another is a reverse - shift 1 - reverse combo.
Or just use a shift component and set to -1.

Make sure wrap is set to False in the latest versions of GH as the defaults have changed since this reply was written

Another option is too make a sublist with the domain = list length - 1

I realize I'm 6 years late to the party but as a learner myself I understand these threads don't disappear so readily and are searchable for a long time so I just wanted to add my two cents by saying that "cull index" is another option and has helped me out in cases when "shift" isn't suitable. So to remove last item, input list length into cull index - probably. =)

Yup, when this discussion started that component didn't exist yet, but these days the best way to remove the last item is to use Cull Index with index = -1.

Oh that sounds good.

I usually flipped the list to remove the first item and then flipped the list back to normal :-)

Hey, I have made a really simple cluster because I need to remove last item pretty often, maybe you can use it

called it deL - delist last

Attachments:

existe  Alguna Manera de Contar Cuantas r se encuentran En Esta Lista, Yo he  estado Tratando de Contar Cuantosnúmeros 1 hallo  En Una Serie de números del uno al 30.la idea es caber cuantas veces se repite cada numero y que grasshopper me de la suma de cada cantidad  pero no lo he logrado. 

alguien que me ayude por favor muchas gracias

Attachments:

Whenever I want to use this method, I merely write self.ClearLists() and it deletes every element in a list.

Thanks , -

3D Architectural Animation Company

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service