Grasshopper

algorithmic modeling for Rhino

Hi guys!!

I've a question and I hope you can help me...

I've two list; in the first list i've just one value and i want to find which is the closest value of the second list...

For example:

FIRST LIST: 15

SECOND LIST: 0, 6, 12, 18, 22, 60,150

Value found in second list in this case is 18 (i prefer to have the Higher value).

So, i've used "Find Similar Member"...but there is something wrong because if the number of the first list is containing the second list everything is ok; instead, if the value of the first list is NOT in the second list it NOT works!!!

Basically i want that every single values of the first list will be have a values contained and near the second list...

I attached 2 file to understand my problem!! 

any idea?!? 

thank you guys 

Views: 2734

Attachments:

Replies to This Discussion

I think that it's a question of matching data types.  Without the integer components ahead of the Similar Member component the input looks like strings so the output is different than if the input is numbers.  Whether or not it's a bug I can't say but this seems to be a working solution.

Thank you Chris,

with the integer it works!!

thank you for your help! :D

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