Lathe Macros

More
9 years 10 months ago #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
9 years 10 months ago #83771 by andypugh
Replied by andypugh on topic Lathe Macros

ZincBoy wrote: 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
9 years 10 months ago #83823 by ZincBoy
Replied by ZincBoy on topic Lathe Macros

andypugh wrote: 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
9 years 10 months ago #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
9 years 10 months ago - 9 years 10 months ago #83850 by andypugh
Replied by andypugh on topic Lathe Macros

ZincBoy wrote: 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: 9 years 10 months ago by andypugh.

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

More
9 years 10 months ago #83876 by ZincBoy
Replied by ZincBoy on topic Lathe Macros

newbynobi wrote: 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:8.56 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.

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

Time to create page: 0.210 seconds
Powered by Kunena Forum