Grasshopper

algorithmic modeling for Rhino

Hi,

When I am using attached Koch curve recursion script in Rhino via EditPythonScript it works.

But when I use it in grasshopper I get following error:

1. Solution exception:unsupported operand type(s) for -: 'DataTree[object]' and 'int'

If I pass 1 line for the recursion function (gh python) it works , but as long as it gets to the second iteration with 4 curves it results in error. 

I have attached both .py and .gh below.

How to solve this datatree error?

Thank you,

Petras

Views: 394

Attachments:

Replies to This Discussion

Petras,

Your input 'number' is set to a 'tree access' but you're only expecting a single integer. Changing it to 'item access' is what your script is currently expecting. I'm assuming this because even your function splitLines() is expecting a single integer, not a data tree.

Did you want to export your recursive curves as a data tree or as a single list?

Thank you.

i am having same problem. If it is possible could you share your solution ?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service