对“LineCurve”类型的非序列进行迭代?

时间:2013-10-07 12:09:02

标签: python grasshopper

使用以下代码,我收到下面的错误消息,我无法使用documentation解析。

  • xinteger
  • lnLine
  • degreesfloat

这是代码

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)

我收到以下消息错误:

  

运行时错误(TypeErrorException):迭代LineCurve`类型的非序列

回溯:

line 1076, in TransformObjects, "C:\Users\**\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\object.py"
  line 947, in RotateObjects, "C:\Users\**\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\object.py"
  line 924, in RotateObject, "C:\Users\**\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\object.py"
  line 7, in script

1 个答案:

答案 0 :(得分:0)

Type Hint example

Bibhas就在这里。 RotateObject函数只接受guid。如果更改输入的类型提示,则它将按预期工作。 The output