DXF file format to understand

All file formats have a specification that describes the encoding information file - byte-aligned manner, computer files, and so how to load.
DXF file format is a vector graphics file format, which specifies how to represent different graphical elements.
DXF file is a vector graphics, it captures all of the elements of the CAD graphics, such as text, lines, and shapes. More importantly, DXF file for exchanging graphics data between the CAD application transfer.
Then, for each CAD program will interpret this set of instructions, and copy your vector.
Its creator AutoDesk has released these official documents specification documents, which defines the syntax (or a set of rules) the definition of DXF files.
In this article, I will introduce the basic settings and specifications DXF files.
Using the group code and data representing the value of
the DXF file are associated with each variable in a group code associated with (code group range from 1 to 1071).
Each code group used in specific circumstances, and with a certain type of information.
For example, two set of codes for names, such as the name or the name of the block sections.
Group Code 0 indicates the beginning or end of the file entity.
Each variable value stored is associated with an integer, float or string. For example, the storage line length is an integer, and the point coordinates are stored as floating point numbers.
File structure
DXF file is divided into several portions : each portion by the recording composition, and is recorded from the data values and codes associated components.
You can find the following section in the DXF file in the following order:

section The basic description
Header This section contains general information about the pattern. Like your phone "Settings" function, as the value of the function that contains graphics associated with the different variables and their associated. For example, the "title" will define AutoCAD version ($ ACADVER variable) or a unit of measurement of the angle of the file (the AUNITS $ variable) used in the DXF file.
Classes Saving information about the application-defined classes CLASSES portion, instances of these classes appears BLOCKS, ENTITIES, and OBJECTS portion of the database.
Tables This section defines several different tables, each table entry contains a number of different symbols. For example, a linear table (LTYPE) styles defined in a DXF file dashes, dots, text and symbols and their scaling. Here is the complete list of tables found in this section:
  • Application ID (APPID)
  • Table block recording (BLOCK_RECORD)
  • Table size style (DIMSTYPE)
  • Layers Table (LAYER)
  • Table line (LTYPE)
  • Table text style (STYLE)
  • Forms User Coordinate System (UCS)
  • Table View (VIEW)
  • Table viewport configuration (VPORT is) table
Blocks This section contains the configuration of each block pattern drawing objects and graphics entity reference.
Entities This section contains graphics actual object data and graphics entity . This raw data may include, for example, by the thickness of the entity is a circle, the center point, and the radius defined by the stretching direction.
Objects Here you will find non-graphic parts of the drawing. For example, AutoCAD dictionary is stored here.

 

 

 

 

 

 

 

 

 

 

 

 

 

 














DXF file walkthrough
assume that we are a computer, and then with "read" a DXF file. In fact, you can use any text editor (such as Notepad) to open the DXF file, and the information will be displayed in this way.

The following diagram describes the interfaces DXF data parsing process, reference is https://www.cnblogs.com/xyb930826/p/4493373.html

DXF文件格式是开源文件格式!这意味着,每位希望读取或写入DXF文件的开发人员均可免费在线获取官方DXF规范文档
DXF文件的开放性使其成为CAD世界中如此受广泛支持的图形文件。
关于版本
DXF文件规范因版本而异。每个发行版中都进行了微小的更改,例如添加了新类型的图形元素和组代码。
较新的程序通常可以读取较旧的文件,而较旧的程序则不能读取较新的文件。
例如,一个AutoCAD 2010用户可以读取2006 DXF文件,但不能读取2012 DXF文件。
这些频繁的更新可能会导致兼容性问题。如果您在读取DXF文件时遇到错误,则可能是编写该特定DXF文件的程序使用了较旧的规范文档。
某些应用程序还会跳过不支持的功能-请注意,导出和导入DXF文件时不要丢失任何信息!

确实,DXF文件格式是一种难以解释的格式,主要是因为它包含了许多不同类型的数据。
但是,它的结构使得开发人员和程序可以阅读他们需要的部分,并跳过他们不需要的元素。

关于DXF文件大小
简而言之,因为它们是矢量文件,并且矢量由一系列有关如何创建最终图像的数学指令组成,例如一条线,两个X坐标横越三个Y坐标向下。
使用渲染应用程序和CAD软件,可以多次绘制这些图像。
您还可以在图形中编辑单个元素,因为每个元素都保存在单独的图层中。
矢量文件的大小保持不变,而不管图形的最终大小如何。更好的是,可以扩大矢量文件而不会降低质量。
您经常会发现将公司徽标,剪贴画,字体和地图等图像保存为矢量文件。
但是,矢量图形文件的大小取决于复杂程度。如果图形中有很多“对象”,则将需要更多的数学算法来渲染此图像。

DXF文件格式是开源的CAD数据文件格式。这意味着文件规范的源代码已发布,任何人都可以使用。
DXF文件格式由AutoDesk维护,后者每几年发布一次新版本。
DXF的开放源代码性质使几乎每个CAD程序都可以支持它

关于DXF文件的导入导出
每次DXF导出都会降低数据质量
某些CAD程序可能会在跳过不支持的功能时读取DXF文件。这可能会导致用户丢失信息的方式丢失信息。
一旦数据丢失,就很难再次恢复数据质量。
您应注意以下几个情况:

  • DXF文件格式不能处理颜色或线条样式;而是保存“笔号”。如果您将数据导入DXF格式,则DXF文件的外观将永远与原始数据完全不同。
  • DXF文件无法处理样条,样条是没有定义半径的复杂曲线。导入数据时,样条线将分为许多短的直线。
  • 旋转,移动和缩放比例会影响DXF导入/导出的准确性。

因此,将单独的图形文件导出为DXF时应格外小心。如果要将图像或PDF转换为DXF,请务必查看有关转换DXF文件的部分,以了解如何获得最佳质量的转换。

总结
因此,如果您是喜欢使用与AutoCAD不同的软件,则DXF文件格式是理想的解决方案-您将很难找到不支持它的CAD软件包。
如果要与他人共享CAD文件,并且不确定他们是否具有AutoCAD,则最好发送DXF。
与DWG不同,DXF不是二进制文件,它们由字母和数字组成,因此您面临的文件更大。
此外,它们不支持AutoCAD的某些特定CAD元素,例如动态块。
因此,在AutoCAD等程序中打开DXF时,您可能会丢失数据。

Guess you like

Origin www.cnblogs.com/MakeView660/p/12341337.html