Archive for Tutorial

Design for No-Support: 45 Degree Rule

The MakerBot and RepRap machines don’t have support plastics like the expensive 3D printing machines from Dimension, and while Skeinforge does have a “support gridding” option, at the moment you’re much better off altering your model so you don’t need it.  Today we’ll discuss making shapes more print-friendly with a minimum of impact to the shape of the final object.  The basic design rule is: no overhangs greater than 45 degrees.  If you always obey this, odds are you will never have a problem with dangling plastic noodles.

overhang01

This, however, is a rule that can be bent, and occasionally even broken, if you think ahead and in terms of 3D printing technology.  One key: overhang is size dependent.  A 2mm circular hole will print just fine with no teardropping, but a 2 centimeter hole will start to get droopy loops:

overhang02

Droop is also a function of how long the overhang goes on for.  If an edge of a layer is resting almost on thin air, but the noodle marking this perimeter only dodges briefly out over the abyss, it’ll likely hold firm, whereas a long trek can cause the whole thing to sag in the finished print.  You can even get away with short horizontal jogs out into nothingness if they’re brief, especially if they have someplace to go.  Note the test part with a square(!) horizontal cavity here:

overhang04

The truth is that both holes will probably be usable, although you’ll have to file off a bunch of ugly hanging plastic on the cavity to the left.  Horizontal overhangs shorter than a centimeter will often hold up just fine!  Thingiverse has a few examples of print jobs that bend the rules but still come out okay.

And this is all well and good for mechanical designs– you’re going for function, not form.  But what about your character designs?  How are you supposed to effectively design a figurine or a fantasy structure if you’re worrying about the mechanical limits of the plastic deposition?  The answer generally is: cheat!  If your character has arms that hang by its sides, put them up on posts.  If you have a dome, support it with pillars you can snap off after printing, like this:

If you’re really pressed, break your model up into pieces that can be glued together:

It’s best to think ahead from as early as possible when preparing these tactics of course– it can be a real nightmare to pick apart a model and add support structures or cut it apart.

Comments (8)

Design for Manifoldness: Inside and Out

If you’re using a Solid Constructive Geometry product like OpenSCad or SolidWorks, manifold geometry is automatic– you’re combining solid shapes to make other solid shapes.  SCG is a powerful technique with tremendous range, but a lot of more organic shapes are quite difficult to pull off with SCG, and more sophisticated mesh modelers are open source than SCG, so if you’re designing sans budget, mesh modeling might be your best option.  Also, a lot of artists use meshers, and to an experienced mesh modeler SCG can be pretty daunting.

But in mesh modelers, manifoldness is anything but automatic.  The natural flow of a design might not result in a solid mesh.  And a mesh that looks solid could have a tiny hole in it somewhere, have self-intersections, or have many faces with incorrect normal vector orientation.  This post is about making choices early in a design that will help you keep your geometry healthy!

» Continue reading “Design for Manifoldness: Inside and Out”

Comments (5)

Printability Week!

The tons upon tons upon TONS of excellent-looking entries to the Thingiverse contest have me thinking it might be a good time for a blanket design guide post.  Thingiverse is all about printable, sharable objects, which means a good entry should be as well-arranged for printing, cutting, or other fab technology as possible!  In this series of posts, we’ll be giving you pointers for getting your models from “pretty but it’ll never print” to “all the cool kids are printing it”.

The focus will be on designing for 3D printing technology, the system that runs MakerBot and RepRap.  We’ll make sure that if you don’t have a 3D printer, these posts will help you know what the operators are looking for in models to print.

Comments (3)

GCode Tutorial: Building Circles

Parametric Print Tutorial Set

In the previous GCode tutorial, we covered the creation of GCodes using Python, and introduced the basic structure of a script that uses GCode objects as a tool for creating GCode files.  In this tutorial, we’ll move from Para01.py to Para02.py in the first GCode Script Pack. In this file, we’ll start using the math library to create circles from straight GCodes.

First, a bit of bookkeeping.  Using trigonometric functions means getting back floating-point values with lots of decimal places of precision, but in a GCode file it’s usually a bad idea to have more than a few decimal places of precision, since it bloats serial operations and finer than 10um precision isn’t attainable on most current hardware anyway.  So we need a rounding function to truncate these floating-point numbers. My friend Ryan Vilbrandt was kind enough to lend me his:

