maybe instead of creating all the internal loops.... just find the vector direction, that's is created from the intersections..... the problem with this is how to tell the vector to turn.
That [the turn] is the hard part.....
So, if we can simple generate those internal loops.... none graphical ... grab those points, connect them [not to hard].... I think would work.
That was my approach to the solution, but a year ago I did not have the programing skill to make it happen. I think today I may have a chance at it.
My thought was to go from vertex to vertex around the closed pline.
Working with 3 vertex at a time, find the bisecting angle to create an imaginary line for the center vertex.
Then move to the next vertex & get that bisecting angle & line, continue till all are in a list.
The process this list, finding all the intersect point of lines that are next to each other.
Ignore lines that are not from an adjacent vertex.
Then looking at the lines next to each other pick the intersect point that produces the shortest distance from the original vertex.
Remove any point in the list that produces a too long condition.
Then from the new list of points bisect the angle of the new line intersects which would give you the ridge lines.
Extend the new ridge lines out until they intersect with an adjoining original bisect line.
Well it's getting complicated at this point and that was my though a year ago.