I think I find a solution without manually setting the point type. I start a loop for setting point type before the loop for add spline mesh component.