ela1995 Posted July 25, 2021 Share Posted July 25, 2021 I have a certain amount of points on a line, I scatter few points around the line. I use pcfind to find the closet points from the scattered points on line. Now I want to connect each selected point on the line to their corresponding closet point. Can someone help me with that. Thanks in advanced. connect points.hip Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 25, 2021 Share Posted July 25, 2021 Hi Doanh, this is how you could do it: int pt_near = nearpoint(1, v@P); vector pos = point(1, 'P', pt_near); int pt_add = addpoint(0, pos); addprim(0, 'polyline', i@ptnum, pt_add); connect_points.hiplc 1 Quote Link to comment Share on other sites More sharing options...
Rival Consoles Posted February 4, 2022 Share Posted February 4, 2022 Hi @konstantin magnus, That definition is amazing!! Thank you for sharing the knowledge, much appreciated. Cheers 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.