GetRectangles now optimized to usual cases