RT_SD Posted June 30 Share Posted June 30 (edited) Hi. I've got a bunch of polylines generated from intersecting spheres using the intersectionanaylsis SOP. They're ellipses but the point order is bad. How can I sort the points in order around each ellipse? I tried fuse, add, join, resample, connectadjacentpieces, find shortest path, even asked chatGPT, but nothing seems to work (delete prims, fuse, connect adjacent, find shortest path gets the best result but only for half the curve and only by manual start/end selection). Its seems you should be able to walk arround the path using point proximity as a guide somehow, but I don't know how to do it in vex. Any ideas? Polyline sorting.hiplc Edited June 30 by RT_SD Added HIP file Quote Link to comment Share on other sites More sharing options...
Librarian Posted June 30 Share Posted June 30 @RT_SD post that file Please Quote Link to comment Share on other sites More sharing options...
RT_SD Posted June 30 Author Share Posted June 30 4 minutes ago, Librarian said: @RT_SD post that file Please Done! Quote Link to comment Share on other sites More sharing options...
RT_SD Posted June 30 Author Share Posted June 30 (edited) Cconceptually would this work? : Start at point 0. Findt the nearest point (except itself), and create a polyline between it and the nearest one, add theses two points to an array. Repeat starting from the last added point to the array, and excluding all other points in it. Set ptnum to the array order. Edited June 30 by RT_SD Quote Link to comment Share on other sites More sharing options...
dleonhardt Posted June 30 Share Posted June 30 (edited) You can use the PolyPath SOP to make a single open polygon with the correct vertex order out of the Intersection Analysis output, because Intersection Analysis doesn't output a single continuous polyline. After that you can use a Sort SOP set to "Point Sort: By Vertex Order" to transfer the correct order to the points. Edited June 30 by dleonhardt 1 1 Quote Link to comment Share on other sites More sharing options...
RT_SD Posted June 30 Author Share Posted June 30 2 hours ago, dleonhardt said: You can use the PolyPath SOP to make a single open polygon with the correct vertex order out of the Intersection Analysis output, because Intersection Analysis doesn't output a single continuous polyline. After that you can use a Sort SOP set to "Point Sort: By Vertex Order" to transfer the correct order to the points. Yep that did it, 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.