Automated Reconstruction of Continuous Robotic Motion from G-Code Patterns