Here’s the script from above with @Dancergraham’s snippet added and it works:

```
import Rhino.Geometry as rg
def find_closest_points(start_point, point_cloud, max_recs=float("inf"), _depth=0, _path=[]):
"""Recursively searches a point cloud for consecutive closest points.
Args:
test_point: A point to search from.
point_cloud: A point cloud to search.
max_recs: An optional maximum number of recursions.
_depth: A current recursion depth.
_path: A current nested list of point pairs.
Returns:
The nested list of consecutive point pairs.
"""
if point_cloud.Count > 0:
pt_cloud = point_cloud.Duplicate()
closest_idx = pt_cloud.ClosestPoint(start_point)
closest_pt = rg.Point3d(pt_cloud[closest_idx].X,
pt_cloud[closest_idx].Y,
pt_cloud[closest_idx].Z)
_path.append([start_point, closest_pt])
pt_cloud.RemoveAt(closest_idx)
if point_cloud.Count > 0 and _depth < max_recs:
_depth +=1
return find_closest_points(closest_pt, pt_cloud, max_recs, _depth, _path)
return _path
# Get the start point
start_pt = Points[iStartPoint]
# Create the point cloud
attractor_pts = rg.PointCloud(Points)
# Get the consecutive point pairs
pairs = find_closest_points(start_pt, attractor_pts)
print pairs
# NEW!!!
# Create linear connections
connections = [rg.LineCurve(a, b) for a, b in pairs if a != b]
# Outputs
a = connections
# NEW!!!
```