Every chunk in a 3DM file starts with a 32-bit typecode. openNURBS builds each one from
flag bits, which say what family the chunk belongs to and how it is stored, and a number
within that family. This page lists every typecode defined in openNURBS’s
opennurbs_3dm.h, by its name there, with its full value. How chunks are
laid out is on File layout and chunks.
Flag bits
| Bit value | Name | Meaning |
|---|---|---|
| 0x80000000 | TCODE_SHORT | short chunk: the value is the data and no body follows |
| 0x40000000 | TCODE_USER | user and plug-in data, and general-purpose chunks |
| 0x20000000 | TCODE_TABLEREC | a record inside a table |
| 0x10000000 | TCODE_TABLE | a table |
| 0x08000000 | TCODE_TOLERANCE | tolerances (version 1) |
| 0x02000000 | TCODE_INTERFACE | interface items: views, names, and parts of records |
| 0x00800000 | TCODE_RENDER | rendering (version 1) |
| 0x00400000 | TCODE_DISPLAY | display settings and layers (version 1) |
| 0x00200000 | TCODE_ANNOTATION | annotation (version 1) |
| 0x00100000 | TCODE_GEOMETRY | geometry (version 1) |
| 0x00020000 | TCODE_OPENNURBS_OBJECT | openNURBS object and class chunks |
| 0x00010000 | TCODE_LEGACY_GEOMETRY | legacy geometry (version 1) |
| 0x00008000 | TCODE_CRC | the body ends with a CRC (a CRC-32 from version 2) |
A value is TCODE_SHORT when its top hex digit is 8 or more. The families
marked version 1 belong to Rhino 1 files; openNURBS still reads them but no longer
writes them.
Start and end of file
| Typecode | Name | Meaning |
|---|---|---|
| 0x00000001 | TCODE_COMMENTBLOCK | the start section, at offset 32: text ended by ^Z |
| 0x00007FFF | TCODE_ENDOFFILE | the end mark: the file length |
| 0x00007FFE | TCODE_ENDOFFILE_GOO | defined beside the end mark; the header does not describe its use |
| 0xFFFFFFFF | TCODE_ENDOFTABLE | ends every table; short, value 0 |
Tables
Listed by value; in a file they appear in the order given on File layout and chunks.
| Typecode | Name | Holds |
|---|---|---|
| 0x10000010 | TCODE_MATERIAL_TABLE | materials |
| 0x10000011 | TCODE_LAYER_TABLE | layers |
| 0x10000012 | TCODE_LIGHT_TABLE | lights |
| 0x10000013 | TCODE_OBJECT_TABLE | geometry and annotation |
| 0x10000014 | TCODE_PROPERTIES_TABLE | model properties: revision history, notes, preview image |
| 0x10000015 | TCODE_SETTINGS_TABLE | file settings: units, tolerances, views |
| 0x10000016 | TCODE_BITMAP_TABLE | embedded bitmaps |
| 0x10000017 | TCODE_USER_TABLE | a plug-in’s table |
| 0x10000018 | TCODE_GROUP_TABLE | groups |
| 0x10000019 | TCODE_FONT_TABLE | text styles (fonts) |
| 0x10000020 | TCODE_DIMSTYLE_TABLE | dimension styles |
| 0x10000021 | TCODE_INSTANCE_DEFINITION_TABLE | block definitions |
| 0x10000022 | TCODE_HATCHPATTERN_TABLE | hatch patterns |
| 0x10000023 | TCODE_LINETYPE_TABLE | linetypes |
| 0x10000024 | TCODE_OBSOLETE_LAYERSET_TABLE | layer sets; obsolete |
| 0x10000025 | TCODE_TEXTURE_MAPPING_TABLE | texture mappings |
| 0x10000026 | TCODE_HISTORYRECORD_TABLE | construction history |
Properties records
| Typecode | Name | Holds |
|---|---|---|
| 0x20008021 | TCODE_PROPERTIES_REVISIONHISTORY | who created and last edited the model, and when; the revision count |
| 0x20008022 | TCODE_PROPERTIES_NOTES | the model’s notes |
| 0x20008023 | TCODE_PROPERTIES_PREVIEWIMAGE | a preview image, uncompressed |
| 0x20008024 | TCODE_PROPERTIES_APPLICATION | the application that wrote the file: name, web address, details |
| 0x20008025 | TCODE_PROPERTIES_COMPRESSED_PREVIEWIMAGE | a preview image, compressed |
| 0xA0000026 | TCODE_PROPERTIES_OPENNURBS_VERSION | short: the version of openNURBS that wrote the file |
| 0x20008027 | TCODE_PROPERTIES_AS_FILE_NAME | the file name the model was saved as |
Settings records
| Typecode | Name | Holds |
|---|---|---|
| 0x20008031 | TCODE_SETTINGS_UNITSANDTOLS | units and tolerances |
| 0x20008032 | TCODE_SETTINGS_RENDERMESH | settings for render meshes |
| 0x20008033 | TCODE_SETTINGS_ANALYSISMESH | settings for analysis meshes |
| 0x20008034 | TCODE_SETTINGS_ANNOTATION | annotation settings |
| 0x20008035 | TCODE_SETTINGS_NAMED_CPLANE_LIST | named construction planes |
| 0x20008036 | TCODE_SETTINGS_NAMED_VIEW_LIST | named views, as view records |
| 0x20008037 | TCODE_SETTINGS_VIEW_LIST | the model’s views, as view records |
| 0xA0000038 | TCODE_SETTINGS_CURRENT_LAYER_INDEX | short: the current layer |
| 0x20008039 | TCODE_SETTINGS_CURRENT_MATERIAL_INDEX | the current material |
| 0x2000803A | TCODE_SETTINGS_CURRENT_COLOR | the current colour |
| 0xA000003C | TCODE_SETTINGS_CURRENT_WIRE_DENSITY | short: the current wireframe density |
| 0x2000803D | TCODE_SETTINGS_RENDER | render settings |
| 0x2000803E | TCODE_SETTINGS__NEVER__USE__THIS | reserved; never to be used |
| 0x2000803F | TCODE_SETTINGS_GRID_DEFAULTS | grid defaults |
| 0x20008131 | TCODE_SETTINGS_MODEL_URL | the model’s web address |
| 0xA0000132 | TCODE_SETTINGS_CURRENT_FONT_INDEX | short: the current text style |
| 0xA0000133 | TCODE_SETTINGS_CURRENT_DIMSTYLE_INDEX | short: the current dimension style |
| 0x20008134 | TCODE_SETTINGS_ATTRIBUTES | further settings attributes |
| 0x20008135 | TCODE_SETTINGS_PLUGINLIST | the plug-ins that wrote data into the file |
| 0x20008136 | TCODE_SETTINGS_RENDER_USERDATA | user data for the render settings |
View records
A TCODE_VIEW_RECORD holds the chunks after it, each describing one part
of a view.
| Typecode | Name | Holds |
|---|---|---|
| 0x2000803B | TCODE_VIEW_RECORD | one view |
| 0x2000813B | TCODE_VIEW_CPLANE | its construction plane |
| 0x2000823B | TCODE_VIEW_VIEWPORT | its viewport: camera and projection |
| 0xA000033B | TCODE_VIEW_SHOWCONGRID | short: show the construction grid |
| 0xA000043B | TCODE_VIEW_SHOWCONAXES | short: show the construction plane axes |
| 0xA000053B | TCODE_VIEW_SHOWWORLDAXES | short: show the world axes |
| 0x2000863B | TCODE_VIEW_TRACEIMAGE | a trace image |
| 0x2000873B | TCODE_VIEW_WALLPAPER | a wallpaper image |
| 0x2000874B | TCODE_VIEW_WALLPAPER_V3 | a wallpaper image, Rhino 3 form |
| 0x2000883B | TCODE_VIEW_TARGET | the target point |
| 0xA000093B | TCODE_VIEW_V3_DISPLAYMODE | short: display mode, Rhino 3 form |
| 0x20008A3B | TCODE_VIEW_NAME | the view’s name |
| 0x20008B3B | TCODE_VIEW_POSITION | the window position |
| 0x20008C3B | TCODE_VIEW_ATTRIBUTES | further view attributes |
| 0x20008D3B | TCODE_VIEW_VIEWPORT_USERDATA | user data for the viewport |
Table records
| Typecode | Name | Holds |
|---|---|---|
| 0x20008040 | TCODE_MATERIAL_RECORD | a material |
| 0x20008050 | TCODE_LAYER_RECORD | a layer (ON_Layer) |
| 0x20008060 | TCODE_LIGHT_RECORD | a light |
| 0x02008061 | TCODE_LIGHT_RECORD_ATTRIBUTES | the light’s attributes |
| 0x02000062 | TCODE_LIGHT_RECORD_ATTRIBUTES_USERDATA | user data on those attributes |
| 0x8200006F | TCODE_LIGHT_RECORD_END | short: ends a light record |
| 0x20008070 | TCODE_OBJECT_RECORD | an object |
| 0x82000071 | TCODE_OBJECT_RECORD_TYPE | short: the object type |
| 0x02008072 | TCODE_OBJECT_RECORD_ATTRIBUTES | the object’s attributes |
| 0x02000073 | TCODE_OBJECT_RECORD_ATTRIBUTES_USERDATA | user data on those attributes |
| 0x02008074 | TCODE_OBJECT_RECORD_HISTORY | the object’s construction history |
| 0x02008075 | TCODE_OBJECT_RECORD_HISTORY_HEADER | its header |
| 0x02008076 | TCODE_OBJECT_RECORD_HISTORY_DATA | its data |
| 0x8200007F | TCODE_OBJECT_RECORD_END | short: ends an object record |
| 0x20008073 | TCODE_GROUP_RECORD | a group |
| 0x20008074 | TCODE_FONT_RECORD | a text style |
| 0x20008075 | TCODE_DIMSTYLE_RECORD | a dimension style |
| 0x20008076 | TCODE_INSTANCE_DEFINITION_RECORD | a block definition |
| 0x20008077 | TCODE_HATCHPATTERN_RECORD | a hatch pattern |
| 0x20008078 | TCODE_LINETYPE_RECORD | a linetype |
| 0x20008079 | TCODE_OBSOLETE_LAYERSET_RECORD | a layer set; obsolete |
| 0x2000807A | TCODE_TEXTURE_MAPPING_RECORD | a texture mapping |
| 0x2000807B | TCODE_HISTORYRECORD_RECORD | a history record |
| 0x20008080 | TCODE_USER_TABLE_UUID | the plug-in id of a user table |
| 0x20000081 | TCODE_USER_RECORD | a plug-in’s data |
| 0x20008082 | TCODE_USER_TABLE_RECORD_HEADER | the user table record header, inside the uuid chunk |
| 0x20008090 | TCODE_BITMAP_RECORD | a bitmap |
Class and object chunks
| Typecode | Name | Holds |
|---|---|---|
| 0x00027FFA | TCODE_OPENNURBS_CLASS | an openNURBS object |
| 0x0002FFFB | TCODE_OPENNURBS_CLASS_UUID | its class id |
| 0x0002FFFC | TCODE_OPENNURBS_CLASS_DATA | its data |
| 0x00027FFD | TCODE_OPENNURBS_CLASS_USERDATA | user data attached to it |
| 0x0002FFF9 | TCODE_OPENNURBS_CLASS_USERDATA_HEADER | the header of that user data |
| 0x80027FFF | TCODE_OPENNURBS_CLASS_END | short: ends the class chunk |
| 0x00028100 | TCODE_OPENNURBS_BUFFER | an ON_Buffer, a block of bytes |
| 0x00020008 | TCODE_RHINOIO_OBJECT_NURBS_CURVE | old: a NURBS curve written by the earlier Rhino I/O toolkit |
| 0x00020009 | TCODE_RHINOIO_OBJECT_NURBS_SURFACE | old: a NURBS surface, likewise |
| 0x0002000B | TCODE_RHINOIO_OBJECT_BREP | old: a brep, likewise |
| 0x0002FFFE | TCODE_RHINOIO_OBJECT_DATA | obsolete: object data |
| 0x0002FFFF | TCODE_RHINOIO_OBJECT_END | obsolete: object end |
User and general chunks
| Typecode | Name | Holds |
|---|---|---|
| 0x40000001 | TCODE_XDATA | extra data |
| 0x40008000 | TCODE_ANONYMOUS_CHUNK | a plug-in’s data, or any chunk that needs no name of its own |
| 0x40008001 | TCODE_UTF8_STRING_CHUNK | a UTF-8 string |
| 0x40008002 | TCODE_MODEL_ATTRIBUTES_CHUNK | model attributes |
| 0x40008010 | TCODE_DICTIONARY | a dictionary |
| 0x40008011 | TCODE_DICTIONARY_ID | its id |
| 0x40008012 | TCODE_DICTIONARY_ENTRY | one entry |
| 0xC0000013 | TCODE_DICTIONARY_END | short: ends the dictionary |
Legacy codes (version 1)
These belong to Rhino 1 files and other early writers. Rhino 1 stored its geometry in the legacy geometry chunks; their short names appear to stand for assembly, part, shell, face, boundary, trim, surface, curve, spline and point, though the header does not spell them out.
Legacy geometry
| Typecode | Name | Typecode | Name |
|---|---|---|---|
| 0x00010001 | TCODE_LEGACY_ASM | 0x00010101 | TCODE_LEGACY_ASMSTUFF |
| 0x00010002 | TCODE_LEGACY_PRT | 0x00010102 | TCODE_LEGACY_PRTSTUFF |
| 0x00010003 | TCODE_LEGACY_SHL | 0x00010103 | TCODE_LEGACY_SHLSTUFF |
| 0x00010004 | TCODE_LEGACY_FAC | 0x00010104 | TCODE_LEGACY_FACSTUFF |
| 0x00010005 | TCODE_LEGACY_BND | 0x00010105 | TCODE_LEGACY_BNDSTUFF |
| 0x00010006 | TCODE_LEGACY_TRM | 0x00010106 | TCODE_LEGACY_TRMSTUFF |
| 0x00010007 | TCODE_LEGACY_SRF | 0x00010107 | TCODE_LEGACY_SRFSTUFF |
| 0x00010008 | TCODE_LEGACY_CRV | 0x00010108 | TCODE_LEGACY_CRVSTUFF |
| 0x00010009 | TCODE_LEGACY_SPL | 0x00010109 | TCODE_LEGACY_SPLSTUFF |
| 0x0001000A | TCODE_LEGACY_PNT | 0x0001010A | TCODE_LEGACY_PNTSTUFF |
The …STUFF codes add TCODE_STUFF (0x0100) to
the code beside them.
Geometry, rendering, annotation and tolerance
| Typecode | Name | Holds |
|---|---|---|
| 0x00100001 | TCODE_RH_POINT | a point |
| 0x00100011 | TCODE_OLD_RH_TRIMESH | a triangle mesh, old form |
| 0x00100012 | TCODE_OLD_MESH_VERTEX_NORMALS | mesh vertex normals, old form |
| 0x00100013 | TCODE_OLD_MESH_UV | mesh texture coordinates, old form |
| 0x00100014 | TCODE_OLD_FULLMESH | a full mesh, old form |
| 0x00100015 | TCODE_MESH_OBJECT | a mesh |
| 0x00100017 | TCODE_COMPRESSED_MESH_GEOMETRY | compressed mesh geometry |
| 0x00100018 | TCODE_ANALYSIS_MESH | an analysis mesh |
| 0x00800001 | TCODE_RH_SPOTLIGHT | a spotlight |
| 0x00200001 | TCODE_ANNOTATION_SETTINGS | annotation settings |
| 0x00200004 | TCODE_TEXT_BLOCK | a text block |
| 0x00200005 | TCODE_ANNOTATION_LEADER | a leader |
| 0x00200006 | TCODE_LINEAR_DIMENSION | a linear dimension |
| 0x00200007 | TCODE_ANGULAR_DIMENSION | an angular dimension |
| 0x00200008 | TCODE_RADIAL_DIMENSION | a radial dimension |
| 0x08000001 | TCODE_LEGACY_TOL_FIT | the fitting tolerance |
| 0x08000002 | TCODE_LEGACY_TOL_ANGLE | the angle tolerance |
Interface
| Typecode | Name | Holds |
|---|---|---|
| 0x02000001 | TCODE_NAME | a name |
| 0x02000002 | TCODE_VIEW | a view |
| 0x02000003 | TCODE_CPLANE | a construction plane |
| 0x02000004 | TCODE_NAMED_CPLANE | a named construction plane |
| 0x02000005 | TCODE_NAMED_VIEW | a named view |
| 0x02000006 | TCODE_VIEWPORT | a viewport |
| 0x82000007 | TCODE_SHOWGRID | short: show the grid |
| 0x82000008 | TCODE_SHOWGRIDAXES | short: show the grid axes |
| 0x82000009 | TCODE_SHOWWORLDAXES | short: show the world axes |
| 0x0200000A | TCODE_VIEWPORT_POSITION | a viewport’s position |
| 0x0200000B | TCODE_VIEWPORT_TRACEINFO | a viewport’s trace image |
| 0x0200000C | TCODE_SNAPSIZE | the snap size |
| 0x0200000D | TCODE_NEAR_CLIP_PLANE | the near clipping plane |
| 0x0200000E | TCODE_HIDE_TRACE | hide the trace image |
| 0x0200000F | TCODE_NOTES | notes |
| 0x02000010 | TCODE_UNIT_AND_TOLERANCES | units and tolerances |
| 0x82000011 | TCODE_MAXIMIZED_VIEWPORT | short: the maximised viewport |
| 0x02000012 | TCODE_VIEWPORT_WALLPAPER | a viewport’s wallpaper |
| 0x02000013 | TCODE_SUMMARY | the file summary |
| 0x02000014 | TCODE_BITMAPPREVIEW | a preview bitmap |
| 0x82000015 | TCODE_VIEWPORT_V1_DISPLAYMODE | short: a viewport’s display mode |
Display and layers
| Typecode | Name | Holds |
|---|---|---|
| 0x90000001 | TCODE_LAYERTABLE | short: the old layer table; obsolete |
| 0xA0000001 | TCODE_LAYERREF | short: a reference to a layer |
| 0x80400001 | TCODE_RGB | short: a colour |
| 0x00400002 | TCODE_TEXTUREMAP | a texture map |
| 0x00400003 | TCODE_BUMPMAP | a bump map |
| 0x80400004 | TCODE_TRANSPARENCY | short: transparency |
| 0x80400005 | TCODE_DISP_AM_RESOLUTION | short: display resolution |
| 0x80400006 | TCODE_RGBDISPLAY | short: the display colour, for colour by object |
| 0x00400007 | TCODE_RENDER_MATERIAL_ID | the id of a render material |
| 0x00400010 | TCODE_LAYER | a layer |
| 0x00400011 | TCODE_LAYERNAME | a layer’s name |
| 0x80400012 | TCODE_LAYERVISIBLE | short: layer visible |
| 0x80400013 | TCODE_LAYER_OBSELETE_1 | short: obsolete |
| 0x80400014 | TCODE_LAYER_OBSELETE_2 | short: obsolete |
| 0x80400015 | TCODE_LAYER_OBSELETE_3 | short: obsolete |
| 0x80400016 | TCODE_LAYERON | short: layer on |
| 0x80400017 | TCODE_LAYERTHAWED | short: layer thawed |
| 0x80400018 | TCODE_LAYERLOCKED | short: layer locked |
| 0x00400020 | TCODE_RENDERMESHPARAMS | render mesh parameters |
| 0x80400022 | TCODE_DISP_CPLINES | short: construction plane lines |
| 0x00400023 | TCODE_DISP_MAXLENGTH | display maximum length |
| 0x80400025 | TCODE_CURRENTLAYER | short: the current layer |
| 0x80400030 | TCODE_LAYERPICKABLE | short: layer can be picked |
| 0x80400031 | TCODE_LAYERSNAPABLE | short: layer can be snapped to |
| 0x80400032 | TCODE_LAYERRENDERABLE | short: layer is rendered |
| 0x80400033 | TCODE_LAYERSTATE | short: layer state, used in place of the separate on, thawed and locked codes |
| 0x80400034 | TCODE_LAYERINDEX | short: a layer index |
| 0x80400035 | TCODE_LAYERMATERIALINDEX | short: a layer’s material index |
Comments in openNURBS mark the three TCODE_LAYER_OBSELETE_… codes
(spelt that way) as obsolete and say some of the separate layer toggles were used
only by AccuModel.