Finding corners in a curved closed polyline

It took me a long time to realize that each of your “many small kinks” has two ~90 degree angles!!

corners_2020May13a2

When I finally figured that out, I culled duplicate points with a tolerance value of 1, high enough to average the two discontinuity points at each kink into a single point, then rebuilt the closed polyline.

At that point, the code in the white group worked as expected. It was quite baffling that it didn’t work on the original polyline. Very tricky. :cry:


corners_2020May13a.gh (17.2 KB)

3 Likes