opennurbs_3dm.h
Go to the documentation of this file.
00001 /* $NoKeywords: $ */
00002 /*
00003 //
00004 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
00005 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
00006 // McNeel & Associates.
00007 //
00008 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
00009 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
00010 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
00011 //                              
00012 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
00013 //
00015 */
00016 
00017 #if !defined(OPENNURBS_THREEDM_INC_)
00018 #define OPENNURBS_THREEDM_INC_
00019 
00020 /* 3dm defines, structs and typedefs */
00021 
00022 /*  Typecode format 4 bytes long
00023 
00024    x xxxxxxxxxxxxxxx,x xxx xxxx xxxx x x xx
00025   | |               | |               | |  |
00026    |        |        |                 |
00027    |        |        |         |       +---  "stuff" bit
00028    |        |        |         |
00029    |        |        |         +-- specific codes
00030    |        |        |
00031    |        |        +-- RESERVED - DO NOT USE (should be 0) (will be used to control CRC on/off)
00032    |        |
00033    |        +-- category:_000 0000 0000 0001  Legacy geometry    TCODE_LEGACY_GEOMETRY
00034    |                     _000 0000 0000 0010  openNURBS object   TCODE_OPENNURBS_OBJECT
00035    |                     _000 0000 0000 0100  -- RESERVED - DO NOT USE (should be 0 in any typecode) -- 
00036    |                     _000 0000 0000 1000  -- RESERVED - DO NOT USE (should be 0 in any typecode) --                     
00037    |                     _000 0000 0001 0000  Geometry           TCODE_GEOMETRY
00038    |                     _000 0000 0010 0000  Annotation
00039    |                     _000 0000 0100 0000  Display Attributes TCODE_DISPLAY
00040    |                     _000 0000 1000 0000  Rendering          TCODE_RENDER     
00041    |                     _000 0001 0000 0000                         
00042    |                     _000 0010 0000 0000  Interface          TCODE_INTERFACE 
00043    |                     _000 0100 0000 0000  -- RESERVED - DO NOT USE (should be 0 in any typecode) --
00044    |                     _000 1000 0000 0000  Tolerances         TCODE_TOLERANCE
00045    |                     _001 0000 0000 0000  Tables             TCODE_TABLE    
00046    |                     _010 0000 0000 0000  Table record       TCODE_TABLEREC
00047    |                     _100 0000 0000 0000  User information   TCODE_USER
00048    | 
00049    +-- format: 0 - data size in header  - data block follows    TCODE_SHORT
00050                1 - data in header - no data block follows
00051 
00052 */
00053 
00054 
00055 /*
00056 // The TCODE_COMMENTBLOCK is the first chunk in the file, starts 32 bytes into
00057 // the file, and contains text information terminated with a ^Z.  This ^Z and
00058 // contents of this chunk were expanded in February 2000.  Files written with
00059 // code released earlier than this will not have the ^Z.
00060 //
00061 // The TCODE_ENDOFFILE is the last chunk in the file and the first 4 bytes
00062 // of information in this chunk is an integer that contains the file length.
00063 // This chunk was added in February 2000 and files written with code released
00064 // earlier than this will not have this termination block.
00065 */
00066 #define TCODE_COMMENTBLOCK        0x00000001
00067 #define TCODE_ENDOFFILE           0x00007FFF
00068 #define TCODE_ENDOFFILE_GOO       0x00007FFE /*
00069                                              // this typecode is returned when
00070                                              // a rogue eof marker is found
00071                                              // Some v1 3dm file writers put
00072                                              // these markers in a "goo". 
00073                                              // Simply skip these chunks and continue.
00074                                              */
00075 #define TCODE_LEGACY_GEOMETRY     0x00010000
00076 #define TCODE_OPENNURBS_OBJECT    0x00020000
00077 #define TCODE_GEOMETRY            0x00100000
00078 #define TCODE_ANNOTATION          0x00200000
00079 #define TCODE_DISPLAY             0x00400000
00080 #define TCODE_RENDER              0x00800000
00081 #define TCODE_INTERFACE           0x02000000
00082 #define TCODE_TOLERANCE           0x08000000
00083 #define TCODE_TABLE               0x10000000
00084 #define TCODE_TABLEREC            0x20000000
00085 #define TCODE_USER                0x40000000
00086 #define TCODE_SHORT               0x80000000
00087 
00088 #define TCODE_CRC                 0x8000
00089 
00090 #define TCODE_ANONYMOUS_CHUNK     (TCODE_USER | TCODE_CRC | 0x0000 )
00091 
00092 /* The openNURBS toolkit allows users to write all openNURBS classed that are
00093 // derived from ON_Object using using TCODE_OPENNURBS_CLASS chunks.
00094 // In the .3dm file these TCODE_OPENNURBS_CLASS chunks are always have the
00095 // following format.
00096 */
00097 
00098 /* tables added 17 February 2000 */
00099 #define TCODE_MATERIAL_TABLE   (TCODE_TABLE | 0x0010) /* rendering materials */
00100 #define TCODE_LAYER_TABLE      (TCODE_TABLE | 0x0011) /* layers */
00101 #define TCODE_LIGHT_TABLE      (TCODE_TABLE | 0x0012) /* rendering lights */
00102 #define TCODE_OBJECT_TABLE     (TCODE_TABLE | 0x0013) /* geometry and annotation */
00103 #define TCODE_PROPERTIES_TABLE (TCODE_TABLE | 0x0014) /* model properties:
00104                                                       //   revision history
00105                                                       //   notes
00106                                                       //   preview image
00107                                                       */
00108 #define TCODE_SETTINGS_TABLE   (TCODE_TABLE | 0x0015) /* file properties including,
00109                                                       // units, tolerancess, 
00110                                                       // annotation defaults, 
00111                                                       // render mesh defaults, 
00112                                                       // current layer, 
00113                                                       // current material,
00114                                                       // current color,
00115                                                       // named construction planes,
00116                                                       // named viewports,
00117                                                       // current viewports,
00118                                                       */
00119 #define TCODE_BITMAP_TABLE    (TCODE_TABLE | 0x0016) /* embedded bitmaps */
00120 #define TCODE_USER_TABLE      (TCODE_TABLE | 0x0017) /* user table */
00121 
00122 #define TCODE_GROUP_TABLE     (TCODE_TABLE | 0x0018) /* group table */
00123 
00124 #define TCODE_FONT_TABLE      (TCODE_TABLE | 0x0019) /* annotation font table */
00125 #define TCODE_DIMSTYLE_TABLE  (TCODE_TABLE | 0x0020) /* annotation dimension style table */
00126 
00127 #define TCODE_INSTANCE_DEFINITION_TABLE (TCODE_TABLE | 0x0021) /* instance definition table */
00128 
00129 #define TCODE_HATCHPATTERN_TABLE (TCODE_TABLE | 0x0022) /* hatch pattern table */
00130 
00131 #define TCODE_LINETYPE_TABLE (TCODE_TABLE | 0x0023) /* linetype table */
00132 
00133 #define TCODE_OBSOLETE_LAYERSET_TABLE (TCODE_TABLE | 0x0024) /* obsolete layer set table */
00134 
00135 #define TCODE_TEXTURE_MAPPING_TABLE (TCODE_TABLE | 0x0025) /* texture mappings */
00136 
00137 #define TCODE_HISTORYRECORD_TABLE (TCODE_TABLE | 0x0026) /* history records */
00138 
00139 #define TCODE_ENDOFTABLE          0xFFFFFFFF
00140 
00141 /* records in properties table */
00142 #define TCODE_PROPERTIES_REVISIONHISTORY (TCODE_TABLEREC | TCODE_CRC | 0x0021)
00143 #define TCODE_PROPERTIES_NOTES           (TCODE_TABLEREC | TCODE_CRC | 0x0022)
00144 #define TCODE_PROPERTIES_PREVIEWIMAGE    (TCODE_TABLEREC | TCODE_CRC | 0x0023)
00145 #define TCODE_PROPERTIES_APPLICATION     (TCODE_TABLEREC | TCODE_CRC | 0x0024)
00146 #define TCODE_PROPERTIES_COMPRESSED_PREVIEWIMAGE (TCODE_TABLEREC | TCODE_CRC | 0x0025)
00147 #define TCODE_PROPERTIES_OPENNURBS_VERSION (TCODE_TABLEREC | TCODE_SHORT | 0x0026)
00148 
00149 /* records in settings table */
00150 #define TCODE_SETTINGS_PLUGINLIST             (TCODE_TABLEREC | TCODE_CRC   | 0x0135)
00151 #define TCODE_SETTINGS_UNITSANDTOLS           (TCODE_TABLEREC | TCODE_CRC   | 0x0031)
00152 #define TCODE_SETTINGS_RENDERMESH             (TCODE_TABLEREC | TCODE_CRC   | 0x0032)
00153 #define TCODE_SETTINGS_ANALYSISMESH           (TCODE_TABLEREC | TCODE_CRC   | 0x0033)
00154 #define TCODE_SETTINGS_ANNOTATION             (TCODE_TABLEREC | TCODE_CRC   | 0x0034)
00155 #define TCODE_SETTINGS_NAMED_CPLANE_LIST      (TCODE_TABLEREC | TCODE_CRC   | 0x0035)
00156 #define TCODE_SETTINGS_NAMED_VIEW_LIST        (TCODE_TABLEREC | TCODE_CRC   | 0x0036)
00157 #define TCODE_SETTINGS_VIEW_LIST              (TCODE_TABLEREC | TCODE_CRC   | 0x0037)
00158 #define TCODE_SETTINGS_CURRENT_LAYER_INDEX    (TCODE_TABLEREC | TCODE_SHORT | 0x0038)
00159 #define TCODE_SETTINGS_CURRENT_MATERIAL_INDEX (TCODE_TABLEREC | TCODE_CRC   | 0x0039)
00160 #define TCODE_SETTINGS_CURRENT_COLOR          (TCODE_TABLEREC | TCODE_CRC   | 0x003A)
00161 #define TCODE_SETTINGS__NEVER__USE__THIS      (TCODE_TABLEREC | TCODE_CRC   | 0x003E)
00162 #define TCODE_SETTINGS_CURRENT_WIRE_DENSITY   (TCODE_TABLEREC | TCODE_SHORT | 0x003C)
00163 #define TCODE_SETTINGS_RENDER                 (TCODE_TABLEREC | TCODE_CRC   | 0x003D)
00164 #define TCODE_SETTINGS_GRID_DEFAULTS          (TCODE_TABLEREC | TCODE_CRC   | 0x003F)
00165 #define TCODE_SETTINGS_MODEL_URL              (TCODE_TABLEREC | TCODE_CRC   | 0x0131)
00166 #define TCODE_SETTINGS_CURRENT_FONT_INDEX     (TCODE_TABLEREC | TCODE_SHORT | 0x0132)
00167 #define TCODE_SETTINGS_CURRENT_DIMSTYLE_INDEX (TCODE_TABLEREC | TCODE_SHORT | 0x0133)
00168 /* added 29 October 2002 as a chunk to hold new and future ON_3dmSettings information */
00169 #define TCODE_SETTINGS_ATTRIBUTES             (TCODE_TABLEREC | TCODE_CRC   | 0x0134)
00170 
00171 
00172 /* views are subrecords in the settings table */
00173 #define TCODE_VIEW_RECORD            (TCODE_TABLEREC | TCODE_CRC   | 0x003B)
00174 /* subrecords if view record */
00175 #define TCODE_VIEW_CPLANE            (TCODE_TABLEREC | TCODE_CRC   | 0x013B)
00176 #define TCODE_VIEW_VIEWPORT          (TCODE_TABLEREC | TCODE_CRC   | 0x023B)
00177 #define TCODE_VIEW_SHOWCONGRID       (TCODE_TABLEREC | TCODE_SHORT | 0x033B)
00178 #define TCODE_VIEW_SHOWCONAXES       (TCODE_TABLEREC | TCODE_SHORT | 0x043B)
00179 #define TCODE_VIEW_SHOWWORLDAXES     (TCODE_TABLEREC | TCODE_SHORT | 0x053B)
00180 #define TCODE_VIEW_TRACEIMAGE        (TCODE_TABLEREC | TCODE_CRC   | 0x063B)
00181 #define TCODE_VIEW_WALLPAPER         (TCODE_TABLEREC | TCODE_CRC   | 0x073B)
00182 #define TCODE_VIEW_WALLPAPER_V3      (TCODE_TABLEREC | TCODE_CRC   | 0x074B)
00183 #define TCODE_VIEW_TARGET            (TCODE_TABLEREC | TCODE_CRC   | 0x083B)
00184 #define TCODE_VIEW_DISPLAYMODE       (TCODE_TABLEREC | TCODE_SHORT | 0x093B)
00185 #define TCODE_VIEW_NAME              (TCODE_TABLEREC | TCODE_CRC   | 0x0A3B)
00186 #define TCODE_VIEW_POSITION          (TCODE_TABLEREC | TCODE_CRC   | 0x0B3B)
00187 
00188 /* added 29 October 2002 as a chunk to hold new and future ON_3dmView information */
00189 #define TCODE_VIEW_ATTRIBUTES        (TCODE_TABLEREC | TCODE_CRC   | 0x0C3B)
00190 
00191 /* added 27 June 2008 as a chunk to hold userdata on ON_Viewports saved in named view list */
00192 #define TCODE_VIEW_VIEWPORT_USERDATA (TCODE_TABLEREC | TCODE_CRC   | 0x0D3B)
00193 
00194 /* records in bitmap table */
00195 #define TCODE_BITMAP_RECORD (TCODE_TABLEREC | TCODE_CRC | 0x0090) /* bitmap table record derived from ON_Bitmap */
00196 
00197 /* records in material table */
00198 #define TCODE_MATERIAL_RECORD (TCODE_TABLEREC | TCODE_CRC | 0x0040) /* material table record derived from ON_Material */
00199 
00200 /* records in layer table */
00201 #define TCODE_LAYER_RECORD    (TCODE_TABLEREC | TCODE_CRC | 0x0050) /* layer table record derived from ON_Layer */
00202 
00203 /* records in light table */
00204 #define TCODE_LIGHT_RECORD            (TCODE_TABLEREC | TCODE_CRC | 0x0060)    /* light table record derived from ON_Light */
00205 #define TCODE_LIGHT_RECORD_ATTRIBUTES (TCODE_INTERFACE | TCODE_CRC   | 0x0061) /* ON_3dmObjectAttributes chunk */
00206 #define TCODE_LIGHT_RECORD_ATTRIBUTES_USERDATA (TCODE_INTERFACE | 0x0062)      /* ON_3dmObjectAttributes userdata chunk */
00207 
00208 #define TCODE_LIGHT_RECORD_END        (TCODE_INTERFACE | TCODE_SHORT | 0x006F)
00209 
00210 /* records in user table 
00211      Each user table entery has two top level chunks, a TCODE_USER_TABLE_UUID chunk
00212      and a TCODE_USER_RECORD chunk.
00213 */
00214 
00215 /* The TCODE_USER_TABLE_UUID chunk
00216    contains the plug-in id and, if the archive is V5 or later
00217    and was written by an opennurbs with version >= 200910190,
00218    a TCODE_USER_TABLE_RECORD_HEADER chunk.
00219 */
00220 #define TCODE_USER_TABLE_UUID          (TCODE_TABLEREC | TCODE_CRC | 0x0080)
00221 /* the user record header was added in 200910190 and is inside the TCODE_USER_TABLE_UUID chunk */
00222 #define TCODE_USER_TABLE_RECORD_HEADER (TCODE_TABLEREC | TCODE_CRC | 0x0082)
00223 /* information saved by the plug-in is in a TCODE_USER_RECORD chunk */
00224 #define TCODE_USER_RECORD              (TCODE_TABLEREC | 0x0081) 
00225 
00226 
00227 /* records in group table */
00228 #define TCODE_GROUP_RECORD             (TCODE_TABLEREC  | TCODE_CRC   | 0x0073)
00229 
00230 /* records in font table */
00231 #define TCODE_FONT_RECORD             (TCODE_TABLEREC  | TCODE_CRC   | 0x0074)
00232 
00233 /* records in dimension style table */
00234 #define TCODE_DIMSTYLE_RECORD          (TCODE_TABLEREC  | TCODE_CRC   | 0x0075)
00235 
00236 /* records in instance definition table */
00237 #define TCODE_INSTANCE_DEFINITION_RECORD  (TCODE_TABLEREC  | TCODE_CRC   | 0x0076)
00238 
00239 /* records in hatch pattern table */
00240 #define TCODE_HATCHPATTERN_RECORD  (TCODE_TABLEREC  | TCODE_CRC   | 0x0077)
00241 
00242 /* records in linetye pattern table */
00243 #define TCODE_LINETYPE_RECORD  (TCODE_TABLEREC  | TCODE_CRC   | 0x0078)
00244 
00245 /* OBSOLETE records in layer set table */
00246 #define TCODE_OBSOLETE_LAYERSET_RECORD  (TCODE_TABLEREC  | TCODE_CRC   | 0x0079)
00247 
00248 /* records in linetye pattern table */
00249 #define TCODE_TEXTURE_MAPPING_RECORD  (TCODE_TABLEREC  | TCODE_CRC   | 0x007A)
00250 
00251 /* records in history record pattern table */
00252 #define TCODE_HISTORYRECORD_RECORD  (TCODE_TABLEREC  | TCODE_CRC   | 0x007B)
00253 
00254 /* records in object table */
00255 #define TCODE_OBJECT_RECORD            (TCODE_TABLEREC  | TCODE_CRC   | 0x0070)
00256 #define TCODE_OBJECT_RECORD_TYPE       (TCODE_INTERFACE | TCODE_SHORT | 0x0071)   /* ON::object_type value */
00257 #define TCODE_OBJECT_RECORD_ATTRIBUTES (TCODE_INTERFACE | TCODE_CRC   | 0x0072)   /* ON_3dmObjectAttributes chunk */
00258 #define TCODE_OBJECT_RECORD_ATTRIBUTES_USERDATA (TCODE_INTERFACE | 0x0073)        /* ON_3dmObjectAttributes userdata chunk */
00259 #define TCODE_OBJECT_RECORD_HISTORY    (TCODE_INTERFACE | TCODE_CRC   | 0x0074)   /* construction history */
00260 #define TCODE_OBJECT_RECORD_HISTORY_HEADER (TCODE_INTERFACE | TCODE_CRC | 0x0075) /* construction history header*/
00261 #define TCODE_OBJECT_RECORD_HISTORY_DATA   (TCODE_INTERFACE | TCODE_CRC | 0x0076) /* construction history data */
00262 #define TCODE_OBJECT_RECORD_END        (TCODE_INTERFACE | TCODE_SHORT | 0x007F)
00263 
00264 /*
00266 //
00267 // TCODE_OBJECT_RECORD
00268 //   4 byte length of entire object record
00269 //
00270 //   TCODE_OBJECT_RECORD_TYPE required - used to quickly filter and skip unwanted objects
00271 //     4 byte ON::object_type
00272 //
00273 //   TCODE_OPENNURBS_CLASS
00274 //     4 byte length
00275 //     TCODE_OPENNURBS_CLASS_UUID
00276 //       4 byte length = 20
00277 //       value of ON_ClassId::m_uuid for this class
00278 //       4 byte CRC
00279 //     TCODE_OPENNURBS_CLASS_DATA
00280 //       4 byte length 
00281 //       class specific data for geometry or annotation object
00282 //       4 byte CRC
00283 //     TCODE_OPENNURBS_CLASS_USERDATA (1 chunk per piece of user data)
00284 //       4 byte length
00285 //       2 byte chunk version 2.1
00286 //       TCODE_OPENNURBS_CLASS_USERDATA_HEADER
00287 //         4 byte length
00288 //         16 byte value of ON_ClassId::m_uuid for this child class of ON_UserData
00289 //         16 byte value of ON_UserData::m_userdata_uuid
00290 //         4 byte value of ON_UserData::m_userdata_copycount
00291 //         128 byte value of ON_UserData::m_userdata_xform
00292 //         16 byte value of  ON_UserData::m_application_uuid (in ver 2.1 chunks)
00293 //       TCODE_ANONYMOUS_CHUNK
00294 //         4 byte length
00295 //         specific user data
00296 //     TCODE_OPENNURBS_CLASS_END
00297 //
00298 //   TCODE_OBJECT_RECORD_ATTRIBUTES (optional)
00299 //     4 byte length
00300 //     ON_3dmObjectAttributes information
00301 //     4 byte crc
00302 //
00303 //   TCODE_OBJECT_RECORD_ATTRIBUTES_USERDATA (optional)
00304 //     4 byte length
00305 //     TCODE_OPENNURBS_CLASS_USERDATA (1 chunk per piece of user data)
00306 //       4 byte length
00307 //       2 byte chunk version 2.1
00308 //       TCODE_OPENNURBS_CLASS_USERDATA_HEADER
00309 //         4 byte length
00310 //         16 byte value of ON_ClassId::m_uuid for this child class of ON_UserData
00311 //         16 byte value of ON_UserData::m_userdata_uuid
00312 //         4 byte value of ON_UserData::m_userdata_copycount
00313 //         128 byte value of ON_UserData::m_userdata_xform
00314 //         16 byte value of  ON_UserData::m_application_uuid (in ver 2.1 chunks)
00315 //       TCODE_ANONYMOUS_CHUNK
00316 //         4 byte length
00317 //         specific user data
00318 //
00319 //   TCODE_OBJECT_RECORD_HISTORY (optional) construction history
00320 //     4 byte length
00321 //     2 byte chunk version
00322 //     TCODE_OBJECT_RECORD_HISTORY_HEADER
00323 //       4 byte length
00324 //       2 byte chunk version 
00325 //       ...
00326 //       4 byte crc
00327 //     TCODE_OBJECT_RECORD_HISTORY_DATA
00328 //       4 byte length
00329 //       2 byte chunk version 
00330 //       ...
00331 //       4 byte crc
00332 //
00333 //   TCODE_OBJECT_RECORD_END required - marks end of object record
00334 //
00336 */
00337 
00338 #define TCODE_OPENNURBS_CLASS          (TCODE_OPENNURBS_OBJECT               | 0x7FFA)
00339 #define TCODE_OPENNURBS_CLASS_UUID     (TCODE_OPENNURBS_OBJECT | TCODE_CRC   | 0x7FFB)
00340 #define TCODE_OPENNURBS_CLASS_DATA     (TCODE_OPENNURBS_OBJECT | TCODE_CRC   | 0x7FFC)
00341 #define TCODE_OPENNURBS_CLASS_USERDATA (TCODE_OPENNURBS_OBJECT               | 0x7FFD)
00342 #define TCODE_OPENNURBS_CLASS_USERDATA_HEADER (TCODE_OPENNURBS_OBJECT | TCODE_CRC | 0x7FF9)
00343 #define TCODE_OPENNURBS_CLASS_END      (TCODE_OPENNURBS_OBJECT | TCODE_SHORT | 0x7FFF)
00344 
00345 /*
00347 //
00348 // TCODE_OPENNURBS_CLASS
00349 // length of entire openNURBS class object chunk
00350 //
00351 //   TCODE_OPENNURBS_CLASS_UUID
00352 //   length of uuid (16 byte UUID + 4 byte CRC)
00353 //   16 byte UUID ( a.k.a. GUID ) openNURBS class ID - determines specific openNURBS class
00354 //   4 bytes (32 bit CRC of the UUID)
00355 //
00356 //   TCODE_OPENNURBS_CLASS_DATA
00357 //   length of object data
00358 //   ... data that defines object
00359 //       use ON_classname::Read() to read this data and ON_classname::Write()
00360 //       to write this data
00361 //   4 bytes (32 bit CRC of the object data)
00362 //
00363 //   TCODE_OPENNURBS_CLASS_USERDATA ( 0 or more user data chunks)
00364 //
00365 //   TCODE_OPENNURBS_CLASS_END
00366 //   4 bytes = 0
00367 //
00369 */
00370 
00371 /*
00373 //
00374 //
00375 //  The TCODEs below were used in the version 1 file format and are needed so that
00376 //  the these files can be read and (optionally) written by the current OpenNURBS
00377 //  toolkit.
00378 //
00379 //
00381 */
00382 
00383 
00384 #define TCODE_ANNOTATION_SETTINGS (TCODE_ANNOTATION | 0x0001)
00385 
00386 #define TCODE_TEXT_BLOCK          (TCODE_ANNOTATION | 0x0004)
00387 #define TCODE_ANNOTATION_LEADER   (TCODE_ANNOTATION | 0x0005)
00388 #define TCODE_LINEAR_DIMENSION    (TCODE_ANNOTATION | 0x0006)
00389 #define TCODE_ANGULAR_DIMENSION   (TCODE_ANNOTATION | 0x0007)
00390 #define TCODE_RADIAL_DIMENSION    (TCODE_ANNOTATION | 0x0008)
00391 
00392 /* old RhinoIO toolkit (pre February 2000) defines */
00393 #define TCODE_RHINOIO_OBJECT_NURBS_CURVE   (TCODE_OPENNURBS_OBJECT | 0x0008) /* old CRhinoNurbsCurve   */
00394 #define TCODE_RHINOIO_OBJECT_NURBS_SURFACE (TCODE_OPENNURBS_OBJECT | 0x0009) /* old CRhinoNurbsSurface */
00395 #define TCODE_RHINOIO_OBJECT_BREP          (TCODE_OPENNURBS_OBJECT | 0x000B) /* old CRhinoBrep         */
00396 #define TCODE_RHINOIO_OBJECT_DATA          (TCODE_OPENNURBS_OBJECT | 0xFFFE) /* obsolete - don't confuse with TCODE_OPENNURBS_OBJECT_DATA */
00397 #define TCODE_RHINOIO_OBJECT_END           (TCODE_OPENNURBS_OBJECT | 0xFFFF) /* obsolete - don't confuse with TCODE_OPENNURBS_OBJECT_END */
00398 
00399 /* OpenNURBS classes the require a unique tcode */
00400 #define TCODE_OPENNURBS_BUFFER (TCODE_OPENNURBS_OBJECT | TCODE_CRC | 0x0100) /* chunk stores ON_Buffer classes */
00401 
00402 /* legacy objects from Rhino 1.x */
00403 #define TCODE_LEGACY_ASM          (TCODE_LEGACY_GEOMETRY | 0x0001)
00404 #define TCODE_LEGACY_PRT          (TCODE_LEGACY_GEOMETRY | 0x0002)
00405 #define TCODE_LEGACY_SHL          (TCODE_LEGACY_GEOMETRY | 0x0003)
00406 #define TCODE_LEGACY_FAC          (TCODE_LEGACY_GEOMETRY | 0x0004)
00407 #define TCODE_LEGACY_BND          (TCODE_LEGACY_GEOMETRY | 0x0005)
00408 #define TCODE_LEGACY_TRM          (TCODE_LEGACY_GEOMETRY | 0x0006)
00409 #define TCODE_LEGACY_SRF          (TCODE_LEGACY_GEOMETRY | 0x0007)
00410 #define TCODE_LEGACY_CRV          (TCODE_LEGACY_GEOMETRY | 0x0008)
00411 #define TCODE_LEGACY_SPL          (TCODE_LEGACY_GEOMETRY | 0x0009)
00412 #define TCODE_LEGACY_PNT          (TCODE_LEGACY_GEOMETRY | 0x000A)
00413 
00414 #define TCODE_STUFF               0x0100
00415 
00416 #define TCODE_LEGACY_ASMSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_ASM)
00417 #define TCODE_LEGACY_PRTSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_PRT)
00418 #define TCODE_LEGACY_SHLSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_SHL)
00419 #define TCODE_LEGACY_FACSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_FAC)
00420 #define TCODE_LEGACY_BNDSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_BND)
00421 #define TCODE_LEGACY_TRMSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_TRM)
00422 #define TCODE_LEGACY_SRFSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_SRF)
00423 #define TCODE_LEGACY_CRVSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_CRV)
00424 #define TCODE_LEGACY_SPLSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_SPL)
00425 #define TCODE_LEGACY_PNTSTUFF     (TCODE_LEGACY_GEOMETRY | TCODE_STUFF | TCODE_LEGACY_PNT)
00426 
00427 /* legacy objects from Rhino 1.x */
00428 #define TCODE_RH_POINT            (TCODE_GEOMETRY | 0x0001)
00429 
00430 #define TCODE_RH_SPOTLIGHT        (TCODE_RENDER   | 0x0001)
00431 
00432 #define TCODE_OLD_RH_TRIMESH          (TCODE_GEOMETRY | 0x0011)
00433 #define TCODE_OLD_MESH_VERTEX_NORMALS (TCODE_GEOMETRY | 0x0012)
00434 #define TCODE_OLD_MESH_UV             (TCODE_GEOMETRY | 0x0013)
00435 #define TCODE_OLD_FULLMESH            (TCODE_GEOMETRY | 0x0014)
00436 
00437 
00438 #define TCODE_MESH_OBJECT         (TCODE_GEOMETRY | 0x0015)
00439 #define TCODE_COMPRESSED_MESH_GEOMETRY   (TCODE_GEOMETRY | 0x0017)
00440 #define TCODE_ANALYSIS_MESH       (TCODE_GEOMETRY | 0x0018)
00441 
00442 #define TCODE_NAME                (TCODE_INTERFACE | 0x0001)
00443 #define TCODE_VIEW                (TCODE_INTERFACE | 0x0002)
00444 #define TCODE_CPLANE              (TCODE_INTERFACE | 0x0003)
00445 
00446 #define TCODE_NAMED_CPLANE        (TCODE_INTERFACE | 0x0004)
00447 #define TCODE_NAMED_VIEW          (TCODE_INTERFACE | 0x0005)
00448 #define TCODE_VIEWPORT            (TCODE_INTERFACE | 0x0006)
00449 
00450 #define TCODE_SHOWGRID            (TCODE_SHORT | TCODE_INTERFACE | 0x0007)
00451 #define TCODE_SHOWGRIDAXES        (TCODE_SHORT | TCODE_INTERFACE | 0x0008)
00452 #define TCODE_SHOWWORLDAXES       (TCODE_SHORT | TCODE_INTERFACE | 0x0009)
00453 
00454 #define TCODE_VIEWPORT_POSITION   (TCODE_INTERFACE | 0x000A)
00455 #define TCODE_VIEWPORT_TRACEINFO  (TCODE_INTERFACE | 0x000B)
00456 #define TCODE_SNAPSIZE            (TCODE_INTERFACE | 0x000C)
00457 #define TCODE_NEAR_CLIP_PLANE     (TCODE_INTERFACE | 0x000D)
00458 #define TCODE_HIDE_TRACE          (TCODE_INTERFACE | 0x000E)
00459 
00460 #define TCODE_NOTES               (TCODE_INTERFACE | 0x000F)
00461 #define TCODE_UNIT_AND_TOLERANCES (TCODE_INTERFACE | 0x0010)
00462 
00463 #define TCODE_MAXIMIZED_VIEWPORT  (TCODE_SHORT | TCODE_INTERFACE | 0x0011)
00464 #define TCODE_VIEWPORT_WALLPAPER  (TCODE_INTERFACE | 0x0012)
00465 
00466 
00467 #define TCODE_SUMMARY             (TCODE_INTERFACE | 0x0013)
00468 #define TCODE_BITMAPPREVIEW       (TCODE_INTERFACE | 0x0014)
00469 #define TCODE_VIEWPORT_DISPLAY_MODE  (TCODE_SHORT | TCODE_INTERFACE | 0x0015)
00470 
00471 
00472 #define TCODE_LAYERTABLE          (TCODE_SHORT   | TCODE_TABLE    | 0x0001) /* obsolete - do not use */
00473 #define TCODE_LAYERREF            (TCODE_SHORT   | TCODE_TABLEREC | 0x0001)
00474 
00475 #define TCODE_XDATA               (TCODE_USER | 0x0001)
00476 
00477 #define TCODE_RGB                 (TCODE_SHORT   | TCODE_DISPLAY | 0x0001)
00478 #define TCODE_TEXTUREMAP          (TCODE_DISPLAY | 0x0002)
00479 #define TCODE_BUMPMAP             (TCODE_DISPLAY | 0x0003)
00480 #define TCODE_TRANSPARENCY        (TCODE_SHORT   | TCODE_DISPLAY | 0x0004)
00481 #define TCODE_DISP_AM_RESOLUTION  (TCODE_SHORT   | TCODE_DISPLAY | 0x0005)
00482 #define TCODE_RGBDISPLAY          (TCODE_SHORT   | TCODE_DISPLAY | 0x0006)  /* will be used for color by object */
00483 #define TCODE_RENDER_MATERIAL_ID  (TCODE_DISPLAY | 0x0007)                  /* id for render material */
00484 
00485 #define TCODE_LAYER               (TCODE_DISPLAY | 0x0010)
00486 
00487 /* obsolete layer typecodes from earlier betas - not used anymore */
00488 #define TCODE_LAYER_OBSELETE_1    (TCODE_SHORT   | TCODE_DISPLAY | 0x0013)
00489 #define TCODE_LAYER_OBSELETE_2    (TCODE_SHORT   | TCODE_DISPLAY | 0x0014)
00490 #define TCODE_LAYER_OBSELETE_3    (TCODE_SHORT   | TCODE_DISPLAY | 0x0015)
00491 
00492 /* these were only ever used by AccuModel and never by Rhino */
00493 #define TCODE_LAYERON             (TCODE_SHORT   | TCODE_DISPLAY | 0x0016)
00494 #define TCODE_LAYERTHAWED         (TCODE_SHORT   | TCODE_DISPLAY | 0x0017)
00495 #define TCODE_LAYERLOCKED         (TCODE_SHORT   | TCODE_DISPLAY | 0x0018)
00496 
00497 
00498 #define TCODE_LAYERVISIBLE        (TCODE_SHORT   | TCODE_DISPLAY | 0x0012)
00499 #define TCODE_LAYERPICKABLE       (TCODE_SHORT   | TCODE_DISPLAY | 0x0030)
00500 #define TCODE_LAYERSNAPABLE       (TCODE_SHORT   | TCODE_DISPLAY | 0x0031)
00501 #define TCODE_LAYERRENDERABLE     (TCODE_SHORT   | TCODE_DISPLAY | 0x0032)
00502 
00503 
00504 /* use LAYERSTATE ( 0 = LAYER_ON, 1 = LAYER_OFF, 2 = LAYER_LOCKED ) instead of above individual toggles */
00505 #define TCODE_LAYERSTATE          (TCODE_SHORT   | TCODE_DISPLAY | 0x0033)
00506 #define TCODE_LAYERINDEX          (TCODE_SHORT   | TCODE_DISPLAY | 0x0034)
00507 #define TCODE_LAYERMATERIALINDEX  (TCODE_SHORT   | TCODE_DISPLAY | 0x0035)
00508 
00509 #define TCODE_RENDERMESHPARAMS    (TCODE_DISPLAY | 0x0020) /* block of parameters for render meshes */
00510 
00511 
00512 
00513 #define TCODE_DISP_CPLINES        (TCODE_SHORT   | TCODE_DISPLAY | 0x0022)
00514 #define TCODE_DISP_MAXLENGTH      (TCODE_DISPLAY | 0x0023)
00515 
00516 #define TCODE_CURRENTLAYER        (TCODE_SHORT   | TCODE_DISPLAY | 0x0025 )
00517 
00518 #define TCODE_LAYERNAME           (TCODE_DISPLAY | 0x0011)
00519 
00520 #define TCODE_LEGACY_TOL_FIT      (TCODE_TOLERANCE | 0x0001)
00521 #define TCODE_LEGACY_TOL_ANGLE    (TCODE_TOLERANCE | 0x0002)
00522 
00523 #define TCODE_DICTIONARY          (TCODE_USER | TCODE_CRC   | 0x0010)
00524 #define TCODE_DICTIONARY_ID       (TCODE_USER | TCODE_CRC   | 0x0011)
00525 #define TCODE_DICTIONARY_ENTRY    (TCODE_USER | TCODE_CRC   | 0x0012)
00526 #define TCODE_DICTIONARY_END      (TCODE_USER | TCODE_SHORT | 0x0013)
00527 
00528 #endif


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:26:58