AXIS: EMC2 Blog
Blog
About AXIS
Get EMC2
Documentation
Translations
ETCH CNC
Developer Homepages:
Chris Radek
Jeff Epler
Related sites:
linuxcnc.org
linuxcnc wiki

« EMC 2.1.3 released | Newest entries | Image-to-gcode improvements: roughing passes, cutting arcs »

After Tom P. manually converted part of a HAL configuration into "dot format" to produce a nice png drawing, I have experimented with doing it automatically by parsing the output of halcmd. Here is the program, as well as some of the results.

The example files show the simulator mill (with check_constraints.hal loaded) and the simulator lathe.

With emc running and halcmd on your PATH, just run net2dot to create a .dot file, or pipe net2dot to dot to render an image:

    $ python net2dot.py > mymachine.dot
    $ python net2dot.py | dot -Tpng > mymachine.png

Update: A new version of net2dot also understands 'linkXX' commands, so it can be used on .hal files in addition to to working from a running hal. It will infer directions from arrows when they are given. Run it like so:

    $ python net2dot.py core_stepper.hal standard_pinout.hal > mill.dot
    $ python net2dot.py core_stepper.hal standard_pinout.hal | dot -Tpng > mill.png

Files currently attached to this page:

sim-mill.svg41.1kB
sim-mill.png55.8kB
sim-mill.dot8.6kB
sim-mill-small.png5.5kB
sim-lathe.svg42.9kB
sim-lathe.png65.1kB
sim-lathe.dot9.6kB
sim-lathe-small.png5.5kB
net2dot.py4.0kB
net2dot-old.py2.8kB



Entry first conceived on 20 March 2007, 21:31 UTC, last modified on 21 March 2007, 12:50 UTC



Copyright © 2004-2009 Jeff Epler
[æ]