Abstract:The surface shape of the train shaft is irregular after hot forge, and the shaft body may deform during the cooling process, which poses challenges and difficulties for the positioning of the axis point in the primary turnery process. The existing methods, such as two-point method, optical projection method, rotation axis method, etc., or only consider the center and local surface, ignoring the deformation of the axis and the irregular shape of the surface, have problems such as low efficiency, inability to manufacture, and large product loss and so on. This paper proposes a marking method for the optimal manufacturing of train axle in primary turnery to address the problems, which in existing methods. Firstly, obtaining a 3D point cloud of the axle by a scanner. Then, the point cloud is successively transformed into another coordinate system, cut into discrete slices, and calculated to getting the initial machining axis. Next, the spatial margin distribution of the product machining computer aided design (CAD) model in the axle point cloud is analyzed. Simultaneously, the gradient descent optimization strategy is used to adjust the machining axis position. Finally, the optimal marking point for rail axle to processing optimal manufacturing is calculated, and then marked on the axle by the laser marking machine. This method is implemented using the mixed encoding of C++and point cloud library (PCL), and has been validated on site by China railway rolling stock corporation (CRRC) for up to a month, and data statistics show an accuracy of over 98%, with an efficiency improvement of 3~6 times compared to the operator. This method improves the production efficiency of the primary turnery process for rail axles, reduces the scrap rate in the production process, and ensures the margin adequacy and rotational balance during the turning process.