Grasshopper

algorithmic modeling for Rhino

I have a PH definition in grasshopper. The Python definition is all right, While in the output of the PH, there is erra: 1. Data conversion failed from Goo to Geometry. Does anyone know how to solve the problem? Any help is appreciated.

Views: 11499

Attachments:

Replies to This Discussion

Hi Elena,

In python, this means you are probably supplying nested lists or tuples - in your case appending "Line" list to "a" list. Just append your geometry to a single list, and it will work.

So for my understand, it  means the output of PH Grasshopper could not be a list inside a list? Like [[line1,line2],[line3,line4]]. 

It can only be [line1,line2,line3,line4]

That is correct.
Work around would be to create a data tree, and add each of your individual lists to a single branch of that tree.

Attachments:

Wow, live saving, two years later, thanks, djordje.

The way to "flatten" my list is to use a Python for loop to individually append each item to my container list variable.


I really wish the Grasshopper message wasn't about a Goo, but said "Ouch, I want a list, not a list of lists!"

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