gcode_tutorial_01

This is called from the GCode string output function later to make sure that the GCodes sent to the file are tidy.

In the next step, we’ll use the parametric formula of a circle:
X = cos (T)
Y = sin (T)

Inside the Zsteps loop from the previous example, we put a loop for Tsteps equal to two pi radians (360 degrees) minus a little bit.  Here we do 62 steps of 0.1 radian each:

gcode_tutorial_01_02

Smaller steps will make for shorter GCodes and a more perfectly circular curve, and larger ones will even produce visibly flat sides to the cylinder.  This script can be used to make shapes like octagons and pentagons by reducing the number of steps to the number of desired sides.  Additionally, by entering an integer multiplier into one or both of the trigonometric function arguments, this script can generate lisajous patterns.

There are a lot of shapes that can be build based off even this simple example– scripting GCodes directly isn’t going to work for every application, but it’s a great way to build certain classes of objects, and doesn’t require learning how to use a 3D modeling tool.

Leave a Comment

Python Scripted GCode: The Basics

Parametric Print Tutorial Set
This tutorial series will show off ways of making your own GCode files directly with python scripting.  In a lot of applications, it can be more efficient to work directly on GCode than to build a 3D model.  Further, directly modeling a shape can be less fiddly than skeinforge, particularly ones with single walls.

This tutorial will explain the file para_01.py found in the GCode Starter Kit. If you’ve never programmed before, you might want to study a few tutorials on the Python language, but this program is simple enough that if you’ve got the basics down, it shouldn’t be too hard to deal with this one.

The first few lines in this file are a “class definition” for an object called G1Code.  In the case of this file, this is just a handy way of storing the variables X, Y, Z, and F (F is feedrate) and a good place to put the function that makes a text GCode out of those variables:


#G1 Code Object
class G1Code:
def __init__(self, X=0, Y=0, Z=0, F=0):
self.X =X
self.Y =Y
self.Z = Z
self.F = F


def __str__(self):
string = "G1 X" + str(self.X) + " Y" + str(self.Y) + " Z" + str(self.Z) + " F" + str(self.F)
return string

With the above definitions in place, we can now access the coordinates in an object of type G1Code by adding a .X, .Y, .Z, or .F to the end of its name. We can also print a gcode just by calling str(G1Code). Next we’ve got some variable declarations:


filename = "test.gcode"
Zsteps = 0
ThisGCode = G1Code(X=0, Y=0, Z=0, F=1000)

This program only has one G1Code object– we just change its value repeatedly and write it out to the file after each change. Next, we’ll take that file name, open a text file, and write out headers. Thes GCode and MCode references explain how these settings tell the printer to operate in absolute coordinates, milimeters, and set up the extruder.


FILE = open(filename,"w")
FILE.writelines("G21\n")
FILE.writelines("G90\n")
FILE.writelines("M103\n")
FILE.writelines("M105\n")
FILE.writelines("M104 S220.0\n")
FILE.writelines("M101\n")

Now that we’ve got a header, it’s just a matter of using a loop in the program to lay down each layer of the shape. In the case of this program each layer is the simplest shape possible: a triangle.


for Zsteps in range(30):
#Hop up to the next level, staying put
ThisGCode.Z = 0.4 * Zsteps
FILE.writelines(str(ThisGCode)+ "\n")

#Trace out the prism
ThisGCode.X = 0
ThisGCode.Y = 0
FILE.writelines(str(ThisGCode)+ "\n")
ThisGCode.X = 0
ThisGCode.Y = -10
FILE.writelines(str(ThisGCode)+ "\n")
ThisGCode.X = -10
ThisGCode.Y = 0
FILE.writelines(str(ThisGCode)+ "\n")

(WordPress isn’t being friendly to my tabs, but they’re in the original file, and you do need them, because Python uses tabs instead of brackets to indicate loops and subroutines.)

Note that inside the loop there are four print commands.  The first one contains the value of the last GCode on the previous layer (or just zero if there is no previous layer) plus a slight vertical shift.  The other three move the print head first to the origin, then back ten milimeters, then diagonally down to a position ten milimeters left of the origin.  From that position, the next pass of the loop will move the print head up again, then around the triangle.

The print generated by this code isn’t very tall, or very large, or very tall, so you won’t waste a lot of plastic on messing around with the settings and trying new things.  Leave any questions in comments, and I’ll use that to gague whether the next one of these needs more or less of anything.

