Arduino Forum

Topics => Education and Teaching => Topic started by: sanpreet on Jul 25, 2013, 01:34 pm

Title: Structure Of DXF File Format
Post by: sanpreet on Jul 25, 2013, 01:34 pm
If anybody want to learn the File Structure of DXF File read this

Talking about the dxf file AutoCAD DXF (Drawing Interchange Format, or Drawing Exchange Format) is a CAD data file format developed by Autodesk for enabling data interoperability between AutoCAD and other programs. DXF was originally introduced in December 1982 as part of AutoCAD 1.0

Structure of DXF File Format

A.) HEADER Section - General information about the drawing. Each parameter has a variable name and an associated value. Example of Header FIle is

Beginning of HEADER section
  0                               //Group code
SECTION                   //Label
  2                               //Group code
HEADER                    //Label

Repeats for each header variable
9                             //Group code
$<variable>            //Name of Variable
<group code>         //Group code for every Variable
<value>                  //Value of Variable

End of HEADER section 
  0                            //Group code
ENDSEC                // End of header section

B.) Class Section- Holds the information for application-defined classes whose instances appear in the BLOCKS, ENTITIES, and OBJECTS sections of the database. Generally does not provide sufficient information to allow interoperability with other programs. Example of Header FIle is

Beginning of CLASSES section
0                                        // Group code and its Description is Identifies beginning of  a CLASS record.
SECTION                             // Label
2                                         //Group code and its Description is  Name of class

Repeats for each entry
  1                                     //Class DXF record name. These should always be unique.
<class dxf record>
<class name>
  3                                     //Application name
<app name>
90                                     //Proxy capabilities flag.
280                                   //proxy flag
281                                   //entity flag

End of CLASSES section

So in the class Section Flags are Used.

C.) TABLES section - This section contains definitions of named items like
Application ID (APPID) tableBlock Record (BLOCK_RECORD) tableDimension Style (DIMSTYPE) tableLayer (LAYER) tableLinetype (LTYPE) tableText style (STYLE) tableUser Coordinate System (UCS) tableView (VIEW) tableViewport configuration (VPORT) table


Beginning of TABLES section
0                                      // Starting
SECTION                          //Label
  2                                     // Tab;e

Common table group codes,
repeats for each entry
<table type>
  5                              //handle
70                            //maximum number of table entries that may follow.
<max. entries>

Table entry data, repeats,
for each table record
<table type>
. <data>

End of table

End of TABLES section

D.) BLOCKS section - This section contains Block Definition entities describing the entities comprising each Block in the drawing.

E.) ENTITIES section - This section contains the drawing entities,

F.) OBJECTS section - Contains the data that apply to nongraphical objects,

G.) THUMBNAILIMAGE section - Contains the preview image for the DXF file.
Title: Re: Structure Of DXF File Format
Post by: robtillaart on Jul 25, 2013, 09:19 pm
What is the relation with Arduino?
Did you use DXF in a project?
Please tell more!
Title: Re: Structure Of DXF File Format
Post by: piro on Aug 01, 2013, 10:56 am
is it possible to extract (in an easy way) the data of a drawing. For example just the coordinates of the points

It can be precious for an Arduino CNC