gifDXF R12 Export

The DXF export module has been updated with a DXF Tweak feature which controls DXF internals and writes XDATA (Exended Entity Data) for Cells, Struts and Hubs. Using DXF Tweak it is possible to create very basic DXF files that open in legacy programs, whilst also creating fully Audited* DXF R12 files that open with more contemporary and stricter importers. In either case, switches have been provided so users can determine exactly what is required.

*Exported files were audited with the Teigha DXF File Converter and passed without errors. Files have also been tested with the AutoCad online viewer and import sucessfully into various modelling programs.

Choose menu 'File->Export DXF'.

DXF export dialog

Cell Decimation is ON by default for DXF export and you cannot turn it OFF. The default Decimation option is to trifan all non-coplanar cells, and all cells with more than 4 vertices. This option ensures that primal triangular cells on the truncation plane, which contain a truncation bisector vertex, are not trifanned during export.

If you click ‘Okay’ without checking any elements, a beep will sound and the window will remain open. The default export options are:

      +-------------------+---------------+------------------------------------+
      |     ELEMENT       |    ENTITY     |           LAYER METHOD             |
      |-------------------|---------------|------------------------------------|
      | Cells             | Polyface mesh | Parent group or Isolate group name |
      |-------------------|---------------|------------------------------------|
      | Struts            | Polyface mesh | Parent lattice name                |
      |-------------------|---------------|------------------------------------|
      | Spaceframe struts | Polyface mesh | Spaceframe node name               |
      |-------------------|---------------|------------------------------------|
      | Hubs              | Polyface mesh | Parent lattice name                |
      +-------------------+---------------+------------------------------------+

The default export options should work well with most importers, so only change them if you run into problems. To change the default export options click the ‘Advanced’ button which will bring up the ‘DXF Options’ window...

DXF Options Window

DXF export dialog

You can export 3DFace or Polyface Mesh. This is because some older programs can only import the 3DFace entity (e.g. Poser 3). Enities are grouped according to their Target, their manifold, and their UN_ID number. These attributes are used to make the layer name. Some typical layer names are:

      TA_DUAL_CP              // TARGET A DUAL CELL POLYGON
      TA_DUAL_CP_3W           // TARGET A DUAL CELL POLYGON GROUP 3W
      TA_DUAL_CP_F4           // TARGET A DUAL CELL POLYGON GROUP F4
      TB_PRML_CT              // TARGET B PRIMAL CELL TRIFAN
      TA_DUAL_CG*             // TARGET A DUAL CELL
      TB_PRML_CS              // TARGET B PRIMAL CELL SKELETON
      
      TA_DUAL_HB              // TARGET A DUAL HUB
      TA_DUAL_HB_234          // TARGET A DUAL HUB #234
      
      TA_DUAL_HB_FL           // TARGET A DUAL HUB FLANGE
      TA_PRML_HB_FL           // TARGET A PRIMAL HUB FLANGE
      
      TA_DUAL_ST              // TARGET A DUAL STRUT
      TB_PRML_ST              // TARGET B PRIMAL STRUT
      TA_PRML_ST_45           // TARGET A PRIMAL STRUT #45
      
      TA_PRML_SURF            // TARGET A PRIMAL SURFACE
      TB_DUAL_SURF            // TARGET B PRIMAL SURFACE
      
      *Cells with a 'CG' tag can be trifanned or polygonal,
       depending on the Decimation option.

Enities are only numbered by their UN_ID if you elect to export Individual entities. Be aware that if do you this, each entity will be assigned its own layer. This can cause problems with importers which only support a limited amount of layers. My first solution to this problem was to change the UN_ID to a hex value and store that as the DXF Object handle. This was supposed to give a direct correspondance between Geodesica’s UN_ID’s and the DXF Entity handles in AutoCad. However, despite what the DXF specification states about object handles never changing, I have found that they do change, even when opening a file. My second solution to the problem is to record Geodesica’s Element names and UN_ID’ as DXF XDATA (Extended Entity Data). Geodesica also writes XDATA for Strut compound mitres and Hub connections. If you want this option, please Click the ‘DXF Tweak’ button to bring up the ‘DXF Tweak’ window...

