This study proposes a method to adapt the geometry of the toolpath to a specified target. In the case study presented, the geometrical target is to remove a constant thickness on the rough workpiece. This case is normally present in the polishing of the femoral component of knee prostheses. In fact, an operator carries out these operations manually. The aim of this study is to contribute to the automation of prosthesis production, notably, in the preparation of surface polishing. The proposed method can deform and adapt a toolpath to ensure the required geometry of the machined surface. The proposed toolpath deformation method is composed of three steps: alignment, toolpath deformation, and toolpath smoothing. Alignment between the measured surface of the roughcast prostheses and the nominal toolpath is carried out by an Iterative Closest Point (ICP) algorithm. The principle of this algorithm is to find the optimal rigid transformation to readjust the toolpath on the measured surface. Subsequently , the toolpath is deformed to remove the constant thickness of the roughcast prostheses. Next, to increase the machined quality, a smoothing stage is carried out on the obtained toolpath. Experimental tests on industrial prosthe-ses geometry are conducted to validate the effectiveness of this method.