In CNC programing G-Code text files I'd like to at times do simple math operations such as shifting an axis a certain amount. To do this all of the X coordinates would need to have the amount added or subtracted.
Is there a way to add an arbitrary amount to the number next to an axis. i.e.
add 1 inch to all the X coordinate numbers in the file. Now we have X1.001
Python script plugin can do this - see https://sourceforge.net/projects/npppythonscript/forums/forum/1199074/topic/4667045 for an example script of replacing a regex with the value from a function (actually the example is very similar to what you want to do here).
Ok Sounds like a way to do what I'm after thanks! I downloaded the Python script plugin. Any tips on how to execute this? I can put a text file's worth of G-Code into Notepad++ and I have the plugin but I have NO idea on how to make it work.
All I need to do is simple addition and subraction to all numbers following X,Y, or Z (as I have in the first post). Simple but I have no idea what to do with the Python plugin. Any tips would be appreciated!