You are here: Menu Commands > File > Import > DXF file to a string/DTM file
GEOVIA Surpac

Import DXF file to a string/DTM file

You can convert .dxf files from CAD systems into .str files, and in certain cases, DTM solids.

To run this function: Choose File > Import > DXF file to a string/DTM file, or...

  • In the Function Chooser, type DXF TO STR, and press ENTER.

DXF files typically contain large volumes of data that is of no relevance to the creation of Strings and DTMs. Drawing entities, that is POLYLINES, CIRCLES, etc. will only be converted from these sections. When you are importing .dxf files, you can choose whether to convert data from the entities, blocks or both sections at your discretion.

This function permits data to be imported from either the ENTITIES or the BLOCKS sections, or both, at your discretion.

At this time, named drawing entities in the BLOCKS section will only be included in the resultant .str file once, that is, it will only appear in the string file as a direct result of its definition in the BLOCKS section. Any references to the named drawing item in the ENTITIES section WILL NOT be presented in the string file that is created.

Data from the header and tables sections of the .dxf file are ignored. Line, arc, circle, polyline, point and text entity commands are converted to strings. Data from 3DFACE entity commands will be converted into Surpac solids.

Define the DXF files to convert

A range of files can be converted. The Location and ID range to be converted must be entered.

DXF Section

The data to be imported is found in the ENTITIES of correctly formatted DXF files. It is not uncommon to find the data to be imported in the BLOCKS section of incorrectly formatted DXF files.

Choose the section/s from which the data is to be imported:

  • entities - To import data from the ENTITIES section only.
  • blocks - To import data from the BLOCKS section only.
  • entities & blocks - To import data from the ENTITIES and BLOCKS sections.

Arc segment length (% radius)

The string segment lengths on the converted circle and arc drawing entities are set by you. If a .dxf arc is shorter than your defined segment length, then the arc is written as a straight line (one segment).

The arc length is defined as a percentage of the arc or circle radius. This permits a consistent number of points to be used to represent circles regardless of the circle radius. A value of 10% for the arc segment length results in 10 points for a full circle.

Larger values for the arc length percentage result in fewer points for curves and arcs while smaller values result in more points for curves and arcs.

Minimum circle radius

A circle is written as a closed segment if its radius is greater than your defined minimum radius. If it is less, then it is written as a point (the coordinates being the circle centre). The radius of the circle is stored in the D2 field. A circle can be represented as a minimum of three segments (a triangle).

Result

Y, X and Z fields from the .dxf file are chopped to three decimal places.

The string numbers which are used for the converted data are assigned by using the following table:

DXF Feature String Number

 

3D FACE 1

 

3DLINE or LINE 2

 

3DPOLY or POLYLINE 3

 

ARC 4

 

CIRCLE 5

 

CIRCLE CENTRE POINTS 6 Only used if the radius of the circle is less than the minimum circle radius entered.
POINT 7

 

TEXT 8

 

In addition to the table shown above you must add a constant as each layer will have these features separated from other layers. Thus, string 1 contains 3DFACEs from the first layer, string 2 contains 3DLINEs from the first layer while string 11 contains 3DFACEs from the second layer and string 12 contains 3DLINEs from the second layer and so on.

3DFACE entity commands are used to create a Surpac solid or DTM. All points for the solid are contained in the string number as defined above. The solid will have an object number the same as the string, and will always be trisolation 1. The .dtm file created will have the same name and location as the output string file.

The D1 field of each point in the resultant string file will contain the name of the layer that contained the line, text, etc. in the DXF file.

Text items found in the DXF file have the text angle placed in the Z field of the string file point with the text string in the D2 field of the string file point.

Circles that have a radius smaller than the minimum circle radius have the circle radius placed in the D2 field of the string file point that represents that circle.