Multi-line text engraving g-code generator

More
12 years 6 days ago - 12 years 6 days ago #52410 by ArcEye

BigJohnT wrote: 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


I have added your test and the resultant code plus the man file is in this new zip

There is also a zip of the earlier versions of the qcad fonts available on my site.
www.mgware.co.uk/LinuxCNC/qcad-fonts.zip

Hopefully that will prevent similar problems

regards
Last edit: 12 years 6 days ago by ArcEye.
The following user(s) said Thank You: cparsons

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

More
10 years 3 months ago #77695 by cparsons
Just had to reinstall engrave-lines.py (bombed drive!) and used the '-v4' version but it will not allow embedded spaces in lines?

As soon as a space in encountered in a line the gcode generation stops - and will not generate the subsequent lines?

For instance

0 Hello World
1 Line1
2 Line2

Results in the gcode to engrave 'Hello'

This may have been the case all along but at the back of my mind I am sure I have managed to do this in the version I had in the past?

Of course I can have each word in it's own line and space them accordingly but don't remember having to do this before?

Regards

Chris

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

More
10 years 3 months ago #77696 by ArcEye
Something wrong your end.

engrave-lines -X7.5 -x5 -i'123' -Y12.75 -y5.25 -S0.4 -s0.5 -Z2 -D0.1 -0'Line 0' -1'Line 1' -2'Line 2' -3'Line 3' > test.ngc

produces



Suggest you re-install and make sure you have the fonts from the zip, not anything qcad provides.

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

More
10 years 3 months ago #77700 by cparsons
Nope, doesn't work for me...I got around it in the end by double quoting the string inside the single quotes, ie

-0'"Hello World"'
-1'Line1'

etc

Maybe something to do with character sets or something? (wild guess!)

Without the extra double quotes the header message in the ngc file said

( Line 0 )
( Code generated by engrave-lines.py )
( by ArcEye 2012, based on work by <Lawrence Glaister>)
( Engraving: "'Hello") << note the double quote followed by single quote, but closed with just a double quote
( Fontfile: fonts/romanc.cxf )

Not an issue (now) but I am curious why I get this? (I am running this from Windows 7 32bit in the office, Python 2.7)

Chris

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

More
10 years 3 months ago #77701 by ArcEye

Not an issue (now) but I am curious why I get this? (I am running this from Windows 7 32bit in the office, Python 2.7)


I have no idea, it works fine on Jessie amd64 with python 2.7.

If you want to use programs written for linux on windoze, you will have to fix your own problems I'm afraid.
The following user(s) said Thank You: cparsons

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

More
10 years 3 months ago #77702 by cparsons
Yes, of course - it wasn't a complaint, just curiosity, I am learning Python and thought it was fairly portable

When I have a minute I am going to rebuild my LinuxCNC machine with 2.7.5 so hopefully this won't be an issue (I had a HDD crash)

I also noticed some messages about 'Features' that appeared to run your code, this looks like a very interesting development - LinuxCNC seems to be ever moving upwards/forwards thanks to a lot of hard work, wish I knew enough to be able to help myself

Best wishes

Chris

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

Time to create page: 0.434 seconds
Powered by Kunena Forum