README file for rs274py, a set of rs274 tools for Python
Copyright 2004 Jeff Epler <jepler@unpythonic.net>

rs274py's home page is
    http://craie.unpy.net/rs274py/
The current CVS tree can be viewed at
    http://unpy.net/cgi-bin/viewcvs.cgi/rs274py/
though it may be integrated into the emc2 tree at some future time.

rs274py only does 2 of the canned cycles and has other notable deficiencies (no
tool width compensation, for instance), but it is a near-complete parser and
partial interpreter for the rs274ngc language based on the description at
    http://www.linuxcnc.org/handbook/RS274NGC_3/RS274NGC_3TOC.html

pyemc is a front-end for emc with file display and live preview.  So far, only
a few functions work.  Use it by making a symlink from your plat/XXX/bin
directory to /usr/bin/pyemc, and specifing "pyemc" as the DISPLAY= in your
inifile.  Here's what does work:
    F1, F2 (estop/on/off), F3 (display manual tab), F5 (display mdi tab)
    Entering commands in MDI
    O (open), R (run)
    display of loaded file
    display of live plot
    display-related toolbar buttons
Here's what's broken, and I don't know why:
    button state
The rest isn't implemented yet, but the code in pyemc.py is coming along nicely


gplot is a rs274ngc viewer and live plot viewer.
Usage: "gplot [-d nmlfile] ngcfile"
Navigation:
    Left click              Select g-code under pointer
    Left drag               Translate
    Middle drag             Free rotate
    Right drag              Zoom
    Mouse wheel             Zoom

    C                       Clear live plot list
    X, Y, Z                 Orthographic projection looking along axis
    Shift-Z                 Orthographic projection looking along Z, "landscape"
    Space                   Default perspective projection
    O                       Toggle perspective/orthographic

    Up/Down                 Select next/previous line of g-code

Python 2.2 or newer and PyOpenGL are required.  Hardware accelerated OpenGL
is nice, but not required.  BLT is required for pyemc.

Installation on RedHat or Fedora should be something like:
    $ env PLAT=xxx EMCSOURCEDIR=yyy python setup.py bdist_rpm
    $ sudo rpm -ivh dist/rs274*.i386.rpm
    $ gplot examples/joy.out
and installation on non-RPM systems should use "python setup.py install"
EMCSOURCEDIR is the directory where the "emc" and "rcslib" reside, and PLAT is
the same as you use to build the non-realtime portion of emc.

If you want to view a live plot, first start emc, then start gplot.  It should
guess the path to emc.nml, but if not, give the path as the -d argument
    $ gplot -d /usr/src/emc/emc.nml file.ngc
The path of the machine will be plotted in red over file.ngc, with a cone
showing the controlled point.





This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Portions of the program, located in the "thirdparty" subdirectory of the
source distribution, are covered by other licenses.  Please see those
files for details.
