Divide ClosedPolyline in rectangles

Dear All
I am trying to make an algorithm that divides a closed polyline (only 90 degrees angles) into several closed rectangular areas, is there any algorithm or reference that can help me on that? Like a “random voxelization”, I don`t know. Thanks for reading.

1 Like