Loading

GCode Print Simulator

by mdietz, published

GCode Print Simulator by mdietz Jan 24, 2013

Description

This application can visualize Gcodes and simulate a real 3D print.
GCode Simulator recognizes the print speeds and can simulate the print in realtime, but you can also speedup the prints (fast forward,slow motion). Each layer is painted in a different color to see how a layer overlaps with the layer below.

GCodeSimulator Home page: gcodesim.dietzm.de/

Video of GCodeSimulator in action: youtube.com/watch?v=i1SY2N21EDQ

GCodeSimulator let you to check how your print should turn out, making it easier to spot errors and fix them instead of wasting filament. If the print object looks ok you can directly send it over Wifi to GCodePrintr (Android) to print it.
**GCodePrintr - 3D Printing for ANDROID available**
**Allows real 3D printing from an Android device**
play.google.com/store/apps/details?id=de.dietzm.gcodesimulator

In addition GCodeSimulator analyses the Gcode file and prints additional information like:
It calculates various print details like
-print time
-used filament
-yx move distance
-print object dimension
-average print speeds
-number of layers
-layer details
-speed distribution / Acceleration
-weight and price of the printed object
-much more ...

It also allows to debug your gcode by stepping through it line by line and show the results. (debug mode)

Developed for my reprap printer but works with other printers (e.g. makerbot, ultimaker,...) as well, tested with Silc3r and skeinforge gcodes.

Recent Comments

view all
Yes. Once you have configured an offset for the second extruder (Settings) you will see both nozzles painted. The active one is painted white and the inactive one is painted grey.
Is there I way I can tell which toolhead is being used in a dual extruded print?
Before i could get my Printrbot to run correctly from my PC, this program did the trick with a USB adapter for my Samsung Galaxy Tab 2 7.0.Wonderful program. I plan on using it when I do demos, so I can keep the stuff I haul n the lighter side.

Liked By

view all

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

Add GCode Simulator as post-processing script in Slic3r !!

**GCode Simulator for ANDROID available**
**Allows real 3D printing from an Android device (not just simulation)**
play.google.com/store/apps/details?id=de.dietzm.gcodesimulator

**Update V1.27**
Option to autostart print when sending gcode to GcodePrintr (>=V1.67)
Option to autosave model when sending gcode to GcodePrintr (>=V1.67)
Option to configure offset for dual extruder
Many bug fixes

**Update V1.25**
Added limited support for BfB style gcodes
Added "Jump to Layer" option
New button bar & banner
Fixed nozzle offset

**Update V1.22**
Configurable bed size
Gray and Autumn Themes


**Update V1.21**
New Button bar
Layout changed
New print panel (not working yet)

**Update V1.18**
Fix wrong label painting
Remember Network IP
Remember last file path
**Update V1.17**
Many performance improvments
GCode Parser improvements
Paint Extruder on frotn view
Workaround for MacOS load bug

**Update V1.16**
Fixed problem when parsing gcodes with multiple whitespaces

**UPDATE V1.15**
Fixed NullPointerException with G4 gcode

**UPDATE V1.14**
Fixed Network Send Feature (broken in V1.12)
Improved load time

**UPDATE V1.12**
Add makeware specific extrusion code ( A&B instead of E)
Removed debug message which slowed down the load
Fixed side view, slicer comments view, 1st layer temp
Removed experimental edit mode (speek up if you need it!)

**UPDATE V1.11**
Add makeware specific extrusion code ( A instead of E)
Fixed boundary calculation (start position was ignored)

**UPDATE V1.10**
Improved performance
Significantly reduced memory usage

**UPDATE V1.07**
-New Network Send (Remote Print) Feature - allows you to send the Gcode to an Android device running Gcode Simulator V1.05 Beta.
-Added new menu items for the functions added in V1.02
-Fixed Z-lift Bug (layers were reordered by Z-pos)


**UPDATE V1.03-V1.06**
Various updates to the Android Beta Version

**UPDATE V1.02**
Fixed some ReplicatorG Bugs
Fixed some "Invalid Gcode" errors by adding support for addtl. Gcodes (M204,M70,G161,...)
Show current Gcode line when in pause (debug mode)
Added step by step execution (debug mode). Use space/backspace to step through the gcodes during pause
Added fast forward/rewind (skip 50 gcodes). Use space/backspace during run.
Added increase/decrease of speedup in larger steps (10x). Use / (Up) * (Down)

**UPDATE V0.99**
The current location of the nozzle is painted to improve usability.
Replaced blue with a lighter pink to improve readability.
Click on speedup label box will toggles pause
Scrollwheel for speedup is only active when mouse is over printbed or labels
**UPDATE V0.98**
Support for center format G2/G3 Gcodes (Arc) - Radius format not supported yet
**UPDATE V0.97**
More reslilient against errors and unsupported gcodes
**UPDATE V0.96**
Display extrusion rate (mm/min) in real time
Display pause status in status bar
Display of Fan output changed (III=Full Speed, II=Medium, I=Slow, ""=off)
Rendering bug (Grey spots) fixed

