Get processed GCODE of file

Hi, I'm currently writing a plugin to show a 3d preview of the gcode files.
For this I'm trying to find a way to access the processed GCODE, which is generated by gCodeReader.js.
It can be read using GCODE.renderer.debugGetModel(), after the Viewer tab was opened, but I would like to call the gcode parser directly. As far as I can see the gCodeReader.js always calls GCODE.renderer.doRender(model, 0); when it is finished so that the processed information can't be accessed from a plugin.

If there is no direct way to do this I could package it with the plugin, although that seems like bad practice.

Have you seen these plugins? The last one is discussed in detail over here.

Well the PrettyGCode Plugin does pretty much, what I wanted to do :upside_down_face: Somehow I didn't find it, when searching for similar plugins. Maybe I'll still continue as a fun project though.