import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import * #The inputs to this node will be stored as a list in the IN variables. dataEnteringNode = IN points = IN[0] pairs =[] ids = [] #Assign your output to the OUT variable. Result = [] for i in range(0, len(IN[0])): Xcurrent = round(points[i][0].X,3) Ycurrent = round(points[i][0].Y,3) Zcurrent = points[i][0].Z for k in range(0, len(IN[0])): if round(points[k][0].X, 3) == Xcurrent and round(points[k][0].Y, 3) == Ycurrent and points[k][0].Z != Zcurrent : pairs.append([ points[i][0], points[k][0] ]) ids.append([points[i][1], points[k][1]]) OUT[0] = pairs OUT[1] = ids