I'm working on a 3D project, and I was in my 2nd roughing tool path, which I believe had to make 5 passes within that tool path. I lost power at a little over midway in the project, and I'm wanting to see how to determine in the G-Code, which of the 5 passes I'm in by looking at the code? Once I've determined which indicator in the code correlates to which pass its in, then I can go on to moving the tool to the closet location to where it left off. By using that positioning within the G-Code, I should be able to resume the path? Is that correct? I've never actually wrote and G-Code but I have somewhat of an understanding of it. Just enough to get me in trouble I'm guessing?
look for the Z depth you were cutting at and restart there so your are cutting 5 passes, lets say 2mm deep per pass, for a final depth of 10mm Assuming you have the surface of the material as Z zero: first pass you will see Z-2 in the code second pass Z-4 third, Z-6 fourth, Z-8 fifth, Z-10 so if you want to restart at pass 3, you can delete everything between the first Z-2 and the first Z-6 (well, just before that actually, there will be G0 codes that tell it where to go to start the pass NOTE you must keep the header codes that set things like G90 and G17 etc. rather delete too little than too much. TEST before running for real, so set Z0 at least 10mm above the work (as per my example above of cutting 10mm deep) and run the tool in air and make sure it is doing what you think it should be doing. oh! a better way to do this is to install bCNC, you don't have to use it for controlling the machine but it does have a nifty code editor that will break your passes up into 'blocks' (by Z depth) and you can 'turn off' blocks and see in the preview what to expect. once you have the already cut passes turned off you can save the code to a new file for cutting. DO NOT turn off the header block! Here is an example where I have turned off all the top cuts, shown in pale gray in the drawing, and greyed out in the list of blocks on the left. In this case the deeper cuts are being cut first (Fusions adaptive clearing) because full depth is possible, I set this up to cut insulation foam.