## Name

dxf-g — DXF Translator (DXF to BRL-CAD)

## Synopsis

`dxf-g` [-c ] [-d ] [-v ] [-s `scale_factor`] [-t `tolerance`] `file.dxf` `database.g`

## DESCRIPTION

dxf-g converts the specified file.dxf to a BRL-CAD database.g file.

The following options are available:

`-c`

  Only the first color seen for a layer should be used. Without this option, layers may be broken into separate BOT primitives according to color assigned.

`-d`

  Sets a debug flag. The only effect is to cause a core dump on failure. This is probably not useful except for developers.

`-v`

  Produces very verbose output on stderr.

`-s` scale_factor

  Provides a scale factor to be applied to the DXF input. This can be used for DXF files that do not provide units information.

`-t` tolerance

  Specifies the maximum distance (in mm) between two vertices at which the two vertices will be considered to be the same vertex.

The file.dxf file is expected to be in the ASCII Autodesk DXF format as defined in the Autocad 2006 manuals. This converter handles entities of types:

POLYLINE LWPOLYLINE LEADER DIMENSION VERTEX LINE CIRCLE ARC ELLIPSE 3DFACE TEXT MTEXT ATTRIB SOLID SPLINE

The POLYLINE entities in AUTOCAD are actually a container for numerous different entity types. The types of POLYLINE entities converted include:

3D polylines 3D polygon meshes polyface meshes.

SOLID entities are 2D shapes with a solid fill, but this converter does not do any filling. Each layer is converted to a separate object. Colors are also converted.

## EXAMPLE

    $ dxf-g sample.dxf sample.g

## SEE ALSO

http://images.autodesk.com/adsk/files/dxf_format.pdf

## DIAGNOSTICS

Error messages are intended to be self-explanatory.

## AUTHOR

BRL-CAD Team

## COPYRIGHT

This software is Copyright (c) 1993-2013 by the United States Government as represented by U.S. Army Research Laboratory.

## BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to <devs@brlcad.org>.