I developed a spreadsheet (gCodeShift.xls) that allows me to take a gcode file, insert it into the spreadsheet, make calculations on the XYZ values and then output the new shifted gcode file.

Steps:
1. Copy/Paste original Gcode into column A line 7 (from nc file)

2.Click button "Parse Gcode"
This button runs a macro (VBA) to separate the XYZ numeric values from each row of the gcode into three new columns (DEF).
It also extracts the start of the gcode line and end of the gcode line into columns B and C to be able reassemble gcode line for output.

3. At this point you can do any spreadsheet calculation you want on the XYZ data contained in separate columns (DEF).
If translating (simple shift), enter values to shift each axis in columns JKL. These are added to columns DEF and result is in columns QRS.
(also shows the max and min values)

4. If you want to keep the original line as is, enter a "1" in column C on that row.
(comment lines and lines with no XYZ values are kept as is automatically)

5. Click Button "ReAssemble Gcode"
The gcode line is put back together with the new values of XYZ (from columns QRS) into column T.
Copy/Paste Column T starting at row 7 into a new nc file

Let me know if you want to try a copy of current version (v2). bill@wjbzone.com

screen shot:
Spreadsheet to shift XYZ values of a gcode file.-gcodeshiftscreenshot-jpg

Similar Threads: