Welcome to my DXF-parser project!

You can download here a little visual-basic utility that I have written recently.

It is a DXF-file parser that shows the graphical data and generates g-code for CNC-machining

At the moment it's only a start but still working somehow.

What is supported in the DXF-file:

  • POLYLINE, with closed-line flag and bulge segments
  • LINE
  • ARC and CIRCLE
  • 3DFACE is supported only rudimentally as drawing in 2D
  • TEXT is displayed but not scaled or rotated
G-code is only generated from POLYLINE, LINE ad ARC entities.
These tags are supported only in 2D, Z is ignored (or if you prefer everything is projected on the XY-plane)
Blocks are unsupported.
Also layers, line types and width, colors... are ignored.
You can copy the graphical data as drawn in the picture-box to the clipboard for future use (as bitmap).
The file has to be in the ASCII format.
All other tags are not supported

  

DXF_vb.Zip (38 KBytes, source-code & binary*)
This is an older simpler version.

  

DXF_vb_tre.Zip (56 KBytes, source-code & binary*)
This is an improved version with a treeview of the DXF-structure, still slow, and limited by the treeview control to 65535 nodes.
Could be still useful to have a look at the DXF file in a structured manner.

  

DXF_vb_arr.Zip (65 KBytes, source-code & binary*)
This is an improved version without the treeview (so no nodes limit).
A little faster by using arrays to store the collected data.
Limited layer support (different colors), autoscales to fit drawing in picture.
With some effort usable CNC-Gcode programs for wirecut-machines can be generated from DXF-files.
This is still work in progress, so come back from time to time if you find it useful.

  

DXF_PARSER_17 (65 KBytes, source-code & binary*)
Same as before, with 2 small corrections (Thanks to R.Schirrich for the feedback and the DXF-files which showed me the problem).

  

* If you don't have VB6 installed you'll may need the VB runtime environment (MSVBVM6.DLL & co): if you don't have those files, try this zipped install (2.9 MBytes)

I have written this application once to generate a program from an image for an agie-wire-machine. (The file you'll get is a simple 2-axis file without taper). For this particular application it worked...
The DXF-file must already contain a single Polyline to generate an usable ISO-file for agie machines (Agie accept only one G00 at the beginning of the file).
Maybe in the future I'll improve here and there, but anyway, if you find the program useful I would be glad of an !

This software comes as it is, .. and so on.

DXF sample files

Those files have not been generated by a CAD application but by "hand", so the may not be 100% standard, but the have done a good job for testing polylines and bulge segments.
(to tell the truth autocad can't read them because the handle-tag is missing).

DXF.ZIP (32 KBytes) Contains following files:
ch.dxf: border of switzerland
bulge05.dxf: an octagon with small extern arcs (Bulge=0.5)
bulge-05.dxf: an octagon with small intern arcs (Bulge=-0.5)
bulge2.dxf: an octagon with big extern arcs (Bulge=2)
bulge-2.dxf: an octagon with big intern arcs (Bulge=-2)

If you have a particular DXF-files who makes trouble please send it to me, maybe I can get out why and improve this simple application!

Back to the index

external links:

Davide Libenzi homepage: Ras2Vec
Raster to vector conversion program for Windows 95/98/NT that takes 1 bit x pixel BMP or TIFF images and emit HPGL, DXF, EMF or TXT files. Now complete with GPL C source code.

Autotrace
Raster to vector conversion program on autotrace.sourceforge.net

Autodesk DXF™ Reference The format specification for the ascii-DXF file format.
If the link doesn't work go to the autodesk site and browse to product information / documentation.

©