Grasshopper

algorithmic modeling for Rhino

remove consecutive duplicate values/maintain order

hello

searching for method to delete consecutive duplicate values from a list whilst maintaining list order, and also allowing duplicate values to appear again within the same list.

ie

5, 6, 7, 7, 8, 4, 3, 7, 7, 7, 8

would need to be

5, 6, 7, 8, 4, 3, 7, 8

ideas?

current workaround (kangaroo dupPt component) removes all duplicates from list, tho does maintain order. 

thx

Views: 901

Replies to This Discussion

The "delete consecutive" component does exactly what you're asking for. 

thank you andrew. 

not sure how i missed this.

detective's curse i suppose.

cheers

Maybe this?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service