Generic Probing tab
03 Apr 2015 15:06 #57472
by newbynobi
Replied by newbynobi on topic Generic Probing tab
@Anthony,
I completely agree!
Norbert
I completely agree!
Norbert
Please Log in or Create an account to join the conversation.
03 Apr 2015 16:17 #57475
by andypugh
That wasn't the game I was playing. I was trying to see if it was possible to keep the whole thing as one file. I was disappointed when I found that I needed two, one for the python and one for the graphics.
The normal way would be to have a Python handler file, a graphics file and an ngc file for every button, all linked by a Glade file. I wanted to avoid that level of "clutter" and the associated scope for files to not be found.
(Incidentally, in MacOS this would be less of a concern as executables are "bundles' that can contain all the resource files they need)
It is trivial to create a set of buttons that call ngc subs in Glade. I was playing about with something that seemed more interesting.
Replied by andypugh on topic Generic Probing tab
would it be best to call ngc file subroutines for each probe event instead of embedding it into the software.
That wasn't the game I was playing. I was trying to see if it was possible to keep the whole thing as one file. I was disappointed when I found that I needed two, one for the python and one for the graphics.
The normal way would be to have a Python handler file, a graphics file and an ngc file for every button, all linked by a Glade file. I wanted to avoid that level of "clutter" and the associated scope for files to not be found.
(Incidentally, in MacOS this would be less of a concern as executables are "bundles' that can contain all the resource files they need)
It is trivial to create a set of buttons that call ngc subs in Glade. I was playing about with something that seemed more interesting.
Please Log in or Create an account to join the conversation.
03 Apr 2015 19:56 #57487
by newbynobi
Replied by newbynobi on topic Generic Probing tab
Andy,
Both is posible!
You do not need a glade file, it is just a little bit more coding. As example you can check out my hal widgets "combi_dro" and "iconview", both do have a pygtk surface and only one file! In the case of the ha widgets i follow exactly your comments.
So add a parameter to the call, as --use-extern-files and switch that way from your internal code to user code.
Neverthereless i like the way linuxcnc features is handling this. It is quiet easy to modify the on board code, just editing some ini files. Have you taken a look at the code?
Norbert
Both is posible!
You do not need a glade file, it is just a little bit more coding. As example you can check out my hal widgets "combi_dro" and "iconview", both do have a pygtk surface and only one file! In the case of the ha widgets i follow exactly your comments.
So add a parameter to the call, as --use-extern-files and switch that way from your internal code to user code.
Neverthereless i like the way linuxcnc features is handling this. It is quiet easy to modify the on board code, just editing some ini files. Have you taken a look at the code?
Norbert
Please Log in or Create an account to join the conversation.
04 Apr 2015 15:47 #57514
by andypugh
It isn't actually any harder to edit G-code embedded in a Python file than it is to edit G-code in any other file. As Python is interpreted the changes take effect just as easily.
Not yet, I am a long way from a LinuxCNC machine at the moment.
Replied by andypugh on topic Generic Probing tab
So add a parameter to the call, as --use-extern-files and switch that way from your internal code to user code.
It isn't actually any harder to edit G-code embedded in a Python file than it is to edit G-code in any other file. As Python is interpreted the changes take effect just as easily.
Neverthereless i like the way linuxcnc features is handling this. It is quiet easy to modify the on board code, just editing some ini files. Have you taken a look at the code?
Not yet, I am a long way from a LinuxCNC machine at the moment.
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds