How to get the intersection between two splines?

I am trying to get intersections between two splines.I convert the splines to tube then use vtktrianglefilter and then get the intersection with vtkintersectionpolydatafilter. I want to get intersection points respectively (from first to last). But sometimes their order is not right.