Difference between revisions of "DXF"

From DIDEAS Wiki
Jump to: navigation, search
m (Created page with " *[http://images.autodesk.com/adsk/files/acad_dxf0.pdf | AUTO DESK dxf spec (PDF)] *DXF files have a curious mix of group codes followed by values / attributes *every command / ...")
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{public_projects}}
  
*[http://images.autodesk.com/adsk/files/acad_dxf0.pdf | AUTO DESK dxf spec (PDF)]
+
*[http://images.autodesk.com/adsk/files/acad_dxf0.pdf AUTO DESK dxf spec (PDF)]
  
 
*DXF files have a curious mix of group codes followed by values / attributes
 
*DXF files have a curious mix of group codes followed by values / attributes
Line 6: Line 7:
 
*The group code 0 sets off a command (or entity type, etc.)
 
*The group code 0 sets off a command (or entity type, etc.)
  
*here is an example header section with a comment (note header section is not required. )<pre>
+
*here is an example header section with a comment (note header section is not required. )
 +
<pre>
 
   0
 
   0
 
SECTION
 
SECTION

Latest revision as of 14:24, 22 February 2011

Main Page Projects

  • DXF files have a curious mix of group codes followed by values / attributes
  • every command / attribute is preceded by a number called a group code that below is intended (indentation probably not required)
  • The group code 0 sets off a command (or entity type, etc.)
  • here is an example header section with a comment (note header section is not required. )
  0
SECTION
  2
HEADER
  999
this is a comment.
  0
ENDSEC
  • The entities section is where drawing elements are placed
  • There are several entity types such as line, arc, circle that are easy to use as show below.
  • The key is that following the entity type is group code 8 which specifies the layer name. It is non-optional! What is placed in the layer name seems to not matter at least until the DXF is used by another application. Probably want to group the output using the layer name.
  • The group code 10,20 specify the initial X,Y coordinates
  • The group code 11,21 specify the final X,Y coordinates
  • Group code 62 specifies the line color
 0
SECTION
 2
ENTITIES
 0
LINE
 8
LAYER_NAME
 10
1.9456451613
 20
3.6438548387
 11
0.9456451613
 21
3.3289693701
  0
LINE
  8
0
 62
4
 10
2.9456451613
 20
2.6438548387
 11
1.9456451613
 21
3.3289693701
  0
ENDSEC
  0
EOF