Project lithography has experienced the development of contact, stepper, and step and scan lithography machine. Currently lithography machine has entered the age of twinscan lithography machine. The twinscan lithography machine took advantages of high efficiency and good compatibility, but the focal depth of twinscan lithography machine was only in the nanometer range. In order to guarantee the quality of the exposure, the twinscan lithography machine put forward high request for detecting the map of the wafer surface. Usually, the uniform sampling method and the whole map rebuilding method were used to detect the map of the silicon wafer surface, which is a main cause for the data redundancy. On the other hand, the map reconstructed by this means was not smooth which caused the motor of lithography machine can't response. To avoid these disadvantages, an algorithm for restoring the wafer surface based on B-spline surface reconstruction is proposed in this paper. This method is able to satisfy requirements for the local adaptive refinement, which effectively avoid data redundancy. This method is robust, which means the effect of solving nonlinear problems and inhibiting fuzzy noise is remarkable. The surface reconstructed by this new method is very smooth, which is more suitable for the movement of the motor in lithography machine.