Axis Modifications

More
11 years 3 weeks ago #63485 by BigJohnT
Axis Modifications was created by BigJohnT
This thread will be a collection of modifications that you can do to Axis. Many involve the .axisrc file. More information about .axisrc is in the manual.

linuxcnc.org/docs/2.7/html/gui/axis.html#_axisrc

Set the default view.
Add this to your .axisrc file
commands.set_view_z()

Change the size of the file open dialog
See bigfileopen.txt for instructions.

Stop the annoying "Do you really want to quit" dialog
Create an .axisrc file in the home directory and place this line in it.

root_window.tk.call("wm","protocol",".","WM_DELETE_WINDOW","destroy .")

or add the above code to a .py file you call in the ini like the file open above.

Why is the "Edit" button disabled in AXIS?
No editor has been specified in the [DISPLAY] section of the ini file.
www.linuxcnc.org/docview/html//config_in...5BDISPLAY%5D-section

How can I specify the size and position of Axis Ubuntu 10.04

Using devilspie
See devilspie.txt for info.

Or directly specifying size and location

Thanks to Dewey for these tips.

To set the size of Axis when it loads up create a file in your home directory called .axisrc and put the following in it, the size is width x height + left offset + top offset.

root_window.tk.call("wm","geometry",".","1200x600")

Or using tk

To have Axis open up at the maximum size for your screen use:

maxgeo=root_window.tk.call("wm","maxsize",".")
fullsize=maxgeo.split(' ')[0] + 'x' + maxgeo.split(' ')[1]
root_window.tk.call("wm","geometry",".",fullsize)

How long will it take to run my file

File/Properties contains the raw run time for the currently loaded g code file. It does not take into account acceleration or deceleration during moves but will give you a general idea.

Please Log in to join the conversation.

More
10 years 8 months ago #70793 by Cheech
Replied by Cheech on topic Axis Modifications
Hi Big John

If we want to edit the source code for Axis Screen, can you point it where it is.

Is there need to compile the code or it gets compiled on the fly?

Thanks

Francisco

Please Log in to join the conversation.

More
10 years 8 months ago #70802 by andypugh
Replied by andypugh on topic Axis Modifications

Cheech wrote: If we want to edit the source code for Axis Screen, can you point it where it is.


Axis is a combination of axis.tcl and axis.py. As I understand it the TCL file sets up the GUI and the Python file defines the behaviour of the GUI.

Both are interpreted rather than compiled, so any changes you make to the files will have immediate effect next time Axis is started.

I think they both end up in usr/bin but you can find them in your system using the "locate" command.

Please Log in to join the conversation.

More
10 years 7 months ago #70843 by timewarp
Replied by timewarp on topic Axis Modifications
If you want to see what can be done check out loboy's axis screen. One of the nicest guis for sure, I only wish it was made available to the public.

Please Log in to join the conversation.

More
10 years 7 months ago #70853 by Cheech
Replied by Cheech on topic Axis Modifications
@timewarp

Thanks for the heads up but I could not find loboy or loboy's or Loboy or Loboy's while searching for the username. Can you put the link of a thread with such screen. Thanks

Please Log in to join the conversation.

More
10 years 7 months ago #70854 by geoffs
Replied by geoffs on topic Axis Modifications

Please Log in to join the conversation.

More
10 years 6 months ago #73467 by Cheech
Replied by Cheech on topic Axis Modifications
HI Andy,

I am studying the axis.py file and I made modifications to it but I have an acess privilege problem and Debian won't let me update it :)

Do you know how I can set the usr/bin to read and write, or better, how come I am not the admin because I am definitely the owner of the system :) The owner of the usr folder is set to root(root) according to the File Manager/Properties.

Cheers,
Francisco

Please Log in to join the conversation.

More
10 years 6 months ago #73469 by andypugh
Replied by andypugh on topic Axis Modifications

Cheech wrote: I am studying the axis.py file and I made modifications to it but I have an acess privilege problem and Debian won't let me update it


You need to open the editor with admin privileges.

So, in a terminal, use "sudo gedit" or "sudo mousepad" (or, depending on taste, sudo vi, sudo nano etc)

If you have already made the changes, then save the axis.py somewhere in your own folder, then move it to the required location
Code:
sudo mv ~/..../axis.py /usr/..../axis.py
(don't type the ellipses. of course, those are placeholders for the actual paths on your machine)

Please Log in to join the conversation.

More
10 years 4 months ago #76857 by kentavv
Replied by kentavv on topic Axis Modifications
With LinuxCNC 2.7.4 (Debian Wheezy), the above maximize code was an improvement, but didn't fully maximize the Axis screen, which was shifted down and to the right.

I had better luck with the following, where tb_h is the height of the window manager's toolbar. But this also didn't actually maximize Axis like the maximize button does.

Code:
tb_h = 32 root = root_window w, h = root.winfo_screenwidth(), root.winfo_screenheight() - tb_h*2.5 root.geometry("%dx%d+%d+%d" % (w, h, 0, tb_h))

The following seems to work well. It makes Axis fullscreen, which also hides the window manager's toolbar (less distraction and more space for Axis). While this may prevent getting back to the toolbar without closing axis, if a terminal is left open, and sessions are saved, alt-tab will get you back. There's probably some other shortcut as well.

Code:
root_window.attributes('-fullscreen', True)

Full disclaimer: I know nothing about Tk... this is just what seemed to work well for me. Hope others find it useful.

Please Log in to join the conversation.

More
10 years 2 months ago #79729 by dgarrett
Replied by dgarrett on topic Axis Modifications
Recent python/tkinter may report maxgeo as a tuple
Code:
maxgeo=root_window.tk.call("wm","maxsize",".") print "maxgeo=",maxgeo,type(maxgeo) if type(maxgeo) == tuple: fullsize=str(maxgeo[0]) + "x" + str(maxgeo[1]) else: fullsize=maxgeo.split(' ')[0] + 'x' + maxgeo.split(' ')[1] root_window.tk.call("wm","geometry",".",fullsize)

Please Log in to join the conversation.

Time to create page: 0.188 seconds
Powered by Kunena Forum