Grasshopper

algorithmic modeling for Rhino

Cull all items from a list if they are contained in a second?

Hey!

I have 2 lists containing lines (not the same order, differently generated) and would like to cull all items of List A if any of these is contained in a second List B.

Is there a solution to this problem specifically?

Thanks!

Views: 784

Replies to This Discussion

you want to cull all the list a if any of items happen to be exist in list b, or do you want to remove the duplicates? you can write an expression to achieve them, expression "contains" checks the existance of an item in a list, and expression "if" can be used for creating conditional results. if you could be more clear or add your files to your post, i can look your definition and help. (i guess :) )

Hi Ibrahim! I did not want to remove the duplicates (I know there is a function for it),

I wanted to remove all items that are the same as in the second list. 

I managed it due to http://www.grasshopper3d.com/forum/topics/removing-not-duplicated-l... 

Someones VB Script.

But your solution seems interesting since it seems simpler :) 

Something along if contains anyitemsfromlist B in a cull function?

my shift hours are over now, and i need to leave the office. tomorrow i'm gonna post it, maybe that can help you in future :) 

tesekkür ederim, if you should find the time tomorrow :)

you're welcome =) this is an alternative quick solution, using kangaroo's removeduplicatecurves. that was not the solution that i was thinking yesterday, but if you will understand the basic logic, you can derive lots of alternative ways. =) let me know if you'll need any further assistance on this issue. 

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service