As an optical grating , if we think a 2D lattice structure, then I thin Bragg's formula can not be used directly. May be I am wrong. I think in this way because in Bragg's formula "d" I'd there is the distance between the
two nearest parallel diffracting planes. So how can I think over diffraction of X-RAY from a perfect 2 D lattice? Is it the Laue condition to be considered ? Please clarify the query.