import rhinoscriptsyntax as rs a = [ ] curve1 = curve for curve2 in curve: if (curve1 != curve2): c1 = rs.CurveAreaCentroid(curve1) c2 = rs.CurveAreaCentroid(curve2) pt1 = c1 pt2 = c2 dist = rs.Distance(pt1,pt2) SortL = sorted(dist, key = float)
Hello,I was trying to calculate the distance between the center points of curves. After I get all the distance between points, I tried to sort the list, but looks like I can’t run sorting in a iteration?
Any idea how to fix it?
Python_test.gh (17.7 KB)