@dc42 @jay_s_uk
Dear All,
I have prepared a G-code reversing tool Console App just to use to reverse motion of the print to be able to test best position to rewind Using C#. Please feel free to use the source if you find it useful. for sometimes it will help us to work manually. But I still required the tool DWC plugin or SBC function.
https://github.com/tunerji/G-Rewind
While reversing code, the code blocks sharing Feed rates and Z height had to be critically analyzed. That's why it was a bit important to review the code a few times.
However, it is temporary solution to me and we still need to make interface buttons and functions to run drive back and forward. The method might need to different way of capturing feed-rate and Z values in real time, once reversed, it use that one.
I assume if we tag all line having G0 and G1 commands as F and Z height of each X and Y coordinates, it might be easy to produce reversing go code in real time at the client side.
However like my case, if paused, machine might lift head and we might need to disable macros like pause and resume too.
as you may notice, in the g-code, Feed rate and Z coordinate has to be shifted and placed on right place, by respecting their groups like G0 and G1 and F Values. My reversing app does that if you like to inspired from there.
Example G-Code Snippet
G1 F1500 X0.00 Y-550 Z1.25 ; Move to coordinates with feed rate of 1500
G0 F4000 X0.00 Y0.00 ; Rapid move to new coordinates
G1 F1200 X476.314 Y275 ; Controlled move to new coordinates
G1 X0.00 Y0.00 ; Move back to start point
Reversed G-Code Example
After processing with G-Rewind, the G-code might look like this:
G1 X0.00 Y0.00 Z1.25 ; Move back to start point
G0 F4000 X0.00 Y0.00 ; Rapid move to previous coordinates
G1 F1500 X476.314 Y275 ; Controlled move to previous position
G1 X0.00 Y-550 ; Reverse move to the starting coordinates
By the way, we have one more financial support candidate a friend of mine, who is wiling to donate 500 too. Therefore, we have total 1000 budget for now. We might rise more who is required to use it like my case. If you may accept, besides my method or code generation support, I can handover you my portion donation. Please feel free to reach me in private talk about it.