Comments (1)

Skeinforge Quicktip: The Raft, Part II

untitled-1

For the last Skeinforge tip, I’m going to run over the temperature and support settings, which are part of the raft dialog.  (Presumably this made sense when the software was being written.)

Support material settings:

The inexpensive 3D printers with which Skeinforge is commonly used do not have a secondary support material.  However, using the very plastic to be printed *as* a support material can be marginally successful.  The raft option “support minimum angle” defines how steep an overhang can get before skeinforge automatically adds threads of support plastic.  By entering different temperatures for “temperature of support layers” and “temperature of supported layers”, you can have the two kinds of extrusion happen at different temperatures.  Plastic extruded at a relatively low temperature tends to turn out more brittle, so making the temperature of support layers close to the minimum working temp (this can vary from machine to machine) can result in some fairly easy to remove support structures.  Setting up temperature change times between these two (time before support, time before supported) can seriously slow down a build, though.

Temperature settings:

I’m currently working under the logic that the raft should be extruded pretty hot so that it will adhere reliably to the base, but I defer to Nophead beyond that.  Skeinforge offers temperature options both for the main object (the “supported layers” and “next shape layers”) and the raft, but also has separate temperatures for the first layer outline, and the first layer infill.  Although the properties of ABS are fixed, it’s hard to get a dead-on calibration of the thermistor, so odds are you’re going to have to experiment with temperature settings a bit.

One thing I’ve had happen is that one of my settings in here was too low, and the plastic froze, causing the pinch wheel to strip the filament.  If you have an extruder that stops extruding at the same point in the build twice with a stripped filament, make sure none of the temperatures in this box are low enough to freeze your plastic.

Leave a Comment

Skeinforge Quicktip: Fill

skienforge_quicktip_03_01

Fill is a script that handles the interior of a given layer sliced by the carve script.  Objects can be made hollow or filled, or as is most common, somewhere in between.  For these hybrid cases, wall thickness can be adjusted, as well as the density of the internal threading to trade off between speed and strength or between strength and plastic used.

The Extra Shells options create additional lines which trace the outline of each layer, just inside the outer one.  I was never sure which layers were which between “alternating solid layers”, “base layers”, and “sparse layers”, so I keep them at the same value.  Extra layers aren’t necessary for all cases, and in especially light builds, they can be left at zero to print only the outermost layer as a solid line, with the interior of each layer printing only as sparse or nonexistent infill.  (Such builds can be prone to collapse during printing or fragile though!)  Cranking this up to three or so is important to getting good water-tight seals.

Infill options: inside each layer, skeinforge lays down a pattern of lines to fill in the interior of a model with strands of plastic, which may be very light or very dense depending on the settings.  Dense models of course are heavier, sturdier, and take longer and use more plastic.  The Infill solidity ratio is the ratio between the infill pattern and a fully-solid object.  Set to 1, this would solidly fill the inside of the object completely.  I’ve had trouble with setting it to zero for fully-empty builds, so when I want empty builds I just set it to 0.01 or such, which is fairly negligible in terms of plastic inside.  A value of 0.3 or so is pretty good for large, sturdy builds.  The infill odd layer extra rotation rotates the infill pattern every other layer, which at 90 degrees creates a square pattern if line fill is used.

I think the interior infill density ratio is a feedrate setting which moves the print head faster during infill pattern drawing to get lighter strands than the outer wall.  Anyone got a better definition?

The solid surface thickness is similar to the extra shells settings, but for horizontal layers.  Skeinforge makes this distinction because it’s different to have a solid fill pattern than to trace an outline.  This setting should be the same as the extra shells settings for builds with uniform thickness on all surfaces, like dice.  Also, low values for this may result in builds with tops that don’t close up fully (because the fill on the top layers sag into the sparse infill) or bottoms that aren’t fully watertight.

Comments (3)

Skeinforge QuickTip: Tweaking the Speed Knob

skienforge_quicktip_01_02

Skeinforge: Too Many Options

Skeinforge is a pretty big bundle of scripts, and having a first flawed build as your only reference point for going in and fixing the settings can be a pretty daunting task.  Rather than try to provide a full manual, I’m going to present this the way I learned it: one feature at a time.

