Hello,
I have many closed curves with these kind of indent that I would like to remove/smooth it out. Is there a way to do it automatically in grasshopper without manually removing the vertex in Rhino? Maybe something based on distances and angles?
Exactly what does “smooth it out” mean? You’ll have more luck avoiding these “indents” in the first place rather than dealing with them after the fact.
Unfortunately, Kinky Curve cannot create periodic curves, and Discontinuity recognizes endpoints as discontinuities. So, in order to recognize if a cusp exists at the start/endpoint, the curve has to be extended to overlap itself at that point and endpoints need to be culled from the discontinuity assessment.
This all makes the script loses its brevity and it the definition needs to be called recursively just as Laurents cluster. So just use his.