Here is how you can customize axis in emc 2.2 to reverse the meaning of
the up and down arrow keys for a lathe:

Open up a terminal window and type this:
    gedit ~/.axisrc

In the editor window that appears, type this line exactly as shown.  Do
not include any leading whitespace:

if lathe: bind_axis("Down", "Up", 0)

Now hit the save icon, close the editor window, and then close the
terminal.

If you copy and paste this much larger block into your ~/.axisrc file,
it will also flip the view upside down (you have to be very careful to keep the
leading spaces where they are shown and not adding extra ones where they are 
not):

# --- cut here ---
if lathe:
    bind_axis("Down", "Up", 0)
    def set_view_y(event=None):
        widgets.view_z.configure(relief="link")
        widgets.view_z2.configure(relief="link")
        widgets.view_x.configure(relief="link")
        widgets.view_y.configure(relief="sunken")
        widgets.view_p.configure(relief="link")
        vars.view_type.set(4)
        o.reset()
        glRotatef(90, 1, 0, 0)
        glRotatef(90, 0, 1, 0)
        if o.g:
            mid = [(a+b)/2 for a, b in zip(o.g.max_extents, o.g.min_extents)]
            glTranslatef(-mid[0], -mid[1], -mid[2])
            size = [(a-b) for a, b in zip(o.g.max_extents, o.g.min_extents)]
            o.set_eyepoint_from_extents(size[0], size[2])
        else:
            o.set_eyepoint(5.)
        o.perspective = False
        o.lat = -90
        o.lon = 0
        o.tkRedraw()
        
    TclCommands.set_view_y = commands.set_view_y = set_view_y
    root_window.bind("v", commands.set_view_y)
    root_window.after_idle(commands.set_view_y)
# --- cut here ---
(I've also uploaded this file to
http://emergent.unpy.net/files/sandbox/axisrc
you could instead download that file and use the terminal to rename it
to ~/.axisrc if cut and paste doesn't work for you)

under light testing this seemed to do what you are asking for.

Jeff

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to