Optimization of a five-axis tool path taking into account machine kinematics