Multi-line text engraving g-code generator

More
13 years 9 months ago #28910 by ArcEye
See also this thread for an example of how to use a script to automate G Code output for engraving incrementing serial numbers

www.linuxcnc.org/index.php/english/forum...gram-possible-#28879

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

More
12 years 6 days ago #52404 by cparsons
Has anyone managed to get this to run?

I have been trying for a while but there are several errors mainly relating to variables referenced before assignment, which I have added hopefully in the right place and now get another error saying KeyError: 'A'

Running it from the LinuxCNC (2.6.1) desktop, I had to install QCAD to get the fonts referenced, and correct the path in the file but it looks like I am going to have to learn Python to get it to work

Chris

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

More
12 years 6 days ago #52405 by BigJohnT
Works for me... while not to intuitive if you just start it without any options. I did forgo trying to find the qcad font locations and just copied romanc.cxf to the same directory as engrave-lines.py and changed line 35 to reflect the new location.

JT
The following user(s) said Thank You: cparsons

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

More
12 years 6 days ago #52406 by BigJohnT
I did add this around line 469 to make it show the help file if no arguments are passed.
Code:
if len(sys.argv[1:]) == 0: help_message() sys.exit(0)

Makes it a little more intuitive.

JT
The following user(s) said Thank You: ArcEye

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

More
12 years 6 days ago #52407 by cparsons
FINALLY got it working!

In desperation I thought I would have alook at the single line version and noticed a comment about QCAD 3 fonts being incompatible - so downloaded from the link which was helpfully supplied to the compatible fonts, and it now works, wahoo

Didn't need to add the variable declarations either - I commented these out and it still seems to work so I will have to try and work out why I got error messages at some point

You are right, not very intuitive but still a helpful utlility, pity the message about using the older fonts and link to them was not repeated, would have saved me a lot of time but I got there in the end, thanks

Chris

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

More
12 years 6 days ago #52409 by ArcEye

You are right, not very intuitive but still a helpful utlility, pity the message about using the older fonts and link to them was not repeated,......


At the time it was written and the instructions prepared, there were no older fonts, QCad used .cxf fonts.
It throws an error if it cannot find the default romanc.cxf font, you should have had that.

As usual, the next version of QCad broke backward compatibility when they started using different fonts B)

As for intuitive, it is a command line program, if you want the options you either put in -h or --help, one of them will always work.

Glad you got there eventually

regards

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

Time to create page: 0.444 seconds
Powered by Kunena Forum