Rhino3d.appserver to Speckle

Hi,

I’m trying to get a demo running using the appserver project to make results available to connect to a Speckle stream. I have the appserver running on Heroku and the compute on an EC2 instance which is working fine when using the browser.

I tried to modify the grasshopper definition (rnd_node.gh) within Grasshopper to add a speckle send step which i configured to my stream. If I trigger the send from within Grasshopper I successfully get the data into Speckle, but how can I submit parameters and specify the definition to the API and then get a response back which either passes directly to Speckle or gives me the data which I can take and then send it on to Speckle using some data integration tooling?

I thought by modifying the definition in grasshopper and then re-uploading that to the appserver in Heroku it would use the new definition, but it seems not.

Hopefully that makes sense…help would be appreciated as i’m on a tight deadline

thanks

1 Like

Of Rhino.Compute?

– Dale

@Matt_King how are you setting up Speckle in the gh definition? I believe you need to use the synchronous send and receive components. Maybe @alan2 can chime in since I believe he is the one that enabled this functionality.

Hi Luis,

This is the end of the flow viewing in Grasshopper. The Speckle integration does work when I trigger the send within Grasshopper, but I was hoping this would also work when the definition is triggered via the Rhino API but it doesnt seem to.

I’ve been using the GitHub - mcneel/compute.rhino3d.appserver: A node.js server for solving Grasshopper definitions on Rhino Compute deployment as the front end.

1 Like

Not sure if you are the same Matt as in this post on the Speckle Discourse, but @alan2 gives a good overview of how to go about this:

1 Like

Yes I was just replying to that actually. I’m not quite sure how to connect both RH_OUT:edges and RH_OUT:mesh to the Synchronous connector as it only seems to allow one data point whereas the auto sender lets me add multiple?

Sorry i’ve not used Grasshopper/Rhino at all until last week.

you can press shift while making connections to a gh component input so that multiple inputs remain connected.

That helped although I’m not sure if this is connected correctly still as I dont get anything into Speckle?

1 Like

I suspect that, if you’re running this definition in a different machine (EC2 instance for example), you’re surely going to get authentication errors if:

  • The user hasn’t been set on the machine
  • You haven’t specified a token to use as one of the inputs of your GH definition.

The latter is the most flexible approach. You just

  • create a new input for the authToken,
  • use Get Account From Token component (from Speckle) to verify the token and get the account
  • Use Get Stream component (from Speckle) to. authenticate a specific stream with the resulting account
  • Use the Get Stream output as the input stream of your Send component
1 Like