algorithmic modeling for Rhino
HI
I am having a problem with the GHpython code below that reports the following error :
Runtime error (TypeErrorException): iteration over non-sequence of type PolyCurve, and points out to the line where yield stands
def littlestars():
for i in [ i for i in range(len(median)) if i%2 ==0 ]:
yield rs.MoveObject((ghcomp.Polygon(median[i], radius, sides, 0)[0]), -vect[i])
little = littlestars()
the problem appearently is with the rs.MoveObject, which according to some advices should be expecting a string or a GUID, while what I've done here through the GHPython component is to feed it directly with inplace made polygons through
gh.polygon command
any suggestion on how to tweek the argument to pass to the moveobject in a way that it returns its GUID instead is welcome
as by, I hope someone could help me find another way of creating polygons directly through the rhinocommon or rhinoscript syntax, in a way that doesn't call a ghcomponent, and is still being a short algorithm
thanks
Tags:
there it is, thank u
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by