**UPDATE V0.95**
Based on new GCodeInfo
Experimental Edit Mode added
Optimize lavel repaint
Fixed bugs with details toggle and temperature

**UPDATE V0.93**
Some performance improvements.
Window Icon added.
Automatic Zoom on Window resize.
Filedialog uses current user path.
Fixed some multi-threading bugs.

**UPDATE V0.92**
Added Menubar
Show model details by default.
Fixed double buffering bug for MAC OS.
Some Performance improvements

**UPDATE V0.91**
Show current speed and remaining print time.
Fixed double buffering bug.


**UPDATE V0.90**
Render Front and Side View
Experimental Printing support (requires RXTXcomm.jar and /dev/ttyUSB0)
Added S Key-Shortcut for "Start Print"
Some Bug Fixes

**UPDATE V0.81**
Added Mouse Support
Mousewheel = Speed up/down
ALT+Mousewheel = Zoom in/out
Left Button on Bed = Next Layer
ALT+Left Button on Bed = Previous Layer
Right Button = Show Model Details
Left Button on Details = Toggle Model Details
Middle Button = Show Help
Show percentage when loading gcode files
Start with default gcode (GCode Simulator Key Chain) , press f to load file.
Fixed bugs.


**UPDATE V0.80**
Much smoother painting by splitting longer lines into multiple draws
Added nice looking labels with boxes for current infos (instead of plain test string)
Toggle modeldetails can now page through multiple pages of layer details
Unknown keys open about/help dialog.
Fixed acceleration (ignore acceleration for speed distribution), use acceleration for paint and layer time.
Show separate time values (with and without acceleration)

**UPDATE V0.71**
Non-disruptive zoom (no restart) implemented
Jump to previous layer added.
"Next Layer" option completes the layer painting (not skips it)
Paint grid on print bed.

**UPDATE V0.69**
Show new GCodeInfo modeldetails (Material,Weight,Price,.. See GcodeInfo for details.)
Fixed some issues with Skeinforge comments and average calulations.

**UPDATE V0.68**
Support for Java Version 1.6 (MacOS)

**UPDATE V0.67**
Added option (t) to toggle details (show more model & layer details similar to Gcodeinfo)
Added option (f) to open another gcode file.

**UPDATE V0.65**
Handle gcode files with Z-Lifts and negative coordinates (auto center on bed).
Show details of the printed model (e.g. overall print time, size, layers,..)


Start the java program by calling on the command line (Java 1.6.x required)
java -jar GCodeSimulator.jar

Or Open with java from explorer or your favorite file browser.

is optional , if not specified then a browse dialog will open.
IMPORTANT: Due to a bug in the linux java jre do not choose a file from the "recent file" list, this will cause a crash. Instead go to the full path of the file and open it there.

The GCode Print simulator can be controlled with the following hotkeys:
i/o=Zoom
+/-=Speed
n=NextLayer
r=Restart
p=Pause
q=Quit

I have tested it with many Slic3r gcodes and some skeinforge gcodes. But GCodes can be very complex, therefore I'm pretty sure there will still be bugs.
Z-Lifts might causes problems and negative coordinates as well (fixed with V0.65). Relative positioning is not supported yet.
Feedback is highly welcome !
Is there I way I can tell which toolhead is being used in a dual extruded print?
Yes. Once you have configured an offset for the second extruder (Settings) you will see both nozzles painted. The active one is painted white and the inactive one is painted grey.
This comment has been deleted.
Before i could get my Printrbot to run correctly from my PC, this program did the trick with a USB adapter for my Samsung Galaxy Tab 2 7.0.Wonderful program. I plan on using it when I do demos, so I can keep the stuff I haul n the lighter side.
Thank you for putting the time and effort in to this. It's helping me track down a problem that it looks like the slicer software I'm using is causing.... Thank you...
Mega cool piece of software! I am using it now to check for the estimated speeds of my quadrap-3d-printer.blogspot.de that prints 500mm/sec and the target is to reach 700mm/sec! Bravo for the excellent job!
mdietz - in reply to
Thanks !
Wau. 500mm/sec !!! this is cool.
Thanks for adding BfB gcode support in that last release !
My printer is a Rapman from Bitsfrombytes and on these machines the coordinate (X0,Y0) is the middle of the printbed.
It seems that for GcodeSimulator this coordinate is at the bottom-left corner of the screen.
Therefore the simulation occurs in that corner and can't be completely seen.
It could be a good point to be able to tell the program where the origin is with some X and Y offset. Just an idea...
I also know that some Gcode for BfB machines might be different than for other machines.
So maybe it won't be able to completely simulate BfB gcode.

Anyway this seems to be a very great app !
Congrats !
mdietz - in reply to Anar
Thanks for the feedback. Could you please send me such a BfB gcode, then I can check how to improve the behavior.
In fact, it should already try to move the 0 position based on the 3d object size, maybe there is a bug in this logic.
cu
Mathias
Hi,
it looks really nice from the screenshot and description and I will probably add a "like it" as soon as I will be able to understand how to use it on a Windows PC.
Sorry for being so silly but how do I install and/or launch this app ?
I can't see any .exe or install file (V1.18).
Am I missing something ?
Can someone help me please ?

