Hi. Although I'm not new to grasshopper but I am to the VB.NET component/scripting. I am taking an intro class right now in VB but it's very different than what I saw in the LIFT Primer! I am really hoping that you can help me out.. I feel like what I am looking to do is very easy (I don't think it's doable with just GH though? If I'm wrong please tell me !!!)
The specific situation is I have a field of say 20 points randomly assorted. For each point, I want to find its nearest point (through drawing a vector to each point and calculating the minimum?) and then draw a line between the two. The way I have been doing this has been to make a separate GH function for each point while shifting the list of items 1 per function, but when I have over 20, over 100! items this becomes extremely tedious (to say the least..)
Thank you very much for any help you can give.. If you need any more information or a sample file please let me know.
Thanks
Nick
EDIT: What I'm actually looking to do at this point, because I've already gone through manually and done all 115 of these with their unique functions is find the SECOND nearest point. In making an individual GH function per point it means creating a vector to each point, sorting the results, extracting the second solution, making a line of that vector. I am thinking that whether it is the first closest or second closest point wouldn't make that much of a difference within the script... I hope I am right, because I have a feeling I need to do this many different times!!