Drawing Exchange Format (DXF)

From Wiki.OSArch

Drawing Exchange Format (DXF) is a file format designed by Autodesk to allow exchange with their AutoCAD software. While they publish specs it is not an open format as they alone control iterations to the format. Autodesk and the Open Design Alliance sell commercial licenses for accessing DXF files. There is generally better support for DXF in free/libre software, compared to Drawing (DWG) format.

DXF can be thought of as an exchange version of the Drawing (DWG) format developed by Autodesk. File sizes may be larger, as it is in plaintext, whereas DWG is binary, and it may not contains data of proprietary AutoCAD extensions. Autodesk has discouraged the use of DWG, by inserting an encrypted proprietary signature that determines whether or not a DWG comes from Autodesk software. However, despite this discouragement, DWG creation is commonplace.

The Open Design Alliance has a freely available proprietary ODA File Converter for converting between different versions of .dwg and .dxf

Support for DXFs in free software[edit]

The LibreDWG project has an example application for SVG and Postscript conversion, converters from and to DXF.

2D and 3D DXFs can be imported and exported by Blender and FreeCAD. 2D DXFs are supported in LibreCAD, and QCAD.

Blender is capable of importing DXFs with absolute coordinates with the BlenderGIS add-on. However, this workflow may have issues in recent releases. Blender's support for DXF is based on an older DXF library, and therefore may have compatibility issues with newer DXFs being produced.

dxflib is an open source C++ library mainly for parsing DXFTM files.

Advantages and Disadvantages[edit]

For the purpose of documentation is worth comparing DXF to Scalable_Vector_Graphics_(SVG)

Pros of DXF:

  • Is designed to capture the same data that Drawing (DWG) can capture. So if DWG is your native format, DXF ensures a minimum of data loss.
  • Data in 3 dimensions (Scalable Vector Graphics (SVG) files are only two dimensions)
  • Easy to read, easy to write, and a variety of data types of play with (blocks, polylines, polyfaces...)
  • Layers with styles baked into it
  • Model space. Paper space. Multiple paper spaces.

Cons of DXF:

  • No units information in the file
  • Requires a DXF viewer.
  • Is an "open" standard, but at the same time it's kinda like Autodesk's less favourite cousin that has to follow Drawing (DWG) but lacks some of the proprietary add-ons that DWG has.