The generation of discrete elements into certain domain is the first step of DEM simulation. Geometric constructive methods are becoming increasingly popular because of their high efficiency, but the tangency problem between the generated particles and the boundaries has not been well solved yet. In this paper, the complete algorithm to achieve the boundary tangency is developed. Several packings are created to evaluate the applicability of the algorithm. It shows that the generated particles are closely tangent to the boundaries, forming a dense and stable assembly. Through the uniaxial and the Brazilian tests, the particle assemblies generated by this algorithm are verified to be able to recover the mechanical behavior of rocks. Furthermore, it is verified that the stress and deformation around the borehole can be accurately simulated by using this particle model.