.DXF
Drawing Exchange Format
Introduction
DXF is Autodesk’s documented format for exchanging drawings between AutoCAD and other programs, introduced alongside AutoCAD in 1982. Unlike DWG, its layout is published with every AutoCAD release, so it is widely supported. It is the usual format for sending outlines to laser cutters, CNC routers and plasma cutters.
Most DXF files are text. A binary form also exists, which starts with the line
AutoCAD Binary DXF.
Software
Structure
A text DXF file is a long series of pairs, each on two lines: a group code, which is
a number saying what kind of value follows, then the value. Code 0 starts
a new entity or marks a section boundary, 2 gives a name, 8
gives a layer, and 10, 20 and 30 give the X, Y
and Z of a point.
The pairs are grouped into sections, each opened by 0 SECTION and closed
by 0 ENDSEC: HEADER for drawing settings,
CLASSES, TABLES for layers, line types and styles,
BLOCKS for reusable groups of entities, ENTITIES for the
drawing itself and OBJECTS. The file ends with 0 EOF.
0
SECTION
2
ENTITIES
0
LINE
8
Outline
10
0.0
20
0.0
11
100.0
21
50.0
0
ENDSEC
0
EOF