Software for the simulation of X-ray powder diffraction (XRPD) patterns for ultrafine-grained materials with some kinds of imperfections has been developed. These calculations are performed on the base of the model of one-dimensionally disordered (1D-disordered) crystal . Such a model can describe stacking faults (SF) and other planar defects (PD) and also finite size of coherently scattering domains. Simulated XRPD pattern is compared with experimental one and can be fitted to it. Potentialities of the software are illustrated by several examples.