I am using GeomAPI_PointsToBSpline to fit a set of 3D points into a Bspline curve. If I put the points into the TColgp_Array1OfPnt array in order (along the curve), a reasonable result was achieved as shown in Attachment1. However, if I change the order of the points a little by switching the originally last point to the second place in the array, the result went crazy (Attachment2). It feels that I was missing something obvious such as failed to set some parameters. I truly believe the fitting algorithm should not be related to the order in which the points were put into the array. If it is, I think it would be a bug.
Any suggestions will be appreciated.