NOTE: DXF R12 Layer names are limited to 31 characters; if a layer name exceeds this length, a warning dialogue appears during export. Layer names are coloured with an AutoCad colour index; the colour index starts at 1 and increases by 1 for each addtional layer. DXF R12 only supports 256 colours, so if there are more than 256 layers in the file, the colour index resets to 1 for layer 257, and so on.

Tip: set the Colour Mode to ‘ACI’ to ensure that Geodesica's Isolate Group colours match the Layer colours; this ensures that colours correspond when the file is opened in AutoCAD. Geodesica’s Color Mode is documented here.

DXF Tweaks Window

DXF export dialog

The DXF 12 reference states:

AutoCAD lets you omit many items in a DXF file and still obtain a usable drawing. The entire HEADER section can be omitted if you don't need to set any header variables. Any of the tables in the TABLES section can be omitted if you don't need to make any entries, and the entire TABLES section can be dropped if nothing in it is required. If you define any linetypes in the LTYPE table, this table must appear before the LAYER table. If no Block Definitions are used in the drawing, the BLOCKS section can be omitted. If present, however, the BLOCKS section must appear before the ENTITIES section. Within the ENTITIES section, you can reference layer names even though you haven't defined them in the LAYER table. Such layers are automatically created with color 7 and the CONTINUOUS linetype. The EOF item must be present at the end-of-file.

To write a basic DXF file, the ‘Write ENTITIES Only’ button must be ON. This will omit the HEADER, TABLES, BLOCKS and any XDATA in the ENTITIES. The DXF file will then be structured thus:

      0
      SECTION
      2
      ENTITIES
      .... Entities written here
      0
      ENDSEC
      0
      EOF

When the ‘Write ENTITIES Only’ button is OFF the Sections for HEADER, TABLES and BLOCKS are enabled, with the option to write XDATA (Extended Entity Data). To write a fully audited DXF R12 file, the following options must be checked:

                            HEADER:       ON
                              HANDLING:   ON
                              
                            TABLES:       ON
                              APPID:      ON
                              DIMSTYLE:   ON
                              TYPE:       ON
                              LAYER:      ON
                              STYLE:      ON
                              UCS:        ON
                              VIEW:       ON
                              VPORT:      ON
                            
                            BLOCKS:       ON
                            
                            XDATA:        Optional Switches

Some importers require that all SECTIONS are present, even if nothing is required within them. If this is the case, use the ‘EMPTY’ toggle buttons which ensure that empty SECTIONS are written to the file, e.g:

      0
      SECTION
      2
      HEADER
      0
      ENDSEC
      0
      SECTION
      2
      TABLES
      0
      ENDSEC
      0
      SECTION
      2
      BLOCKS
      0
      ENDSEC
      0
      SECTION
      2
      ENTITIES
      .... Entities written here
      0
      ENDSEC
      0
      EOF

NOTE: certain options will activate/deactivate their dependencies in other sections. For example XDATA requires that HANDLING and APPID be turned ON.

XDATA Details

This section documents the structure of Extended Entity Data for Cells, Struts and Hubs. Before including XDATA in the DXF file, a full connectivity log must be made so that element labels are set to their correct Isolate groups.

