GCode Analyzer/Visualizer
Description
Wanted to show you a little project I've been working on for some time - gcode.ws
As you might've guessed by the topic name - it's a GCode visualizer. And I guess at that point most of you are asking why the hell anyone would write another one.
Well, mainly because I haven't found a single one that would comply with my humble list of requirements. I mean, most of them allows me to.. well.. visualize GCode file and nothing else. But when I open gcode - it's not for my estetical pleasure, it's to check that there are no problems and to see effects that recent slicer configuration changes done or for any other of several reasons. And the ones I've seen so far doesn't allow me to do that stuff effectively.
So I decided to write one myself.
Feature list:
1) Visualize GCode in 2D, layer by layer
1.1) Show retracts and restarts
1.2) Show print/move/retract speeds
1.3) Display only part of layer/animate squence of layer printing
2) Analyze GCode
2.1) Print time, amount of plastic used, layer height, etc. for whole file and for single layer
2.2) Reference visualized part to GCode file (i.e. select a certain part of 2d visalization, switch to GCode view - it will highlight list of lines responsible for visualized piece)
3) Multiplatform, available online (but works offline too), works locally (doesn't upload you gcode anywhere or download anything but application itself)
4) 3D visualization (I don't know what for, it's dull and useless.. need to rewrite it to be like in repetier host)
5) And yeah, it's slow, memory hungry and only supports modern browsers like chrome and ff of latests versions (maybe safari 6 and ie10, haven't checked)
6) Totaly open source so you can use it as you like )
-----
Update 27 Nov 2012:
Lots of bug fixes, support for DC extruders (M101/M103), order of magnitude improvement in loading time for files with lots of Z movements (like Z-lifts)
-----
Update 28 January 2013
Lots of bugfixes. Support for upper layer "shadowing" and setting extrusion visual thickness.
-----
Update: spring 2013
Lots of things have changes. You can now use color differentiation based on flow rate, not speed. You can enable "extrusion width" emulation to see how well your infill should look. There is a highly experimental feature "error analysis" that is available at gcode.ws/?new
And it's migrated to another domain long time ago =)
Instructions
Alternatively - you can download a snapshot of sources from attachment or go to github.com/hudbrog/gCodeViewer/
If you wish to use it locally (i.e. with sources on you local machine) - you will need to add "--allow-file-access-from-files" parameter to chrome(which is unsafe and I DO NOT RECOMMEND it), otherwise it won't work.
You must be logged in to post a comment.
great! I built a rostock with a friend, and we have been printing (calibrating) about a week. And your application will be very helpfull!
Hey very cool! I think I have a whole bunch of files that do not render right. They are normal 2D cnc drawings. If you wanted to check it out for yourself they are all here in the TinyG project.
A really useful tool! Good job!
One technical difficulty though: it appears the website you are hosting it on is a bit unreliable. Sometimes it loads right away, sometimes it takes a couple minutes to load, and sometimes I get a connection timeout error. Any ideas why?
BTW the offline version works without changing "dangerous" settings in the latest version of Opera.
Hi, thanks! Basically, whole application is a static page, after you load it once - it should be stored in your browser cache for quite a long time. I've signed up for a monitoring service to check latency from different parts of the world. If it shows significant problems - I'll move it to another hosting.
This looks fantastic!!! Is there a way to start up this viewer with a named gcode file from the command-line rather than needing user interaction? (I currently have tatlin being invoked automatically by slic3r and skeinforge when they finish slicing to review what they've done, but wouldn't mind swapping to yours.)
Finally tried this out. Really really awesome. Thank you!
Runs better in Safari than Pleasant 3d!
Any chance we can see repeater host style 3d representation?
Being an in browser app is simply the best thing.
I wonder how long before the entire toolchain for slicing becomes a webapp.
Hey, thanks. I was looking into changing 3d representation to be more repetier host like, but every solution I came up with was either time or memory intensive, most of the time - both. Maybe I'll look some more into it, but I'm not very enthusastic about 3d view since I don't see much use for it.
Amazing tool! Only just found it but already wouldn't be without it :-)
Just freaking awesome...i love it. Thanks so much Monsieur Hudbrog!!!
Great Mate! Awesome use of functional colouring(coloring)! 2D+3D :)
This is excellent. What a great way to visualise the printing process! Thanks so much.
This works great on Skeinforge and Slic3r, but doesn't show me anything with MakerWare-generated gcode. Could you look into it?
Nice.
I wish I could make changes in the 2D interface and have it recreate the corresponding portion of GCode.
Hi Hudbrog
Not sure what I'm not doing right here but I cannot get your app to view the different layers. I'm using version 17 of firefox, and in 2D view pressing up and down arrow, also page up and page down. The scoll bar on the bottom works but not the up and down scroll bar. hmm not sure what I'm missing here. Also tried chrome version 23, same thing.
There was a bug with layer identification when Z goes up and immediately down. Should work now.
Try using the up and down arrow keys. These work for me. You can also click on the scroll bar, but that jumps too much, IMHO.
Can you please send me your gcode file to hudbrog@gmail.com, I'll take a look. Most likely a bug )
Wonderful tool!
3D view is blank for me on Windows 8 Pro 64bit, Firefox 17.0.
Intel HD4000 / Nvidia GeForce GT 630M. I've forced Firefox to use both without any difference.
(The objects show up nicely in 3D on Ubuntu Linux at work, so the objects should be alright)
Bug report:
First vector after a layer change or other Z-lift is not plotted correctly.
Since there is no way to attach images, I'll send you the files directly.
This is *nice*!
One feature request: any chance you could add either the ability to zoom in on a model or define how large our build platforms are? The Makerbot Cupcake's/TOM's are a 100mm x 100mm build platform whereas many repraps are 200mm x 200mm.
I tried this with a 20mm box and it worked great. Every file I've given it since has gotten to 100% and then showed nothing (except the Gcode file itself). The view and info are all blank. I'm using Firefox. Am I missing something?
I've fixed the bug I've mentioned before. If you still get blank page - please, send me the files you're having problems with.
That might be a known bug, you need to reload page every time you view new file. I'm planning on fixing it pretty soon. If it doesn't help I'd appreciate if you could share the files you are trying to view and OS/browser versions.
Maybe I'm missing it, but it would be real nice to have a key-scroll combo to scroll through layers (as in Pronterface) instead of having to drag the scrollbar.
Works great for me on my mac. The 3D UI is a little twitchy/sensitive but it does the job. Great work.
This is a really nice tool! Should really help tracking down obscure slicing problems.
Minor point: Are color mappings off a little? In my "Layer info" box, two move speeds are listed, but both have the same color (green). "Retract speed" has a red code, but a dark blue dot is shown on the rendering. These are minor and the tool is totally usable as is. Just thought you might like to know about it.
Thanks. I guess I need to write some kind of documentation to avoid confusion )
Moves are always green, no matter how many speeds there are. Just so you can always visually see which lines are moves and which are extrusion without checking layerinfo box.
With retractions there are two types of dots - retracts and restarts. Retracts are red, restarts are blue. I only show red on the speed list thou, I can add blue dot there too ) I guess I should remove red color from the list of possible extrusion line colors..
How to run this app?
is it not suitable for mac users?
i only got a bunch of folders and html files.
I ve been happy with 3D pleasant too (with repG) but since it doesnt support the colours from CURA and just gives me a white drawing.. i cant use it anymore.
Maybe someone knows ho i do have to change my gcode in CURA that i get the fullcoloured view in 3D Pleasant again.
Maybe its just adding some extra lines in the Start gcode file..-
For some reason I don't see my previous answer, so I'll reply again. It does work on any OS (I am using it on macos), but requires a modern version of chrome of firefox browser. It is a web application, so all you need to do to use it - is go to the link I've provided in description and drag your gcode to the designated area.
Nice. I've been pretty happy with Pleasant3D on my mac - but I'll give this a whirl and see how it does for me. It's always nice to have more than one option for visualization tools.
License

Amazing job, very clear visualization! Thanks for sharing.