Grasshopper

algorithmic modeling for Rhino

Thanks to Steve and Giulio, a new version (0.6.0.3) of the ghPython scripting component for Grasshopper is available on food4Rhino

Major new features:.

  • Node-in-Code: almost every Grasshopper component is now callable in ghPython

  • Multi-threading: now easy for ghPython scripts to execute on multiple threads

Download here...

Views: 5692

Replies to This Discussion

Would be great to see an example of the node-in-code functionality :)

顶,up

Nice.  Will the Node-in-Code feature also be available from the C# or VB.NET script components?

Yeah, but not for GH1. It turned out to be relatively easy to code this up, but there are some hacks involved that ought to be fixed in Grasshopper core (one of the biggest ones is that you cannot solve a component that isn't part of a document, so now we have to create a document first, add the component to it, populate the inputs, solve it and then perform cleanup). Another problem is the loose naming conventions for GH1 components, quite a few of them have the same name, and a lot of them don't have very self-documenting names if taken out of tab+panel context.

The idea is for Grasshopper 2 to have a lazily created class which is a thin wrapper around the component library, that way VB, C# and python can all use the same plumbing for this.

And before anyone asks; No, we have no plans to make it work the other way.

--

David Rutten

david@mcneel.com

Great news! I also would love to see some examples for the new functionality.

Any documentation on that "node in code" feature?

I'm putting together an article about how this works and will hopefully have something in a day or two, but for starters I posted a very simple example of node-in-code over here

http://discourse.mcneel.com/t/new-ghpython-with-node-in-code-and-mu...

Oops, that link was wrong. Here's the right one

http://discourse.mcneel.com/t/new-ghpython-with-node-in-code-and-mu...

Great, thanks guys!

Hi. 

I am having big problems with installation of this new version. 

I am not sure where to address the problem, but I am trying here.

It should be fairly simple - replace the old ghPython.gha file and restart. When I do this the component shows up in the panel but it does complain a bit when I put it on the canvas. 

My old Python scripts does not work anymore with 0.6.0.3 and the sample files does not work either.

I have a few screenshots:

And the last one is with a clean canvas and the use of the new ghPython component.

The GHPython call seems a bit different than the one in the samples:

Any ideas?

I love this new function by the way :) - When I can use it...

Hi Rasmus

sorry to hear about this issue. Let's have a look and try to fix it!

I think the main issue is the one with Rhino.PlugIn.Find(guid). That method is necessary for the add-on to deliver the ghpythonlib library. This means that, right now, you are not getting access to ghpythonlib, the Python module that provides access to all Grasshopper components.

This issue is especially worrying, because it means that your computer is using an extremely old RhinoCommon.dll file. I would recommend to reinstall Rhino5 to make sure that the correct version of RhinoCommon.dll is present. Did you, by any chance, change something with RhinoCommon? Which version of Rhino 5 do you have? SR6 is required.

Last thing: could you please send me a file that does not load correctly? You can just send it to my email address.

Thanks

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Hi Giulio.

Sadly my company IT dep. is taking pretty long to install Rhino 64 bit, I am using 32 bit right now. And now that I check, I only SR3 :) Maybe that is why. I will try to get this updated and then get back to you. 

The file that I made my self earlier, that does not load with the new version, also needs some external Excel files, so maybe we can do that, if the update does not work.

Thanks.

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