How to view/edit an X3G file?

26,560 views
Skip to first unread message

David Celento

unread,
Mar 15, 2013, 1:58:36 PM3/15/13
to make...@googlegroups.com
Maybe a dumb question, but is viewing or editing an X3G file possible?  If so, how?

This is a bit of a challenge for those still using MakerWare (I know, I know... installing Sailfish now), since none of the moves can be viewed for tuning or to help with custom profiles in MW.

Replicator G will generate .X3G files, but won't open them. Hmmmm....


Eighty

unread,
Mar 15, 2013, 2:03:35 PM3/15/13
to make...@googlegroups.com
X3G is a binary file meant for the bot to read.  It's not readable, unless you're a bot.  Are you???
 
Dan Newman has posted a link somewhere (maybe in the Jetty forum) to a program that will convert an s3g.  But I would advise you not to mess with that.
 
Just generate the gcode first (whether in MakerWare or RepG, it doesn't matter).  Then use Repetier-Host to view the gcode "print".  If you like what you see, then convert the gcode to x3g.  It's a single step in RepG (convert an opened gcode file to x3g).

Eighty

unread,
Mar 15, 2013, 2:08:25 PM3/15/13
to make...@googlegroups.com
Not sure if all that made sense if you're not familiar with things.  Here's a simple workflow:
 
1.)  "Make It" in Makerware, but be sure to choose "gcode" as the file (not x3g).  If you're using RepG, use the "Model to gcode" button.
2.)  Open the .gcode file in Repetier-Host, and view the toolpaths.  You can view the print at any point of the process.  For example, you can see what it looks like at layer 50 out of 100 total layers.
3.)  If you like it, return to RepG and click the "Build to file for use with SD card" button.  That will simply convert it from gcode to binary gcode (x3g).
 
I slice with RepG.  After step 1, I don't even close RepG to use Repetier-Host.  I just take a peek at the model, then close Repetier-Host, and return to RepG to create the x3g file.

Joseph Chiu

unread,
Mar 15, 2013, 2:14:07 PM3/15/13
to make...@googlegroups.com
It's an oversimplification, but RepG basically "compiles" Gcode into x3g or s3g "binary executables".  Think of x3g or s3g files as .exe or .com files.  You should focus on looking at the source .gcode files instead.

There is a "reverse compiler" script out there.  But it does not give you the original Gcode - it's used for debugging/analysis.  If you go to Jetty's page on GitHub, you can find it there.




--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To unsubscribe from this group and stop receiving emails from it, send an email to makerbot+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

David Celento

unread,
Mar 15, 2013, 2:26:09 PM3/15/13
to make...@googlegroups.com, joe...@joechiu.com
DOH!!!

I'm not sure how I missed the fact that MakerWare can also save Gcode.  That's really what I'm after.

Is this new for MW 2.0 or did it always do this and I've been sniffing too much molten plastic? ;-)

THANK YOU!

Eighty

unread,
Mar 15, 2013, 2:36:54 PM3/15/13
to make...@googlegroups.com
Sniffing too much. 

Jerry Ryle

unread,
Mar 19, 2013, 9:17:49 PM3/19/13
to make...@googlegroups.com, joe...@joechiu.com
Thanks for pointing to the "reverse compiler" script. I'll check that out. Do you happen to know if this, or anything else would let you inspect a slice-by-slice view of the x3g file?

I ask because I just ran into a problem where I imported a model into Makerware, saved it as x3g, and started to print it, only to discover that the model had a very slight tilt to it--it wasn't flat on the build plate. So, the slicer sliced it at a slight angle, which resulted in a very tiny base and large overhangs--needless to say, the print failed spectacularly. A visual inspection of the first few slices would have caught this (in retrospect, it was also immediately obvious when the bot laid down the first shell, but I'm new to the Makerbot--just unboxed my 2X yesterday--and just assumed it was doing something "weird"). I'd love to be able to perform a quick inspection of the resulting slices before attempting to print.

Eighty

unread,
Mar 19, 2013, 10:51:02 PM3/19/13
to make...@googlegroups.com
If you'd like to view the slices visually, you must export to .gcode, not .x3g. X3G is the binary translation of .gcode.

Download and install Repetier-Host for free. It allows you to view the print slice by slice. If you like it, compile the gcode to x3g and print.

David Celento

