Add operator< for Segment (lexicographic sort). Try to check whether a file to open actually exists: have to improve it. Split polygons according to a line: I was fed up degenerate cases, so line is shift when going through edge or vertex.