Thinking in Three Dimensions

In order to turn a worm of hot plastic into an three dimensional object, I want to clarify what dimensions mean, and why we talk of real objects having three dimensions.

The Cartesian Plane

Imagine you are laser printing a drawing of a duck. An office laser printer works by fusing powdered plastic onto paper using a hot roller. (The laser in a “laser printer” is only used to make the powder stick to the roller by giving it a static charge, the laser doesn’t actually do the melting).

When you explain it, that office laser printer doesn’t sound very space-age after all; you don’t even get to see the laser. So let’s use my laser printer. This uses an actual industrial laser that has two sets of belts-and-rollers that can let the laser reach any point on the page. So the “print head” containing the laser can move to any location, then burn a dot. By moving the laser while turned on, it can burn continuous lines, or even curves.

Your picture of a duck has two dimensions, width (across the page) and length (down the page). In mathematics, we call this kind of measurement the Cartesian system after the inventor, French Mathemetician and Philosopher Rene Descartes (You may remember him from such famous philosophical statements as “I Think, Therefore I Am”).

We can move our laser to any point on our sheet of paper by measuring distance in from the left, and distance up from the bottom. The lines along which we measure distance are called “Axes” (pron. Axe-Ees). The singular term is “Axis” Axe-Iss).

Conventionally, the axis that measures the side-to-side dimension is named the “X Axis”, and the back-and-forth axis is named the “Y axis” (because mathemeticians like to give things names, but are plagued with poor imagination. When I invent a time machine I promise I’ll go back and suggest to old Rene that he call them “Ada and Beryl”).

This lets us describe a point on the page using two numbers, eg. we could say “X77, Y106” to mean “77 millimetres in from the left, and 106 millimetres up from the bottom”. Sometimes we leave off the axis names (and agree to always give the numbers in the order x-then-y) which lets us use a shorthand notation “(77,106)”.

The point on the page that we are measuring from (bottom left corner) is called the “origin”, so to reach a particular location we conceptually start at the origin, measure a distance across the page along the X-axis, then measure a distance along the page moving parallel to the Y-axis. The two numbers we use to describe a point are termed “co-ordinates” which is simply a fancy way of saying “two numbers”.

Of course, if our laser printer drew a duck by moving back to the origin, then measuring along X, then along Y for every single point in the drawing, this would get very boring. We can cheat by remembering our position at all times. If we are at (77,106) and we need to move to (70, 110) we can count on our fingers and decide that rather than going all the way back to the origin, we can simply move six millimeters to the left, and forward four millimetres, to reach (70,110). Then we make sure to remember our new current position, so that next time we need to move, we can take a similar short-cut.

X, Y, and Z

Now, imagine there was a tool that could make a solid model of a duck (Hey, there is, it’s in that cardboard box of parts in front of you. I didn’t want to overtax your imagination at this point. But I digress…) To describe a real duck, we need three dimensions, length, width, and height.

We call these X, Y, and Z. Our Z dimension lets us move above and below the “page” that is our sheet of paper.

What a 3D printer does is imagine your three-dimensional model as a series of “slices”, each about the thickness of a sheet of paper. If you were very patient, you could make a model of a duck by imagining slicing it into paper-thickness slices then cutting each slice out with a pair of scissors, and gluing the whole lot together. (There are actually machines that do this. It’s also conceptually similar to how a medial CAT-scan or MRI scan works).

With Fused Filament Fabrication (FFF), the printer takes a (relatively) thick plastic filament, melts it, and extrudes a very thin (0.4mm or less) line of molten plastic onto a flat page (the “print bed”). Just like piping “Happy Birthday” onto a cake with icing. Then it lays another layer on top, and another, and another. Every millimetre of your item will consist of approximately 30 to 100 layers (depending on your quality settings).

You can imagine this might take some time, and it can. Choosing how thick to make your layers is important if you want your cake to be ready in time for this birthday, not the following birthday.

Computer Numeric Control

The technical term for controlling machines (like drills, mills, lathes, my laser printer, and your 3D printer) with a computer is called “Computer Numeric Control” (CNC). There’s that famous mathematical imagination in action again!.

A CNC system has a conceptual “Axis” for each thing that the computer can control, each knob it can twiddle.