unread,
Mar 19, 2013, 11:47:03 PM3/19/13
to make...@googlegroups.com
If you're using ReplicatorG, you're 95% of the way to viewing the toolpaths. See my post here: Re: Newbie Info | ReplicatorG: Viewing Toolpaths in Skein-Iso & Skein

Jerry Ryle

unread,
Mar 21, 2013, 2:07:34 AM3/21/13
to make...@googlegroups.com
Eighty & David,

Thanks for the responses.

On a slightly related note, I find it really strange that Makerware doesn't have an option to align a surface to the build plate. I found the "On Platform" button under the move menu, but that doesn't seem to impact the model's rotation. The original problem that led me to want to view the slices in an X3G was that my model imported into Makerware with a slight rotation that wasn't easily seen in the 3D view--but would have been very obvious when looking at the first few slices. I get that the X3G is a binary, Makerbot-specific version of G-code & that I can probably export to GCode & then use another tool to view that. I think I was just hoping someone had written a tool to open and inspect the X3G itself. Since I'm just beginning, I'm trying out Makerware at the moment & will live with its limitations for a bit, but I do plan to check out ReplicatorG next.

Eighty

unread,
Mar 21, 2013, 7:48:37 AM3/21/13
to make...@googlegroups.com
Don't fight the system. Just accept that X3G isn't the file you're looking for. You want the gcode file. So next time, export to gcode first. That's my standard workflow.

I think what you're asking for in regards to rotating is really outside the scope of Makeware. They've made it pretty clear that it isn't a cad program. You should really drop back to your design software and align the object to a plane before exporting. Makerware doesn't have (nor should it have) the capability to look at your object, decide what you really meant, and follow through.

Pankaj Shah

unread,
Jul 5, 2014, 9:53:07 AM7/5/14
to make...@googlegroups.com
Asking for reverse coversion of .x3g file to gcode, or being able to view the actions makes sense in some situations. I have a china make (Malyan) 3D printer, which prints a very nice and finished job of 20x20mm calibration piece, which is included as a sample print on their SD card.
However, when I take an stl file from thingverse, convert to gocde and x3g using replicatorg, and then try to print it, the results are not so fine or finished. Even the progress indicator on the lcd display does not work (which works in their sample files). So I would like to interpret their x3g file and find out the settings that I am perhaps missing, or making improper settings.

Pankaj Shah

Dan Newman

unread,
Jul 7, 2014, 11:13:52 AM7/7/14
to make...@googlegroups.com
On 05/07/2014, 6:53 AM, Pankaj Shah wrote:
> Asking for reverse coversion of .x3g file to gcode,

No such utility exists. You can dump the x3g using,

https://github.com/jetty840/ReplicatorG/blob/master/scripts/s3g-decompiler.py

But if you want to turn it back into gcode, you will need to write your
own program.

> or being able to view
> the actions makes sense in some situations.

With the exception of G92 commands, the x3g is just the gcode converted to
(1) units of steps, and (2) expressed as binary commands. What you want is
a gcode visualizer with which to visualize your gcode.

> However, when I take an stl file from thingverse, convert to gocde and x3g
> using replicatorg, and then try to print it, the results are not so fine or
> finished.

Pictures? No one knows what exactly you are concerned about without seeing some
photos.

> Even the progress indicator on the lcd display does not work
> (which works in their sample files).

The progress information is part of your gcode produced by the slicer. If you
do not see the info in the bot display, that means that your slicer did not
produce it.

HOWEVER, if RepG isn't producing it then either

1. You have selected the wrong machine driver in RepG and are using some old,
in appropriate driver, or

2. You are using some ancient version of RepG.

BUT, keep in mind that RepG was abandoned by Makerbot back in October or November
of 2012. The abandoned version, RepG 0040 has bugs and should not be used with
any 7.x version of Makerbot firmware. It should also not be used with Sailfish.
If you have Sailfish in this bot, then you should be using RepG 40rXX - Sailfish
which can be downloaded from the Sailfish "thing" at thingiverse.com. BUT do not
use that version of RepG with stock Makerbot firmware. Moreover, you really only
want to use RepG 40rXX - Sailfish for installing Sailfish on a bot and configuring
it. For slicing, you're better off using a "modern" slicer which supports
Makerbots.

Dan
Reply all
Reply to author
Forward
0 new messages