Cheers !
Could you make the Android version of this load from Google Drive. When I "Load" it gives me the option of picking from the Google Drive but then once I select the file it gives me an error and says the file isn't a valid gcode file. I have a feeling it is not downloading a proper copy of the file to use locally and something in the translation between the Drive app and your app is a miss.
Hi,
please join the GCode Simulator Google+ community for discussing problems, request features and get news:
https://plus.google.com/u/0/communities/116436892101925074251
I will try to find out what is wrong with Google Drive ....
Hello

I wonder if I can control the temperature from the application, because I can only see as increasing the temperature to 220 degrees and I use an ABS that blends well with the 235 º

I do not know English, so this makes Google translation

thanks
jjolp - in reply to jjolp
Si. That is the case. Hopefully soon implement the temperature change, because until then I can not use it with ABS.

thanks
Version 1.28 of GCode Simulator & Printer for Android does now support custom temperature presets.
Please join the GCode Simulator Google+ community for discussing problems, request features and get news:
https://plus.google.com/u/0/communities/116436892101925074251
I guess you refer to real printing from an android device running GCode Simulator & Printer ? If yes, the manual temperature control is currently limited to 185,200 and 220 degrees. But I will add a preference panel to configure the temperatures in a follow-up release.
Hi ,what is the optimal configuration for android's tablet ? Processor , RAM, memory ... It s great apps for running your 3d printer
mdietz - in reply to mana
Most important is that the usb-host feature is supported by the tablet. Memory of 512-1024MB is fine. Larger gcode files will require more memory. E.g. a 300000 line gcode requires ~50MB memory. Single core CPU is ok but dual/quad core CPU has some buffer for additional calculations.
I have 2 tablets which run fine: Samsung Galaxy Tab 2 and Trekstor Surftab Breeze 7.0
Wow ... this is great.

Would it be possible to display at the bottom the number of the code-line in the file? And a small editor, where it would be possible to edit the gcode file, to smoothen some details?
Hi, the line number and gcode details are already shown when you hit pause. (in the right bottom corner)
I added the gcode editor to the feature wishlist, but its more complex than it looks like because every change needs to re-analyse the model to calculate things like the time, extrusion,...
Thats great :)

But can i ask you something? In down side on your home page( dietzm.de/gcodesim/#GCodeSimulator ) you say: "Add GCodeSimulator to the post-processing scripts of your slicer tool (slic3r, Skeinforge) to control the output without manual steps." So :) my question is - how to do this? Please, explain like for some one totally out of software knowledge ;)
mdietz - in reply to VSP
Hi.
I added short description for slic3r here: dietzm.de/gcodesim/help.html
VSP - in reply to mdietz
Thank you so much :)
That, is for what i'm looking for :)
Hmm does not work with ReplicatorG Files, or does it? Greets
mdietz - in reply to BNI
it should work with all Gcode files. Please send me am example file and I can see what the problem is.
Having a similar problem. I sent you an email with 2 example gcode files.
Thank you. The ReplicatorG comment style was not supported. Please retry with the new version v101.
BTW, there's some typos in the interface, where "increase speed" says "ctrl +" while the command is actually "Alt +", etc.
Actually most keys work even without pressing ctrl or alt. Unfortunately Java AWT menu item does not allow to specify plain shortcut keys (without ctrl or alt).
Works well now. Thanks!
Great job ^^
if it can read file .x3g or file .gcode of makerware that is so awesome.
Please send me an example file and I can see if makerware gcodes can make to work.
I must be doing something silly - I try to open a gcode file and the app simply disappears. Any ideas?
Please retry with the new version 0.96. If it still does not work send my your gcode please. Thanks !
Please, make new version for android!
I just uploaded the new version to Google Play Store (might take some hours until it is active)
Simply amazing and SOOO helpful when trying to determine if i need to add supports or not
I like the screenshot ;)
This looks like a great tool! The only downside, if you can call it that, is that it uses Java. There's been a load of talk lately about Java being massively insecure and just as I was about to remove it from all my machines, you go and post this. Ho hum. /ClicksDownloadAnyway
I know. I already thought about rewriting this stuff in python to improve my python skills. Not sure if I'll have time to do that.
Had trouble running this, OS X 10.8.2, java version "1.6.0_37"

$ java -jar GCodeSimulator.jar

Exception in thread "main" java.lang.UnsupportedClassVersionError: de/dietzm/GcodeSimulator : Unsupported major.minor version 51.0

Which version of java is this build for? What license have you released this under; is the source code available?

-r
Please try version V0.68
Currently java 1.7 (only because it uses switch() statements with String).
Source code is not yet available, but I might create a github project if there is some demand.
Another vote for Mac..
The new version v0.68 should work with java 1.6. I have replaced the java 1.7 specific statements. Please let me know if it works on MacOS.
Yeah, works like a champ! Thanks!! Would be nice if zooming didn't restart the virtual print, but otherwise no complaints!
I've implemented a non-disruptive zoom in V0.71 (no restart required).
Top