sadhu Posted January 5, 2012 Share Posted January 5, 2012 (edited) Hello friends, 1) I have scattered points on the grid. 2) Select any random point (startpt group) to begin with, rest of the points will be in availablepts group . 3) Find startpt's nearest neighbour and connect them using add sop. 4) Select this point (nearest neighbour)and find it's nearest neighbour out of (availablepts - startpt ) group. and so on till you connect all the points to from a curve. Please refer the attached file. I think the problem lies in the delet nodes in the foreach sop and availablepts. Can someone please tell what is the problem with this setup? Thanks a lot for your time sop_nearest_neighbour_connect.hipnc Edited January 5, 2012 by sorry Quote Link to comment Share on other sites More sharing options...
michaelw Posted January 6, 2012 Share Posted January 6, 2012 (edited) This might be one solution. Cheers, sop_nearest_neighbour_connect_mw.hipnc Edited January 6, 2012 by michaelw Quote Link to comment Share on other sites More sharing options...
michaelw Posted January 6, 2012 Share Posted January 6, 2012 Another solution with Python. sop_nearest_neighbour_connect_mw2.hipnc Quote Link to comment Share on other sites More sharing options...
sadhu Posted January 6, 2012 Author Share Posted January 6, 2012 (edited) Hi Mike. Thanks a lot for your help. It took me a long time to figure out where I was going wrong. The main part was reusing the available points. Without your help it would have been very difficult for me to figure out the solution. Attached is the file with the necessary changes in the first post. sop_nearest_neighbour_connect_done.hipnc Edited January 6, 2012 by sorry Quote Link to comment Share on other sites More sharing options...
michaelw Posted January 6, 2012 Share Posted January 6, 2012 My pleasure Hi Mike. Thanks a lot for your help. It took me a long time to figure out where I was going wrong. The main part was reusing the available points. Without your help it would have been very difficult for me to figure out the solution. Attached is the file with the necessary changes in the first post. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.