Introduction
3DM is the native file of Rhino, the NURBS modelling program from Robert McNeel & Associates, used in industrial, jewellery, marine and architectural design. A model holds exact curves, surfaces and solids (polysurfaces), meshes, points, annotations, layers, materials, named views and block definitions.
Unlike most program formats, 3DM is open to anyone: McNeel publishes openNURBS, a free toolkit that reads and writes it, so other programs can open Rhino models without Rhino.
Structure
A 3DM file is binary. It starts with a 32-byte text header beginning
3D Geometry File Format and ending with the file version number. A series
of chunks follows, each with a type code and a length, so a reader can skip what it
does not understand. They hold notes about the file and the program that wrote it,
the model settings, then tables of materials, layers, block definitions, objects and
the model’s other parts, and finally an end mark.
Each version of Rhino writes a new file version (1 to 4, then 50, 60, 70, 80), and openNURBS can read all of them and write recent ones. From version 50 the chunk lengths are eight bytes instead of four. All numbers are little-endian.
In this reference
- File layout and chunks – the header, archive versions, chunk headers, CRCs, the tables in order, object records, class chunks and the end mark
- Typecodes – every chunk typecode openNURBS defines, from the flag bits to the legacy codes of Rhino 1
Not described
These pages follow the openNURBS source that McNeel publishes. The explorer has no 3DM viewer, so a dropped file shows as bytes.
Known, not yet covered
- Reference: the data layout of each openNURBS class (
ON_NurbsCurve::Writeand the hundreds of others), each versioned on its own; the page points to the source. - Reference: the bit layout of the packed (version 6 and later) openNURBS version number,
and whether
ON_CRC32is the zlib CRC-32. - Viewer: there is no 3DM plugin.
Unknown
- Reference: the use of
TCODE_ENDOFFILE_GOO(0x7FFE), which is defined but not described, and the order of the records in the properties and settings tables. - Reference: the expansions of legacy names (ASM, PRT, SHL and others), which are inferred and marked as such.