Two-dimensional diffraction by structures with corners