Start here

The purpose of this category is for explaining what Rhino.Compute is and how it works.

Rhino.Compute is a Geometry Server

Rhino.Compute is a web server that provides and API for geometry calculations using Rhino’s geometry library. It is typically run as a headless server; meaning it has no user interface to interact with. This server can process incoming http requests to perform geometric computations and/or solve Grasshopper definitions and return a result as a http response.

Setting Up a Production Environment

Rhino.Compute can be configured to run locally for testing and development purposes. However, eventually as your project becomes more mature, you may want to deploy Rhino.Compute in a production environment. We recommend setting up Rhino.Compute on a Windows based VM or server running IIS. We have an entire guide for setting up this type of configuration, making the process as easy as possible. Please see Deployment to Production Servers for more information.

It Works With Other HTTP Clients

Any client capable of sending standard web requests can be used to work with Rhino.Compute since it is a server setup to communicate with standard HTTP calls. We have guides for calling Rhino.Compute with:

However, we have also dedicated resources to developing a client which can make calls to Rhino.Compute from Grasshopper. This is called Hops. Hops lets you create external Grasshopper functions which can be offloaded to Rhino.Compute for solving (either locally or on a remote compute resource). These functions can increase the legibility of your code by simplifying complex definitions while reducing duplication. To find out more see the following guides.

3 Likes

Ok, maybe I should add a few details…

It’s a Geometry Server

compute.rhino3d.com is a web server (or group of web servers) that provide an API for perfoming geometry calculations. The server is running Rhino in a non-user interface mode and makes a portion of the RhinoCommon .NET SDK available in a well defined pattern that matches the functions available in RhinoCommon.

It’s a client library

A big part of making compute.rhino3d.com useful is providing tools that can be used to call the server. Since the geometry server is using standard HTTP calls to communicate, any programming language could be used to work with the server.

The initial effort though is on a C# SDK which is available as a single C# source code file downloadable from the server. A developer should be able to do the following to get their application set up to use Compute by following the Compute Getting Started Guide.

  1. Reference Rhino 6 nuget package for Rhino3dmIO (for Windows, Mac, iOS, or Android)

  2. Reference JSON.Net nuget package

  3. Include the RhinoCompute.cs source file downloaded from compute.rhino3d.com in their project

  4. Set their API key by setting the Rhino.Compute.ComputeServer.AuthToken property. You can get an API key by visiting https://www.rhino3d.com/compute/login

  5. Add using Rhino.Compute; at the top of a source file

  6. Done… Now all of the compute.rhino3d.com functions are availale as static functions in the Rhino.Compute namespace and as extension methods on existing Rhino3dmIO classes. It should just feel like you are using all of the classes that you are used to using in Rhino3dmIO with the addition of functionality that was only available in the past by working inside of Rhino and RhinoCommon.

We do plan to make other client libraries available in the future if people find that they need access from languages like python, javascript, go, VB.NET, C++…

It’s a Work in Progress

This is very much the wild west early days of compute.rhino3d.com. Please give it a try and help us figure out where it should go.

6 Likes

@compute_rhino3d just pinging you to let you know about this private category you’ve been invited to. If this doesn’t interest you, please let me know. If it does interest you, please let me know.

3 Likes

i’m game. :beers: for the invite! would drop everything and make the compute server crash right now!!! I’ll try and make time for non-.net implementations, in between speckle, thesis and life…

4 posts were split to a new topic: Calling compute with curl

Excellent! Thank you for the invite!

Thanks for the invite, @stevebaer. I am going to give it a try.

Hey, thanks for the invite! Definitely interested. Will try to make some time for this.

Glad to be here! We have some things that we’ll be testing with this for sure!

Hi Steve - Just heard about this and very interested in the possibilities. Would love to try it out.

Trying to implement the Split method from a BrepFace. I could normally use the method on a BrepFace to split using a list of curves. How would I implement this from Compute.Rhino3d as I can’t call the API as a method from the face?

https://compute.rhino3d.com/Rhino/Geometry/BrepFace/Split

and perhaps also an example of using this

https://compute.rhino3d.com/Rhino/Geometry/Curve/Offset

Hi @Ben,

You probably won’t see this method working until we are farther along with Rhino 7. You can track this item here:

https://mcneel.myjetbrains.com/youtrack/issue/RH-40888

– Dale

hi @stevebaer, could you fix this link?

Which one do we need?

NewstonSoft.Json version

1 Like

You mean the one with almost a quarter billion downloads as opposed to the others with less than fifty thousand? :wink:

2 Likes

That link is down, 404 error.

Redirect to (I guess):

Hey,
Speaking of which, some reference seems outdated (or incomplete) when comparing list of +2400 API calls in the page Calling Compute with Python and the proper ReadTheDocs found in the compute-python repo. Perhaps I missed a page but I bet I can call all of the C# SDK in compute via python (but I’ve got to figure out the references)

Cheers

Hi, I’m sure everyone’s busy, but just wanted to check back in on a few bad links. Thanks!!

https://developer.rhino3d.com/guides/rhinocommon/compute/compute-getting-started/ - 404
http://compute.rhino3d.com/ - {
“message”: “This server has been turned off”,
“documentation_url”: “Rhino - Compute Guides
}

Hi! I have the same question for this- I’m trying to set up compute, but I get the same message regarding the server being turned off. Any updates on this?