Axis Modifications
06 Oct 2015 17:48 - 07 Apr 2016 14:52 #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.
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.
Last edit: 07 Apr 2016 14:52 by BigJohnT.
Please Log in or Create an account to join the conversation.
29 Feb 2016 04:33 #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
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 or Create an account to join the conversation.
29 Feb 2016 11:32 #70802
by andypugh
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.
Replied by andypugh on topic Axis Modifications
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.
The following user(s) said Thank You: Cheech
Please Log in or Create an account to join the conversation.
01 Mar 2016 03:49 #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.
The following user(s) said Thank You: Cheech
Please Log in or Create an account to join the conversation.
01 Mar 2016 10:46 #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
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 or Create an account to join the conversation.
01 Mar 2016 11:15 #70854
by geoffs
Replied by geoffs on topic Axis Modifications
I think he's referring to this thread:
forum.linuxcnc.org/forum/41-guis/16426-c...lors-in-the-axis-gui
forum.linuxcnc.org/forum/41-guis/16426-c...lors-in-the-axis-gui
The following user(s) said Thank You: Cheech
Please Log in or Create an account to join the conversation.
17 Apr 2016 10:43 #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
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 or Create an account to join the conversation.
17 Apr 2016 11:36 - 17 Apr 2016 11:39 #73469
by andypugh
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(don't type the ellipses. of course, those are placeholders for the actual paths on your machine)
Replied by andypugh on topic Axis Modifications
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
sudo mv ~/..../axis.py /usr/..../axis.py
Last edit: 17 Apr 2016 11:39 by andypugh.
Please Log in or Create an account to join the conversation.
30 Jun 2016 16:41 - 30 Jun 2016 16:43 #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.
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.
Full disclaimer: I know nothing about Tk... this is just what seemed to work well for me. Hope others find it useful.
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.
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.
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.
Last edit: 30 Jun 2016 16:43 by kentavv. Reason: Added code tags
The following user(s) said Thank You: Cheech
Please Log in or Create an account to join the conversation.
30 Aug 2016 16:52 #79729
by dgarrett
Replied by dgarrett on topic Axis Modifications
Recent python/tkinter may report maxgeo as a tuple
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 or Create an account to join the conversation.
Time to create page: 0.091 seconds