Grasshopper

algorithmic modeling for Rhino

Hello all,

We have perhaps a peculiar use case.

We want to be able to run a Grasshopper definition, then check to see if the artifacts, geometries and gh structures match what we are expecting using an external test suite.

We have a lot of parameters we want to test with, so doing so in Rhino is cumbersome.

To this end, we've experimenting to run Rhino/Grasshopper with a number of ways:

- 1) Using the COM interface, to create Rhino, load grasshopper then run tests

- 2) Exposing Rh/Gh internals using WCF via a Rhino command, which starts off WCF, then run tests

- 3) Exposing Rhino/Grasshopper internals using .Net remoting, again via a Rhino command

We've tried -1) that seems to be a dead end, limited access to Rh/Gh

We've tried -2) that works but raises an error in the WCF server stating that RhinoCommon is not available (see attached image). I've tried copying dll's from the Rhino installation to the running wcf directory, but that does not help.

Todo -3) We've still got to try this method.

I've googled similar entries in the forums:

http://www.grasshopper3d.com/forum/topics/how-can-i-use-grasshoper-...

http://developer.rhino3d.com/api/rhinoscript/introduction/external_...

Does anyone know why -2) wcf fails or if .net remoting will work successfully.

Or indeed if there are other options to address our use case?

Many thanks,

Milan

Views: 999

Attachments:

Replies to This Discussion

Thanks Tom for you interesting reply.

I'm certainly very hungry now, thinking of all that Pizza.

Although, I think your wrong about Robots and Pizzas, saw a Pizza making Robot that did an excellent job.

I think that I do have some licensing/environmental issues to deal with my rhinocommon ingredients. My WCF client/server works, but when I port in the Rhino/Grasshopper types and references, the WCF server app hiccups with error message in the initial posting.

Seems like the connection is still a bit doughy and under cooked and needs further work.

Any more hints?

You cannot run RhinoCommon.dll outside of Rhino.exe, is that what is happening here?

Since you have WCF set up, I'd recommend writing a GHA plugin for Grasshopper which does all the file loading/solving/data harvesting you need, and communicate with that plugin via WCF. As a plugin running inside GH you have access to the lowest level apis. You'd still have to start Rhino and run the _Grasshopper command remotely, but I think that can be done using command line arguments for Rhino.exe

Hello Milan,

I've managed to create a WCF/Grasshopper communication through a couple of custom made components, I plan to publish it in the near term once I've completely debugged it but we can already discuss. What do you want to do exactly? Change a GH Parameter from a remote program?

First thought : if you are hosting a WCF service inside Rhino/Grasshopper, you need to run Rhino as an Administrator. Otherwise WCF cannot register the http endpoint (if you are using http protocol) and you will never manage to communicate with your component.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service