N-sided hole filling algorithm is an foundation problem in computer-aided geometric design, which is widely used in vertex transition and complex chamfering. This paper proposes a n-sided hole filling algorithm based on generalized non-uniform rational B-splines (GNURBS). Given a quadrilateral mesh with knot intervals, GNURBS can define a set of basis functions with globally G1
continuous. The new algorithm includes two main steps. Firstly, the n-sided hole is divides into a complete quadrilateral mesh, which can be used to define corresponding GNURBS basis functions, and then the position and weight of control points are computed according to the boundary continuity constraints and energy optimization methods. The new algorithm is compatible with non-uniform rational B-splines (NURBS), which can be directly applied to computer-aided design (CAD) software, and can be seamlessly transferred between CAD software packages without any loss. The algorithm was tested for different number of edges and the results were compared with CATIA filled surfaces. The experimental results show that the new algorithm can construct smoother and more natural n-sided hole filling surfaces, with better surface quality than the algorithm results of CATIA.