PythonPrimer Greville Example

Hey! I am just finishing the RhinoPythonPrimer, however I am stuck with one of the last examples of the Greville SurfaceFit… I always get the error message: ´generator´object is not subscriptable

I googled a bit, but I could´t find the error in the code… Can someone help me further here?

The script is on page 105 of the RhinoPythonPrimer
I attached my script…

Best wishes, Rudi (3.0 KB)

Hi Rudolf, you may try changing the code in line 21 from this:

srfNormals = (rs.SurfaceNormal(idSrf, grev) for grev in uvGreville)

to this:

srfNormals = [rs.SurfaceNormal(idSrf, grev) for grev in uvGreville]

Any better ?


Hey! Thanks a lot, that fixed it!

Have a great day,