Grasshopper

algorithmic modeling for Rhino

Hi Guys,

These few lines worked in the old Python editor but not in the newest one and i cannot understand what is the issue:

import rhinoscriptsyntax as rs

a = []

for i in range(0, x + 1):

nl = rs.RotateObject(ln, rs.CurveEndPoint(ln), degrees * i, (0,0,1), True)
a.append(nl)

And this is the error that I get in the new editor:

Runtime error (TypeErrorException): range() integer end argument expected, got float.
Traceback:
line 5, in script

I hope you can help,

Many thanks,

Arthur

Views: 1402

Replies to This Discussion

Hi Arthur,

I cannot replicate the error. Seems to be working for me. My only guess is that you have assigned as a float instead of integer.

See you next week.

Ta,

M.

Attachments:

(right-click X, Type hint -> int)

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Thanks guys, stupid me.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service