Can anyone help me with the way I typed this:
myQuad = rs.AddPolyline([a[(i,j)], a[(i+1,j)], a[(i+1,j+1)], a[(i,j+1)], a[(i,j)]])
it comes up with expected index value, got tuple
see screen shot, won’t run
Thanks, Mike
Can anyone help me with the way I typed this:
myQuad = rs.AddPolyline([a[(i,j)], a[(i+1,j)], a[(i+1,j+1)], a[(i,j+1)], a[(i,j)]])
it comes up with expected index value, got tuple
see screen shot, won’t run
Thanks, Mike
I figured it out!
Thank anyway
Mike
Hey, what’s the solution? I’m running the same tutorial and can’t figure out why I’m not getting the polylines!
Hello,
I think you need something like i*numV +j
instead of (I,j)
i just figured it out too. if anybody else is doing this Mode Lab tutorial and finds this, it’s because he opens a script that’s slightly different from the previous video’s version but doesn’t mention two important changes:
it changes from a = [ ] to a = { }
the previous script ends with a.append(myPoint) but in the new script that line is changed to a[(i,j)] = myPoint
Epic fail!
another solution is
for i in range(numU+1):
aa=[]
for j in range(numV+1):
get new point
aa.append(newpoint)
a.append(aa)
for
for
myQuad=rs.AddPolyline(a[i][j],a[i+1][j]....)
cells.append