clipPolygon improved