changed self hits from lines with rectangles to polygons