Script to connect points together to a curve?

 From:  bemfarmer
6445.1 
Are there any comments about making a script to connect together a bunch of points, input by say an IGES file.
Assuming that the points were grouped in a few different, separated, "curves," order is not known, and the points are to be connected by
a "nearest neighbor" algorithm? It would be like automating the freeform control point or through point curves.

- Brian