Polygon Detection (Bentley-Ottmann)

Hi! I need to generate polygons from the intersection of lines and I wonder if there’s already any addon implementing Bentley-Ottmann algorithm or any similar solution. If found ofxSweepLine but looks incomplete. Any idea?

Thanks