Grasshopper

algorithmic modeling for Rhino

Hi all,

I got stuck in simply calling the method ProjectToBrep within ghPython.
It asks for an IEnumerable and not a list. There are a couple of threads which raise this issue:
http://discourse.mcneel.com/t/issue-with-ienumerable-geometrybase/7936
http://www.grasshopper3d.com/forum/topics/python-longer-version-of-...

But unfortunately I haven't found the right method to convert a list into an IEnumerable within python. I also realized that you don't need to do that with C#, so if you could highlight me on this it would be great.

Attached you will find my attempts with both ghpython and a C# component.

Thanks in advance,

Paul

Views: 495

Attachments:

Replies to This Discussion

You have to convert the Python List into an Array.

The function also demands the breps to be IEnumerable if the Curves are.


And the Vector had a small error.

Attachments:

Thanks Jan, it solved it!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service