Math operations possible?

Nick
2012-03-27
2012-11-14
  • Nick
    Nick
    2012-03-27

    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.

    X0.001

    add 1 inch to all the X coordinate numbers in the file. Now we have X1.001

     
  • Nick
    Nick
    2012-04-10

    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!