A FFF 3D printer often has four axes. Move left-to-right, move back-and-forth, move up-and-down, and push the filament in-or-out of the extruder. Instructions to the machine tell it how far to move along each axis, and also how fast to move (which we call the “feed rate”).

The tiny computer inside your printer accepts a list of instructions that might look like “Go to the location X100 Y200 Z11 at a feed-rate of 300 millimetres per minute while extruding 2mm of filament along the way”, which could be expressed as “G1 F300 X100 Y200 Z11 E2”.

You will be relieved to know that you don’t really need to know that.

But when you hear the term “G code” in relation to 3D printing, that’s what this means. It’s the long and tedious list of Go-There-And-Do-That instructions sent to the machine. It’s literally the Machine Code of CNC.

From objects, to surfaces, to layers

The items we are going to print are often called Things (with a capital T). To print a Thing we need to tell the machine how to move and extrude in order to construct each layer, one by one, from the bottom up.

But trust me, you don’t want to have to write down the move instructions (called “G-codes”) to print even a simple object. Fortunately, we have computers to do the tedious process of turning our desires into G-code.

You might say, “OK computer, make me cylinder twenty millimetres in diameter, and thirty millimetres high”, and then the computer will go away and think and come back with a representation of what you asked for.

This is Computer Aided Design (CAD).

Objects - Computer Aided Design (CAD)

To produce a design, we use Computer Aided Design software (or we simply download an existing design).

You may not need CAD software at all. You may find the Thing you need already designed and awaiting download at websites such as Thingiverse, MyMiniFactory or a search engine such as Yeggi.

When the time comes to produce your own design, there are hundreds of CAD packages to choose from, and selecting a tool appropriate for you will depend on your experience level, skills, inclinations and budget.

Here are my CAD software recommendations:

For the beginner (or those who want to work from a tablet such as iPad), Autodesk TinkerCad is a suitable design product. This free software is web-hosted; you simply need to register for an account in order to begin creating your designs inside your web browser. There are some very good tutorials that accompany the software.

For those with experience in software programming, you may like to try the OpenSCAD tool. This tool allows one to write simple computer programs that use Constructive Solid Geometry and Nested Transformations to render your design.

For the advanced designer, Autodesk Fusion 360 is well regarded, and will be capbable of handling any job you attempt.

Surfaces - Computer Aided Manufacturing

Once you have found or created a design, you need to render it as a surface that is ready for Computer Aided Manufacture (CAM).

Since there are hundreds of CAD packages, we use an intermediate format rather than require every CAM software to understand hundreds of CAD formats.

There are several intermediate formats in use; the most common for 3D printing is called “.STL” (short for Stereo LiThography), which represents your Thing as a network of linked triangles (much like the ever-so-slighlty blocky representations you may be familiar with from 3D video games and movie CGI).

An STL file is able to be used for many kinds of manufacture, such as milling, sintering, deposition or lithography.

We are performing Fused Deposition Modeling, which requires us to slice the surface encoded into the STL file into layers, which can be laid down in plastic filament by our printer. To do this we use a piece of CAM software called a “Slicer”.

Here are my FDM Slicer CAM software recommendations:

Ultimaker Cura 3D runs on Windows, Mac or Linux, and converts STL files to the “G-Code” format used by most 3D printers. Cura can save the sliced G-code to your computer, to a card, or transmit it directly to your printer over USB or Wifi.

AstroPrint is a website that allows you to upload your STL files and slice them for your printer. If your printer has wifi (or an attached AstroBox) you can transmit the G-code files directly to your printer. You can run the AstroPrint desktop software to slice your STL files, or download files from your cloud account. The combination of Tinkercad and Astroprint allows you produce and print 3D designs without requiring any locally installed software (useful if you are on a locked down work or school computer, or if you are using an iPad or other tablet).

Layers - Computer Numeric Control

Once we have a G-Code file that records the raw movements of the motors on the X, Y, Z, E (and other) axes, we need to send the G-code to the printer.

There are several ways to do this

  1. Place the G-code file on an SD card and insert it into the printer

  2. Use sender software such as Repetier Host

  3. Use a sender plugin for for your slicer (eg Cura, or AstroPrint Desktop)

  4. Use a dedicated sender computer (such as a Raspberry Pi running OctoPrint or AstroPrint)

The G-code file which you send to your printer will control heating up of the bed and extruder, priming of the extrusion nozzle, and then a long series of motor and extruder movements that will produce your object.