When Hartmann-Shack sensor was assembled with lens array and CCD, the assembly error was produced inevitably. It would greatly reduce the precision of the wavefront measurement. Two types of assembly error of Hartmann-Shack sensor were analyzed and emendation matrix was obtained in this paper. The assembly error would be eliminated with corresponding matrix. The relationship of the relative reconstruction error to the assemble error was obtained by using Monte-Carlo relative reconstruction error simulation technology which provides theoretical basis and specification for assembling of Hartmann-Shack sensor.