In this paper, we deal with the method of grid generation. From the perspective of deformation mechanics, we propose a new method to generate grid with boundary constrain. Based on the stress balance equation on the node of the domain, the coordinate of the balance particle can be easily obtained by a very simple iteration method. Moreover, some discussions about the free parameters are conducted, and then an improvement version of the method is also proposed. Numerical results show the effectiveness and advantage of the method.