On the understanding of the DXF format of CAD files

Source: Internet
Author: User

DXF files describe graphical data in the form of a document. You can open a DXF-formatted file by using WordPad.

The DXF file is divided into the following segment numbers

The format of each segment is as follows:

0
Section
2
HEADER

The most important of these are entity segments (entities)

This section contains data for all the graphs, such as line, ARC, CIRCLE, point, and so on. The methods described are:

such as line segments:

0
Line
5
19
330
3 A
100
Acdbentity
8
0
100
Acdbline
10
55.0
20
33.0
30
0.0
11
55.0
21st
7.0
31
0.0

Mainly look at the data below the Acdbline, 10 the following data represents the x-coordinate of the starting point, 20 the data below represents the y-coordinate of the starting point, and 30 the data below represents the z-coordinate of the starting point. 11 The following data represents the x-coordinate of the end point, 21 the following data represents the y-coordinate of the end point, and 31 the data below represents the z-coordinate of the end point. For a straight line, the coordinates of the starting and ending points are determined, and the line is determined.

Another example is the circle:

0
CIRCLE
5
19
330
3D
100
Acdbentity
8
0
100
Acdbcircle
10
40.0
20
20.0
30
0.0
40
12.8062484748657

The main still look at the section below the Acdbcircle, where 10, 20, 30 The following data represents the circle center coordinate, 40 the following data represents the radius of the circle, with the center and radius, then the circle is also determined.

And like an arc.

0
ARC
5
1E
330
3D
100
Acdbentity
8
0
100
Acdbcircle
10
20.0
20
33.0
30
0.0
40
43.60045871318328
100
Acdbarc
50
0.0961209608856947
51
23.02549200852804

Also to see the acdbcircle the following data, 10, 20, 30 The following data represents the center coordinate of the arc, 40 the following data represents the radius length of the arc, 50 represents the angle at which the arc begins, and 51 represents the angle at which the arc ends. So the arc is OK.

The graph of the DXF file of my example is as follows: (with QCad casually painted)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.