Grasshopper

algorithmic modeling for Rhino

Combine similar numbers of a list into separate branches ?

Hi guys,

 

I have a list of numbers and some of them share a certain similarity, I would like to group these ones into separate branches so the list would look like N=1, N=2 (similar numbers), N=1, N=1...

 

I hope it makes sense, Anyone knows how to do that?

 

Many thanks,

 

Arthur

 

 

Views: 1820

Replies to This Discussion

Hi Arthur,

 

The Set components might work for you, see attached

 

Attachments:

Hi Danny,

 

Thank you SO much once more for your help. Getting quite desperate with this issue.

Is the Set Component getting rid of similar values in a list? My problem is that some values are close to one another but not equal. Is this technique working with unequal values?

 

 

 

 

try the round function (it works even with zero decimals), then the set components:

 

Guys,

Thanks a lot to both of you! It works perfectly, really grateful. 

I used this technique to sort a tricky list of points:

 

 

 

 

C

Combine similar numbers of a list into separate branches

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service