cut_spline by hajikola
_