Saturday, October 5, 2013

Generating G-Code in Replicator G

As we wait for the status bar to indicate our stl file has been sliced and is ready to send to the printer, I am often wondering, what is ReplicatorG doing?!  In the terminal, we can read that it is going through the steps to "generate the toolpath," which creates the directions that explain how to the extruder needs to move in order to print the object. Replicator G uses Skeinforge, a tool chain composed of Python scripts that converts your 3D model into gcode, to get the job done.

We've figured out that these are the steps that most often occur in generating the gcode include: Carve -> Preface -> Inset -> Fill -> Speed -> Raft -> Jitter -> Comb -> Cool -> Dimension -> Alteration -> Export.  Here's an example from a (class-favorite) duck from Thingiverse:

[10:59:33] Carve procedure took 8 seconds.
[10:59:34] Preface procedure took 1 second.
[11:00:33] Inset procedure took 14 seconds.
[11:00:33] Fill procedure took 45 seconds.
[11:00:34] Speed procedure took 1 second.
[11:00:36] Raft procedure took 2 seconds.
[11:00:37] Jitter procedure took 1 second.
[11:00:38] Comb procedure took 1 second.
[11:00:42] Cool procedure took 4 seconds.
[11:00:44] Dimension procedure took 2 seconds.
[11:00:44] Alteration procedure took 0 seconds.

(Scroll down for more examples)

It's pretty easy to generate the Gcode.  In fact, all we do is click "Generate gcode," check a few parameters (like which extruder, whether we want a raft or support material, and percent fill), and then the program does the rest.

In researching this toolpath, I've read the entire sequence could be: Carve -> Scale -> Bottom -> Preface -> Widen -> Inset -> Fill -> Multiply -> Speed -> Temperature -> Raft -> Skirt -> Chamber -> Tower -> Jitter -> Clip -> Smooth -> Stretch -> Skin -> Comb -> Cool -> Hop -> Wipe -> Oozebane -> Dwindle -> Splodge -> Home -> Lash -> Fillet -> Limit -> Unpause -> Dimension -> Alteration -> Export



All of a sudden, we made a connection!  When you "edit slicing profiles" (pictured left) you get the a python popup with a variety of options.  These correspond to the "craft" parameters.  We usually leave everything at the default settings except, of course, when we want to make multiple ducks. :)








So, what are all these steps?  Here is our research so far: (Still in progress... but I think my favorite so far is oozebane!)
  • Carve -> Defines characteristics of the printer, such as mesh type and layer thickness.  Thin layers improve the resolution of your print, but will significantly increase your print time,
  • Scale -> Scales the output
  • Bottom -> Controls the height of the lowest layer.
  • Preface -> 
  • Widen -> Widen walls which are less than a double perimeter width wide.
  • Inset -> Defines the inset.
  • Fill ->  Defines how an object should be filled.
  • Multiply -> Print many objects at once.
  • Speed -> This script is to set the feed rate and flow rate. The resulting thickness of the filament is a combination of feed rate, flow rate, and temperature.
  • Temperature -> 
  • Raft -> A raft provides a few initial layers laid down before the object itself.  A raft is optional, but often helps the object stick to the printbed (esp. with ABS)
  • Skirt -> This is an outline around the object (or raft) before the initial layer to get things extruding correctly.
  • Chamber -> This is to control bed and chamber temperature.
  • Tower -> 
  • Jitter -> Jitters the loop end position to a different place on each layer to prevent the a ridge from from being created on the side of the object. This tool will change where the layer start - for each layer. As result, you won't see vertical lines up the side of your print.
  • Clip -> Clip stops extrusions early in order to prevent plastic bumps at the end of a loop.
  • Smooth -> Smooths jagged extruder paths.
  • Stretch -> "Stretch is very important Skeinforge plugin that allows you to compensate for the fact that holes are smaller then they should be." (?)
  • Skin -> Smooth the surface skin.
  • Comb -> "Moves the extruder around inside holes to prevent stringers in those holes." (Not that I know what that means at all...)
  • Cool -> Cool is about giving each layer a little time to cool off before you put the next layer down on top of it. 
  • Hop -> Raises the extruder when it is not extruding.
  • Wipe -> 
  • Oozebane -> Control oozing.
  • Dwindle -> 
  • Splodge -> Turn on extruder "a bit earlier". (?)
  • Home -> Home the tool at beginning of each layer.
  • Lash -> 
  • Fillet -> Rounding of corners
  • Limit -> Sets limit on feed rates.
  • Unpause -> 
  • Dimension -> "5D option for Skeinforge" (Again, not sure what that means.)
  • Alteration -> Adds the start and end files. 
  • Export - >
At the end, you get your gcode, which looks something like this:



Thanks to the following blogs for help defining these terms: The 3D Printer, Skeinforge for RepMan, Makerbot's ReplicatorG support page, Skeinforge Craft.

More examples of toolpath generation progress:

iPad stand - large-sized, 20% fill

[23:11:19] Carve procedure took 1 second.
[23:11:20] Preface procedure took 0 seconds.
[23:13:30] Inset procedure took 2 minutes 10 seconds.
[00:00:51] Fill procedure took 47 minutes 21 seconds.
[00:00:59] Speed procedure took 8 seconds.
[00:01:25] Raft procedure took 26 seconds.
[00:01:35] Jitter procedure took 10 seconds.
[00:01:46] Comb procedure took 11 seconds.
[00:02:31] Cool procedure took 44 seconds.
[00:02:49] Dimension procedure took 19 seconds.
[00:02:54] Alteration procedure took 4 seconds.
[00:03:19] The exported file is saved as <snip>
[00:03:19] It took 52 minutes 1 second to export the file.


Boiling Chip - medium-sized, 15% fill

[06:52:21] Carve procedure took 11 minutes 32 seconds.
[07:03:53] Preface procedure took 12 seconds.
[07:12:19] Inset procedure took 8 minutes 27 seconds.
[07:24:14] Fill procedure took 11 minutes 55 seconds.
[07:24:24] Speed procedure took 10 seconds.
[07:29:31] Raft procedure took 5 minutes 7 seconds.
[07:29:51] Jitter procedure took 20 seconds.
[07:31:11] Comb procedure took 1 minute 20 seconds.
[07:32:09] Cool procedure took 58 seconds.
[07:32:44] Dimension procedure took 35 seconds.
[07:32:51] Alteration procedure took 6 seconds.
[07:33:20] The exported file is saved as <snip>
[07:33:20] It took 41 minutes 10 seconds to export the file.

No comments:

Post a Comment