Module rectangle_decomposition

Source
Expand description

Decompose rectilinear polygons into axis-aligned rectangles.

Functionsยง

decompose_maximal_rectangles
Decompose a set of manhattanized polygons into maximal rectangles. The polygons in form of an iterator over all the edges. A point is considered inside the polygon when the polygon wraps around it a non-zero number of times.
decompose_rectangles
Decompose a set of manhattanized polygons into non-overlapping horizontal rectangles. The polygons in form of an iterator over all the edges. A point is considered inside the polygon when the polygon wraps around it a non-zero number of times.
decompose_rectangles_vertical
Same as decompose_rectangles but create vertical slices. Rotate the edges before and after decomposition.