There are probably well over a hundred teeny tiny knobs you can turn on this beast, but the first one we’ll cover, and one of the more important ones to getting decent builds, is the Speed control:

skienforge_quicktip_01_01

The Speed dialog box controls both how quickly the XY CNC machine will move and how quickly the extruder will push the filament.  If your default settings are giving you messy or stringy builds, this dialog can probably help you.

Key vocabulary words here: Feedrate and Flowrate.  Feedrate is how fast the tool head moves (or in the case of the MakerBot and McWire, how fast the XY table moves) and the Flowrate is how fast the extruder is extruding.  For a clean build, both of these need to be about right with respect to each other, and unfortunately I’ve found it to be a bit of a trial and error process.  (MakerBot users: got a favorite setting for this?)

I like to start from the assumption that I want maximum flowrate (255 on PWM settings) and then set the Feedrate high enough that the bot moves so quickly that this is okay.  This can cause trouble if you’ve got a bot that stops at the end of a line segment in skeinforge, as your effective feedrate will be much slower in more polygon-dense areas.  However, I think the current firmware for the MakerBot and other Sanguino-based implementations has buffering which solves this problem, so going for a high feedrate/flowrate pair is probably ideal in most cases.

With the flowrate set where you like it, you’ll find higher feedrates result in stringy, sparse builds if it’s set too high, and gloppy, heavy builds which rip off the build base as the nozzle picks past dried plastic if it’s set too low.  (I find the latter is way more unpleasant than the former, so I shoot high on feedrate.)

More Skeinforge tips to follow: one bite at a time, it is learnable.

Comments (6)

Blender Select Modes

blender_quicktip_10_01

Today’s Tutorial is by Roger Waggener, professional Blender user!

You can save time editing meshes in Blender by using the different select modes.

When you enter edit mode (by hitting tab with an object selected in object mode) the header of the 3d viewport window changes. Some things disappear, some things appear. Among the things that appear are the select mode buttons. They are three buttons that choose which select mode(s) to use. The left-most one, the vertex select mode button, has three dots on it; the middle one, the edge select mode button, has a single diagonal line on it; and the right-most one, the face select mode button, has a triangle on it.

blender_quicktip_10_05

Vertex select mode is the default and the mode that is probably what you have been using if you aren’t already familiar with this topic. When vertex select mode is active, the button with three dots on it is highlighted and you can interact with individual vertices. Vertex select mode can be very useful when you need it, but it is frequently inefficient for complex selections or many selections of different parts of a mesh.

blender_quicktip_10_02

Edge select mode can save a lot of time when you have several faces to make. Click the edge select button (the one with the line on it) and you will see that the vertex dots disappear. You can now select edges. This makes it quick and easy to move sets of two vertices at once (two vertices make an edge), but also it can speed up creating faces since instead of selecting three or four vertices to make a face, you can simply select two edges. Not only have you saved two clicks, but since edges are larger on the screen than vertices, you have saved time targeting what you want to click. (see Fitts’s Law)

blender_quicktip_10_03

By now you can probably guess what face select mode does. Face select mode is not always as useful for basic mesh editing as vertex or edge mode, but can be very efficient for loop selections and extrusions.

blender_quicktip_10_04

An interesting thing to note about the selection mode buttons is that you can shift-click them to enable more than one mode at once. In fact, you can have all three active at the same time which can make modeling very speedy, but can sometimes make it a bit fiddly to select exactly what you want if you don’t place your clicks carefully.

Try using different select modes and see how much faster you can edit your meshes.

Comments (5)

Blender Quicktip: The Mirror Modifier

blender_quicktip_09_03

The mirror modifier operates in the same framework as the subsurface modifier from the previous tutorial: the modifier stack.  Blender keeps track of a wide variety of operations in this stack, allowing a user to perform transformations without making them permanent or removing the original information that defines the base object.

Let’s start with the output of one of the third-party scripts, the human head generator:

blender_quicktip_09_01

This isn’t much use as half a head, so we hit the same Add Modifier button from the subsurface tutorial:

blender_quicktip_09_06

With the mesh mirrored, we can edit it in edit mode and the edits get copied to the other side:

blender_quicktip_09_04

Hitting the apply button will save the mirrored mesh points into the mesh, which is useful if you want to start with something symmetrical and then begin modifying only one side:

blender_quicktip_09_05

Comments (5)