Setup RhinoCompute local

Hi All,

I need some help in setting up my first test project to run on RhinoCompute local. The webpage explaining this seems outdated and i don’t fully understand.

I succeeded in downloading the RhinoCompute files from github and running the server in debug mode in VS studio.
i’m also succeeding in creating a .net project as mentioned on webpage and adding the rhinocompute.cs file to my project.
When the project starts it starts the local webserver but i get this Exception:

image

Were you following this tutorial? I didn’t write that specific guide, but I did just follow the instructions and got most of the way there :). However, one thing that I found that wasn’t working was in the RhinoCompute.cs file that I downloaded from the main compute.rhino3d repo. This file was setting the URL for the rhino.compute server as https://compute.rhino3d.com (which is currently turned off). Instead, I replaced these lines to point it to a local instance of rhino.compute running at http://localhost:6500. Now, that means you have to start your own rhino.compute server that’s specifically running on that port… But, that should be the default one that gets spun up if you run rhino.compute from source… or if you’ve got Hops installed and start Grasshopper, a local instance of the server will get started on that port as well. So, as long as you’ve got at least one instance of that running, then the console app should send it’s requests to that server.

I’ve attached a sample project (see below) of the working version of the example posted in the guide above. I added a couple of console messages to tell you exactly what’s happening in the code while it’s running. But, ultimately, it should save a .svg file in TestCompute\TestCompute\bin\Debug\net6.0\circle_intersection.svg and it should look something like this.

circle_intersection

TestCompute.zip (11.0 MB)

Hey Andy,
Thank you for your answer. I’m going to try soon again.
Ill let you know if im succesfull.

Thanks!

Hi Andy,

Today I’m trying the by you referred tutorial again. This is the same i mentioned in my first post.
Problems I encounter are:
step 3 and 8 have a mismatch .
When starting a .net framework project you wont get a hello Rhinocommon solution.

When installing from NuGet rhino3dmIO.desktop it says that it is deprecated. Is this ok?

I missed these remarks:

Line Description
5 Include the Rhino.Compute Assembly from the RhinoCompute.cs Package.
13 All calls to the Compute Server must be accompanied by a token. At this time your email is correct token to use. This is sent with each RhinoCompute.cs Posts.

Also to run locally you have to change the webadress from “https://compute.rhino3d.com” to “http://localhost:8081

This time I succeeded in running the server locally and getting results from it.

Thanks for you help!

Kind regards Reinder

Hello,

I am trying to call the compute_rhino3d.Brep in python but it responds “the server is turned off”.
I changed the compute_rhino3d.Util.url = "http://localhost:6500/, and recieved error 500.
the post then goes to address “POST /rhino/geometry/brep/createpatch-geometrybasearray_surface_double”, which I don’t know if it is correct or not.

I tried it with both direct compute.sln run in visual studio, and hops.

I don’t know if it is needed to use a token of authentication on a local device. I tried both with and without tokens but had no success. I was using it last year and it was working well. Please, let me know what should I do to fix the problem. Thanks in advance.

Bets regards

Hey Saleh,

I think maybe sending Andy a mail would be a good idea. I dont have much experience yet with the rhino compute software.

regards Reinder

When you said you tried with Hops… can you be more specific? Can you tell me what version of Hops you’re using? After installing Hops, can you go to Grasshopper Preferences → Solver and then uncheck the “Hide Rhino.Compute Console Window” and then restart your Rhino/Grasshopper? Can you then take a screenshot of the Rhino.Compute console window the next time you start Grasshopper (which will automatically start an instance of Rhino.Compute and it will show up in your taskbar). Thanks.