Incremental mode move to infinity

I am having trouble developing an incremental mode postprocessor. In the resulting G-code the first move of the first tool is a rapid to -infinityX, -infinityY. I have a very similar absolute mode postprocessor that works fine on the same file. I would like some help fixing this. The details are in the attached
The software that we are replacing produced incremental G-code. We are currently able to run in absolute mode. But I worry that I might get an unpleasant surprise at some point and find out why the old system used incremental mode.
Thanks (381 KB)

Incremental gets ugly. Take a look at the ‘Burny 25 inc’ post. If you want to go this route I’d recommend starting with that post and modifying it to your needs.

Les, Thank you for the pointer to a incremental post.
I am having trouble understanding statements like “if(endY < le17) then”
I can’t find documentation of “le17” or “le30” which are used in various posts if statements.
I have also been unable to print out their value. Can you help me or point me to the documentation?
Are they variables specific to SheetCAM?
Thanks, Dennis

OOPS! embarassing.
I was looking at (endX >= 1e17) and thinking 1e was lower case “LE”. 1e17 is clearly scientific notation for 1x10^17.
I am working through the why the various tests and assignments are needed in an incremental post.

A value > 1e30 indicates that the axis position is unknown. This happens during initial movement. In other words those tests are there to make sure the coordinates is known before doing anything with them. I did warn you that incremental is ugly.