Read, write and create Rhino 3D models (.3dm files) in Python, JavaScript and .NET.
rhino3dm brings openNURBS, the library behind Rhino's file format, to Python, JavaScript and .NET with RhinoCommon's API.
- Create, inspect and edit every geometry type Rhino supports: points, point clouds, NURBS curves and surfaces, polysurfaces (B-Reps), meshes, SubDs, extrusions and annotations
- Work with the rest of a model: layers, materials, object attributes, transforms, views
- Read and write all of it to and from
.3dmfiles - Send geometry to Rhino.Compute for operations that need Rhino
- Runs on Windows, macOS and Linux, and in the browser
In 9.2 the Python and JavaScript libraries are generated from RhinoCommon, so their API is RhinoCommon's in every language: the same class names, member names, signatures and behaviour, and the RhinoCommon documentation applies to all three. Most 8.x Python and JavaScript scripts need changes; .NET code mostly does not.
- Migrating to rhino3dm 9.2: what changed for each language
- CHANGELOG
9.2 is a pre-release. The default install is still the latest 8.x; install the beta as shown below.
pip install rhino3dm # latest stable (8.x)
pip install --pre rhino3dm # 9.2 beta
Wheels for CPython 3.10 to 3.14 on Windows, macOS and Linux.
import rhino3dm as r
model = r.File3dm()
model.Objects.AddSphere(r.Sphere(r.Point3d(1, 2, 3), 12))
model.Write("sphere.3dm", 8)rhino3dm.py documentation · API reference · PyPI · Samples
npm install rhino3dm # latest stable (8.x)
npm install rhino3dm@next # 9.2 beta
rhino3dm.js is compiled to WebAssembly and runs in every current browser and in Node.js 22+. In a browser you can load it from a CDN without installing anything.
import rhino3dm from 'rhino3dm'
const rhino = await rhino3dm()
const model = new rhino.File3dm()
model.objects.addSphere(new rhino.Sphere({ X: 1, Y: 2, Z: 3 }, 12))
const bytes = model.toByteArray()For three.js there is a 3dm loader built on rhino3dm.js.
rhino3dm.js documentation · API reference · npm · Samples
dotnet add package Rhino3dm # latest stable (8.x)
dotnet add package Rhino3dm --prerelease # 9.2 beta
Rhino3dm (formerly Rhino3dmIO) is built from RhinoCommon's own source. One NuGet package carries the native libraries for Windows, macOS and Linux.
using Rhino.FileIO;
using Rhino.Geometry;
var model = new File3dm();
model.Objects.AddSphere(new Sphere(new Point3d(1, 2, 3), 12));
model.Write("sphere.3dm", 8);Rhino3dm documentation · RhinoCommon API reference · NuGet · Samples
See the build guides for Python, JavaScript and .NET, and CONTRIBUTING.