I meet with a strange demand. As the picture shows, the points are the corner-point of the offset result of the base curve. Now I get rid of the point in the right-bottom corner and want to connect them seriously to a polyline(like green sketch show). While those points cannot be sort correctly either by inner sort battery with ghpythonlib.components.SortPoints() or SortPointList method in rhinoscriptsyntax. I wonder if there is any other way to sort these points. Can someone help me solve this problem😭?
Hello, I’m sorry to come back to ask questions after the problem is solved. I slightly change the form of the baseline and it does not sort correctly with the same method. I am confusing since there are no essential differences between the two forms. So I post the file here and hope that you can help me to find out the reason.
The seam (i.e. where the start and end points connect) of your closed curve is different. Causing the parameter space along the curve to perhaps be different than you expect. You can “solve” this be changing where the seam lies on the curve on like so (also note that you have duplicate points in your input list):
Though I suspect a different logic is perhaps better all together here: If your input curve is always a polyline, it’s probably better to instead identify vertices/corners you want to connect along (i.e. instead of closest points on a curve).