Grasshopper

algorithmic modeling for Rhino

Hi guys,

I would like to create a GH component that collects some geometry and sends it to a "outside" python script for further processing. How would one go about doing that?

Thanks,

Christian

Views: 374

Replies to This Discussion

I know my question was a little undefined, sorry about that. But it is basicly what I want to do. I have geometry object in Rhino/GH that I what to modify/do operations on. Operations which I need scipy and numpy for.
So what you are saying is that as long as I import rhinocommon.dll into my .py file I can just pass data between the file and a GH component? This works both ways?

Hi Christian, depending on your problem, you might also be able to exchange Numpy/Scipy for Math.Net, which can be implemented in Rhino/GH 64 bit using VB/C#/IronPython pretty easily (as compared to the nightware of implementing Numpy/Scipy in IronPython!). As far as I know you cannot use RhinoCommon types outside of a Rhino instance (don't quote me on that though), so if you do go with exporting to a Python program outside of Rhino/GH, you'll need to write some conversion functionality to pass data between the two programs. As far as "sending" the data, the most straightforward forward method would be to write to a text/csv file. Although there are generic Python methods for a more "live" link as well if this is a requirement. Hope that helps.

Edit: Tom already covered a few these points ;)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service