Grasshopper

algorithmic modeling for Rhino

Hi all,

I have a set of points and I would like to search through a point cloud and find the closest point to each of the original points. Then I would like to have a logic which basically looks at the distance between the closest point and the original point and if it is larger than a certain amount, it would just return the original point; if it is smaller, then it would  return the closest point it had found.


Now the logic below works well for this purpose. However, sometimes the point cloud is empty, that is the branches are there but nothing in them. So the closest point would be a "null" item. In such as case I would like to return the original point as well (just like the larger case).

Now I use the larger/smaller components to test the values and then cull the original points list and the closest point list to get the final set (which I then join using merge).

However, when it comes to the null items I'm having difficulties. I've tried all combination of boolean components but didn't get the desire effect.

Any advice?

Regards,

Ali

Views: 2035

Replies to This Discussion

Here you go!

Attachments:

This looks great. Thanks for your help.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service