Andy1978 / hf2gcode

Generates g-code from text with a hershey font
GNU General Public License v3.0
48 stars 13 forks source link

G-Code output too long for GRBL and LinuxCNC #6

Closed koppi closed 4 years ago

koppi commented 8 years ago

Please split the text and add some line-breaks to the "( text='...' )" G-Code output:

https://github.com/Andy1978/hf2gcode/blob/master/src/hf2gcode.c#L298

hf2gcode generated G-Code with long input texts does not work on GRBL and LinuxCNC:

Interpreter exited with error:
Command too long
( text="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
Andy1978 commented 8 years ago

Hi koppi, the line you pasted is just a comment. I can't check it right now but does GRBL and LinuxCNC really fail if a comment (which they just should ignore) is longer than some preset limit? Of course you can call hf2gcode with "-m" (Generate minimalistic g-code, suppress comments) to suppress any comments which should solve your problem.

koppi commented 8 years ago

Both GRBL and the NIST interpreter fail if you send them this long comment. I still like to have all these comments in the G-Code file, so the -m option is a work-around that does however not really solve the problem.

Andy1978 commented 8 years ago

Hi Koppi, for what purpose do you want to have the ( text=" comments? I merely added it as debugging feature. How do you expect the line is splitted if it is longer than 50 chars?

( text="123456789012345678901234567890123456789"... )
( "012345678901234567890123456789012345678901234"... )
( "567890123456789012345678901234567890123456789"... )
( "012345678901234567890123456789012345678901234"... )
( "5678901234567890123456789012345678901234567890"... )
( "12345678901234567890123456" )

Do you want to parse the "text" in comments or do you just want to keep them as info?

koppi commented 8 years ago

I just want to keep the text in the comments as info, so a line-split like you showed above would be a good work-around for LinuxCNC and GRBL.