generative modeling for Rhino
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).
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.