Currently I’m working in several tools that share a common code base, and one of the core algorithm of such tools is the procedure to extract closed contour loops from a set of arbitrary oriented and intersecting hand drawn strokes.
This tools are work in progress and more on alpha stages but progressing very well. I show you the internal debug information from the algorithm output.