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.
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.
Reference Rhino 6 nuget package for Rhino3dmIO (for Windows, Mac, iOS, or Android)
Include the RhinoCompute.cs source file downloaded from compute.rhino3d.com in their project
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
Add using Rhino.Compute; at the top of a source file
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.
@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.
i’m game. 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…
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?
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)
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?