Write code to access the Rhino and Grasshopper SDKs through a stateless REST API running on Windows Servers. Use Compute to enhance any online solution you are developing to create and manipulate two and three-dimensional curves, surfaces, and solids. Install and customize Compute to run on any cloud services framework.
These samples show how to calculate various geometric operations with Rhino.Compute.
- C#
- SampleMakeAMesh - Creates a NURBS sphere and calls Rhino.Compute to mesh it.
- SampleCircleIntersection - Solves the intersection between two circles and saves the resul as an SVG.
- SampleBrepBooleanOperation - Solves various boolean operations and saves them as OBJ files.
- SampleNurbsTesselation - Creates a NurbsSurface, converts it to a Mesh (using different meshing parameters) and exports the results as OBJ files.
- JavaScript
- SampleBrepMesher - Calls compute to mesh a BREP.
- SampleBrepIsocurves - Loads a 3dm file containing the Rhino logo as a BREP, fetches the render mesh and wireframe and loads them into a three.js scene.
- SampleBrepBoolean - Loads a 3dm file containing the Rhino logo as a BREP and another set of breps then calculates the boolean difference between the Rhino logo and these.
- SampleClashDetection - Performs clash detection between a bunch of randomly positioned spheres and one main sphere.
- SampleGHCurveInput - Builds a curve with rhino3dm.js and uses it as the input to a GH definition.
- SampleGHDelaunayMesh - Generates random points and meshes them with the Delaunay component in Grasshopper.
- SampleGHExtrusions - Passes the input from three sliders to a Grasshopper defintion which offsets faces from a mesh and smooths it with SubD components.
- Python
- SampleTkinter - This sample uses rhino3dm to create a brep from a sphere and then sends it to Compute to generate a mesh. The resulting mesh is visualised with Python's built-in Tkinter GUI framework.