Hi, this is a fairly basic python question but I’m trying to get my code to select all of the curves stored in a list and I’m getting this error message: “Message: iteration over non-sequence of type Guid”
Here’s the part of the code that’s not working. Any ideas?
def treePath(curve):
divisions = rs.DivideCurveLength(curve, 10)
for pt in divisions:
rs.AddPoint(pt)
baseRadius = random.uniform(1,3)
x = pt[0]
y = pt[1]
z = random.uniform(.2,3)
pt2 = [x,y,z]
radius = random.uniform(.1,.10)
treeList = []
circle = rs.AddCircle(pt2, radius)
baseCircle = rs.AddCircle(pt, baseRadius)
treeList.append(circle)
treeList.append(baseCircle)
rs.AddLoftSrf(treeList)
def mainTwo():
#add tree path lines
treeLineList = []
treeLine1 = rs.AddLine((5,30,0),(90,30,0))
treeLine2 = rs.AddLine((5,60,0),(90,60,0))
treeLine3 = rs.AddLine((5,90,0),(90,90,0))
treeLineList.append(treeLine1)
treeLineList.append(treeLine2)
treeLineList.append(treeLine3)
for i in range(len(treeLineList)):
myCurves2 = treeLineList[i]
for curve in myCurves2:
treePath(curve)
mainTwo()