implicit-0.4.1.0: A math-inspired programmatic 2D & 3D CAD system.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.Implicit.Export.Render.GetLoops

Synopsis

Documentation

getLoops :: Eq a => [[a]] -> Maybe [[[a]]] Source #

The goal of getLoops is to extract loops from a list of segments. The input is a list of segments. The output a list of loops, where each loop is a list of segments, which each piece representing a "side".

For example: Given points [[1,2],[5,1],[2,3,4,5], ... ] notice that there is a loop 1,2,3,4,5... repeat But we give the output [ [ [1,2], [2,3,4,5], [5,1] ], ... ] so that we have the loop, and also knowledge of how the list is built (the "sides" of it).