The Group Codes used for XDATA are given in the AutoCad R12 specification. They are as follows:

      +------------+--------------------------------------------------+
      | 1000       | An ASCII string (up to 255 bytes long) in        |
      |            | extended entity data                             |
      |------------|--------------------------------------------------|
      | 1001       | Registered application name (ASCII string up to  |
      |            | 31 bytes long) for XDATA (fixed)                 |
      |------------|--------------------------------------------------|
      | 1002       | Extended entity data control string ("{" or "}") |
      |            | (fixed)                                          |
      |------------|--------------------------------------------------|
      | 1003       | Extended entity data Layer name                  |
      |------------|--------------------------------------------------|
      | 1004       | Chunk of bytes (up to 127 bytes long) in         |
      |            | extended entity data                             |
      |------------|--------------------------------------------------|
      | 1005       | Extended entity data database handle             |
      |------------|--------------------------------------------------|
      | 1010,      | Extended entity data X, Y, and Z coordinates     |
      | 1020,      |                                                  |
      | 1030       |                                                  |
      |------------|--------------------------------------------------|
      | 1011,      | Extended entity data X, Y, and Z coordinates of  |
      | 1021,      | 3D world space position                          |
      | 1031       |                                                  |
      |------------|--------------------------------------------------|
      | 1012,      | Extended entity data X, Y, and Z components of   |
      | 1022,      | 3D world space displacement                      |
      | 1032       |                                                  |
      |------------|--------------------------------------------------|
      | 1013,      | Extended entity data X, Y, and Z components of   |
      | 1023,      | 3D world space direction                         |
      | 1033       |                                                  |
      |------------|--------------------------------------------------|
      | 1040       | Extended entity data Floating-point value        |
      |------------|--------------------------------------------------|
      | 1041       | Extended entity data distance value              |
      |------------|--------------------------------------------------|
      | 1042       | Extended entity data scale factor                |
      |------------|--------------------------------------------------|
      | 1070       | Extended entity data 16-bit signed integer       |
      |------------|--------------------------------------------------|
      | 1071       | Extended entity data 32-bit signed long          |
      +------------+--------------------------------------------------+
STRUT XDATA

The typical format of Strut XDATA is:

      1001
      GEODESICA_SFX
      1002
      {
      1003
      TA_PRML_ST
      1000
      STRUT
      1005
      16F
      1000
      ISOLATE GROUP: S3
      1000
      UN_ID: 8870
      1000
      RECTANGLE_SOLID_EDGE
      1000
      QUAD_EDGE_LENGTH =  2.952418088 FEET OR 35.429017056 INCHES.
      1000
      CENTER_LINE_LENGTH =  2.278366525 FEET OR 27.340398300 INCHES.
      1000
      OUTERMOST_EDGE_LENGTH =  2.303246420 FEET OR 27.638957040 INCHES.
      1000
      ORG UN_ID: 6259
      1000
      DEST UN_ID: 6355
      1000
      LEFT FACE UN_ID: 5871
      1000
      RIGHT FACE UN_ID: 7814
      1000
      DIHEDRAL ORBIT INFO FOR STRUT UN_ID: 8870
      1000
      CIRCUMFLEX = NO.
      1000
      DIHEDRAL = 172.19780116
      1000
      172° 11' 52.0841681"
      1000
      THETA = 86.09890058
      1000
      086° 05' 56.0420841"
      1000
      SIGMA = 3.90109942
      1000
      003° 54' 3.9579159"
      1000
      BETA = 93.90109942
      1000
      093° 54' 3.9579159"
      1000
      CUTTING INFO FOR STRUT UN_ID: 8870
      1000
      COMPOUND ANGLES AT ORG:
      1000
      ORG BEVEL ALPHA = 81.50961919
      1000
      081° 30' 34.6290951"
      1000
      ORG BEVEL DELTA = 8.49038081
      1000
      008° 29' 25.3709049"
      1000
      ORG MITRE ALPHA = 90.00000000
      1000
      090° 00' 0.0000000"
      1000
      ORG MITRE DELTA = 0.00000000
      1000
      000° 00' 0.0000000"
      1000
      COMPOUND ANGLES AT DEST:
      1000
      DEST BEVEL ALPHA = 81.50961919
      1000
      081° 30' 34.6290951"
      1000
      DEST BEVEL DELTA = 8.49038081
      1000
      008° 29' 25.3709049"
      1000
      DEST MITRE ALPHA = 90.00000000
      1000
      090° 00' 0.0000000"
      1000
      DEST MITRE DELTA = 0.00000000
      1000
      000° 00' 0.0000000"
      1002
      }

Note that angles are given both as a “Decimal degrees” string and as a “Degrees, Minutes, Seconds” string. Three length strings are also given:

    QUAD_EDGE_LENGTH       = length of orginal quad-edge
    CENTER_LINE_LENGTH     = length of strut centre line up to the hub boundary
    OUTERMOST_EDGE_LENGTH  = length of outermost edge of strut, as viewed from
                             system center.

