CAD Drawing Scheme
See AutoCAD™ DXF documentation: http://images.autodesk.com/adsk/files/autocad_2014_pdf_dxf_reference_enu.pdf
The structure of kernel CAD Import VCL classes is similar to Autodesk DXF structure. If you need to work with the structure of DWG or DXF drawings we suggest studying this format a little.
DXF files are standard ASCII text files. They are easily translated to other CAD system formats or are submitted to other programs for direct processing. A Drawing Interchange File is an ASCII text file with the .DXF
file extension and specially formatted text. This is analogous to the ASCII .RTF
(Rich Text Format) published by Microsoft for exchange of binary Word document (.DOC
) files. The overall organization of a DXF file is as follows:
- The
HEADER
section contains general information about the drawing. It consists of the drawing's database version number and the number of system variables. Each parameter contains a variable name and an associated value. - The
CLASSES
section holds the information for application defined classes, whose instances are in theBLOCKS
,ENTITIES
, andOBJECTS
sections. A class definition is eminently fixed in the class hierarchy. - The
TABLES
section contains definitions for the following symbol tables:- Linetype table (
LTYPE
) - Layer table (
LAYER
) - Text style table (
STYLE
) - View table (
VIEW
) - User Coordinate System table (
UCS
) - Viewport configuration table (
VPORT
) - Dimension Style table (
DIMSTYLE
) - Application Identification table (
APPID
) - Block Record table (
BLOCK_RECORD
)
- Linetype table (
- The
BLOCKS
section contains block definition and drawing entities that make up each block reference in the drawing. - The
ENTITIES
section contains the graphical objects (entities) in the drawing, including block references (insert entities). - The
OBJECTS
section contains the non-graphical objects in the drawing. All objects that are not entities or symbol table records or symbol tables are stored in this section. Examples of entries in the OBJECTS section are dictionaries that contain mline styles and groups. - A DXF file is composed of many groups, each of which occupies two lines in the DXF file. The first line is a group code. The second line is the group value, in a format that depends on the type of group specified by the group code.