Lathe Macros

More
07 Dec 2016 10:47 - 07 Dec 2016 10:49 #83737 by newbynobi
Replied by newbynobi on topic Lathe Macros
Hallo Andy,

I checked the glade file, the buttons are set to be visible on each tab.
I tried to step gladevcp.cycle-start 1

No success, or better no action happened.
Maybe because if self.active check will break further excecution. Halshow window is activ at that moment.

Norbert
Last edit: 07 Dec 2016 10:49 by newbynobi.

Please Log in or Create an account to join the conversation.

More
07 Dec 2016 11:27 #83738 by andypugh
Replied by andypugh on topic Lathe Macros

Maybe because if self.active check will break further excecution.


The tab needs Gmoaccapy to tell it that it is active (see the patch for Touchy to make this work).
We added code to GladeVCP to respond to messages from the host GUI, but so far only Touchy knows how to send that message.

This shouldn't be a problem for the "Play" buttons, they don't test for active, but it may be that the Play buttons need a toplevel adding so that they appear above the image.

The image background really wasn't easy to make work. It is easy to do with a GTKFixed, but then the image doesn't resize with the window, and the controls stay in their fixed position.

Maybe you know ways round this? I found pygtk painful to use, and there seems to be no support, anywhere.

Please Log in or Create an account to join the conversation.

More
08 Dec 2016 05:00 #83770 by ZincBoy
Replied by ZincBoy on topic Lathe Macros
So I got it mostly working. The start button still doesn't show up, but pressing where it should be starts the macro anyway. Good enough for now :)

I had to change the following to get things working:
1. Install the python-rsvg package. Fixed both the images and the number entry dialog showing up.
2. Move the .ngc files to the Gmoccapy /macros folder. Without this I got a "file not loaded" error when pressing start.
3. Back-port the G96 fix to the LinuxCNC 2.7.8 version of Gmoccapy. Without this, CSS did not work. Just needed to change line 2893 from "== linuxcnc.MODE_AUTO:" to "!=linuxcnc.MODE_MANUAL:" in /usr/bin/gmoccapy

I am running inch units so I need to change some of the settings in the .ngc files but that is not too hard.

Thank you Andy and Norbert for the suggestions!

Please Log in or Create an account to join the conversation.

More
08 Dec 2016 09:59 #83771 by andypugh
Replied by andypugh on topic Lathe Macros

So I got it mostly working. The start button still doesn't show up, but pressing where it should be starts the macro anyway.


That's possibly a good sign, as it means that GTK does at least think it is there.

The answer might be to open the UI in Glade, right-click on the button (not the icon, or the table, but the actual button) and select "Add parent". You need something with a "Window" and EventBox counts. If you look at the lathemacro.ui file witha text editor you will see that I had to wrap the other buttons in eventboxes to make them show in the GUI. (Look at line 896 for an example)

Please Log in or Create an account to join the conversation.

More
09 Dec 2016 03:52 #83823 by ZincBoy
Replied by ZincBoy on topic Lathe Macros

The answer might be to open the UI in Glade, right-click on the button (not the icon, or the table, but the actual button) and select "Add parent". You need something with a "Window" and EventBox counts. If you look at the lathemacro.ui file witha text editor you will see that I had to wrap the other buttons in eventboxes to make them show in the GUI. (Look at line 896 for an example)


This worked and now the play button is visible and works.

What program did you use for the SVG graphics? I would like to add a drill tab. I opened the LatheMacro.svg with Inkscape but am not sure exactly how to modify the file so it works. It looks like each of the tabs is a grouped set of overlapping objects. Do I just create a new object at the lowest level?

Please Log in or Create an account to join the conversation.

More
09 Dec 2016 06:57 #83829 by newbynobi
Replied by newbynobi on topic Lathe Macros
@ZincBoy,

could you please publish the modified UI file.
So I do not have to do the same work as you ;-)

Norbert

Please Log in or Create an account to join the conversation.

More
09 Dec 2016 22:17 - 09 Dec 2016 22:18 #83850 by andypugh
Replied by andypugh on topic Lathe Macros

What program did you use for the SVG graphics?


I used Inkscape. But you will need to save-as plain .svg not Inkscape .svg and then probably go through the file with a text editor and set all the layer names back, because Inkscape scrambles them.

Each image is on a layer of it's own. You can turn on or off layer visibility in the layers palette.

If you add an extra tab and a layer with the same number then it should pick the image automatically.
Last edit: 09 Dec 2016 22:18 by andypugh.

Please Log in or Create an account to join the conversation.

More
10 Dec 2016 04:15 #83876 by ZincBoy
Replied by ZincBoy on topic Lathe Macros

could you please publish the modified UI file.
So I do not have to do the same work as you ;-)

Norbert


This is the file I have now.

File Attachment:

File Name: lathemacro.zip
File Size:9 KB


I seem to have messed up the icon for the button when editing the file, but it still says "play". I also changed the max values for the feed rate to 1000 as that is not too high for SFM. I will likely bump this up to 2000 at some point.
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Dec 2016 04:19 #83877 by ZincBoy
Replied by ZincBoy on topic Lathe Macros

I used Inkscape. But you will need to save-as plain .svg not Inkscape .svg and then probably go through the file with a text editor and set all the layer names back, because Inkscape scrambles them.

Each image is on a layer of it's own. You can turn on or off layer visibility in the layers palette.

If you add an extra tab and a layer with the same number then it should pick the image automatically.


Thanks for the tips. Now I just need to get the glade editor to stop crashing when I try to add a control I think the issue is that I have been using the controller system for development (Atom D525) and it is woefully underpowered. I will setup a dev system and try it out.

Thanks!

Please Log in or Create an account to join the conversation.

More
24 Dec 2016 04:49 #84665 by ZincBoy
Replied by ZincBoy on topic Lathe Macros
I have added a drill tab to be used with a tool post mounted drill. I have tested it cutting air but it looks like it should work.

I also made some other changes to make things work a bit better for me.
1. added a stop button to the tabs that stops the macro running. This is useful in Gmoccapy, unsure about other UIs.
2. Changed the handling of the numeric entry box to work differently. It now has a bit better protection for numeric entry at least with the touch buttons. If using a keyboard no checking is done. Also change the cursor position handling to be a bit more consistent.
3. Updated threading macro to handle both metric and imperial machine units. Tested in the air, need to do a bit more testing.
4. Updated the README to better reflect the .svg version.

I plan to add a few more options to some of the tabs but wanted to see if anyone had specific feedback on this version.

File Attachment:

File Name: LatheMacro.zip
File Size:59 KB
Attachments:
The following user(s) said Thank You: dinkata, blue0cean

Please Log in or Create an account to join the conversation.

Time to create page: 0.126 seconds
Powered by Kunena Forum