Including compound mitre information increases the file size by many megabytes, so only check what is required. In any case the UN ID is always given, so it is a simple matter to correlate UN_ID’s with Geodesica’s connectivity log.

Strut XDATA refers to the generated mesh struts, not the Quad-Edges.

CELL XDATA

The typical format of Cell XDATA is:

      1001
      GEODESICA_SFX
      1002
      {
      1003
      TA_PRML_CG_CELL_GROUP_1
      1000
      CELL
      1005
      158DF
      1000
      ISOLATE GROUP: F1
      1000
      UN_ID: 7354
      1002
      }

Note: Cell XDATA is not included when Cells are exported using the SINGLE MESH option.

HUB XDATA

The typical format of Hub XDATA is:

      1001
      GEODESICA_SFX
      1002
      {
      1003
      TA_PRML_HB
      1000
      HUB
      1005
      5EB7
      1000
      ISOLATE GROUP: K3
      1000
      UN_ID: 6864
      1000
      CYLINDER_HUB
      1000
      NORMAL
      1010
      -0.8090169944
      1020
      0.5257311121
      1030
      -0.2628655561
      1000
      CONNECTIONS AT HUB UN_ID: 6864
      1000
      STRUT UN_ID: 9201 CONNECTS TO HUB UN_ID: 6858
      1000
      STRUT UN_ID: 9351 CONNECTS TO HUB UN_ID: 8723
      1000
      STRUT UN_ID: 9348 CONNECTS TO HUB UN_ID: 8717
      1000
      STRUT UN_ID: 9204 CONNECTS TO HUB UN_ID: 6870
      1000
      STRUT UN_ID: 9203 CONNECTS TO HUB UN_ID: 8072
      1000
      STRUT UN_ID: 9199 CONNECTS TO HUB UN_ID: 8066
      1002
      }

When a full connectivity log has been made for Hubs with the modifier keys 'Control' and 'Shift', then Spaceframe connection details will be included in the XDATA,e.g:

      1001
      GEODESICA_SFX
      1002
      {
      1003
      TA_PRML_HB
      1000
      HUB
      1005
      E95B
      1000
      ISOLATE GROUP: K3
      1000
      UN_ID: 6818
      1000
      CYLINDER_HUB
      1000
      NORMAL
      1010
      0.9554225632
      1020
      0.2511476834
      1030
      0.1552178045
      1000
      CONNECTIONS AT HUB UN_ID: 6818
      1000
      STRUT UN_ID: 17087 CONNECTS TO HUB UN_ID: 8188
      1000
      SPACEFRAME STRUT UN_ID: 21099 CONNECTS TO HUB UN_ID: 10471
      1000
      STRUT UN_ID: 17085 CONNECTS TO HUB UN_ID: 6854
      1000
      SPACEFRAME STRUT UN_ID: 21100 CONNECTS TO HUB UN_ID: 10473
      1000
      STRUT UN_ID: 16973 CONNECTS TO HUB UN_ID: 6278
      1000
      SPACEFRAME STRUT UN_ID: 21101 CONNECTS TO HUB UN_ID: 10599
      1000
      STRUT UN_ID: 16972 CONNECTS TO HUB UN_ID: 6824
      1000
      SPACEFRAME STRUT UN_ID: 21102 CONNECTS TO HUB UN_ID: 10487
      1000
      STRUT UN_ID: 17072 CONNECTS TO HUB UN_ID: 8106
      1000
      SPACEFRAME STRUT UN_ID: 21103 CONNECTS TO HUB UN_ID: 10489
      1000
      STRUT UN_ID: 17071 CONNECTS TO HUB UN_ID: 6812
      1000
      SPACEFRAME STRUT UN_ID: 21098 CONNECTS TO HUB UN_ID: 10465
      1002
      }

Hub XDATA will be expanded in a future version to give the Hub Normal angles for Struts (which are changed by Hub axis shift values), and any other required dimensions.

AutoCAD Online Viewer

Above: Autocad Online Viewer with Geodesica-SFX-0-9-6-4 DXF default export options.

Below: DXF default export into Cinema 4D:

png