8.7.12

Arcs

The toolchain for 3D printers is broken.
By that I mean there is a fundamental flaw in it; at least for regular geometrical objects. The process is good for Yoda heads and other objects extracted from 3D scans, but it fails for designed objects that have anything other than rectilinear forms.
The fundamental problem is using STL files as an intermediate format. The contents of this file type is a series of triangles that describe the exterior boundary of the solid. If the design that creates the STL files has a cylindrical, spherical or other curvilinear solid body, the program that generates the STL file has to approximate this with a tessellated surface. Even very simple solids can generate thousands of planar faces in trying to represent the design in the limited vocabulary of planar triangles.
As an example, consider the simple cylindrical object and its STL equivalent:
Obviously, storing the three coordinates of each of the three triangle vertices and three direction numbers for the normal, takes considerable storage. This STL file is 100KB for an exceedingly simple object. This is the result for a high resolution output, but reducing the resolution causes more deviation between the flat triangles and the original object - in other words the printed object is not what was designed; holes get smaller, you can see facets instead of smooth surfaces, etc. As the hole size gets smaller the facets need to get smaller to keep the surface deviation small, so the number of facets is mostly independent of the scale of the object.
The problem is, downstream programs like ReplicatorG, Cura and Slic3r need to process all this crap data. The generated G code file for this example is 750KB. This is why slicing takes so long and baud rates to the machine need to be as high as possible.
There is a possibility to use arc G codes (G2 clockwise arc, G3 counterclockwise arc) with Marlin to reduce the number of G codes needed to print circular objects, but the only program that even tries to generate these G codes is Slic3r, and that is only an "experimental feature".
Why? Because it's a hard problem to reconstruct the original mathematical shapes that created the STL file. A long time ago, my professor said "You should always tell downstream programs what to do, not have them try and figure it out." That has proved out to be true time and time again. This means the instructions to the slicing code should be as rich and explicit as possible, rather than have the slicing code try to figure out what the intent is.
Certainly, eventually, there will be technology to reconstruct solid models out of STL files, but like colorizing black and white movies, or performing raster to vector conversion, the result is never as good as having the original data.
Why are we throwing out the information that can make 3D printing simpler? Why not start making color movies today and create (or adopt) a real 3D format for the use-case of printing designed (rather than scanned) objects?
The problem is, there are many formats (e.g. IGES, STEP, etc.), and figuring out which one would be best for the 3D printer community is also a hard problem.

7.7.12

Success with Cyanoacrylate

Cyanoacrylate "crazy glue".
Based on an Ultimaker Google Group post and Florian's comment on my ABS warping post, I went out in search of some cyanoacrylate to try and glue the first layer to the platform in order to avoid the warping when using ABS.
I located some glue that is mostly cyanoacrylate in the local hardware store. I sprung for the big 10g bottle of this "crazy glue", even though in my experience it dries up long before it gets used up.
The first problem is that this trick involves applying the glue to the corners of the print "while printing [the] first layer". If you've ever seen one of these Ultimaker machines run a small part, you'll realize there are two issues with that. The first is that the layer takes about 15 seconds to print, which isn't much time to futz around gluing the corners. The second issue is that if you get your fingers in the way of the moving head in that small print area you'll either a) hurt your fingers and/or b) shift the print by making the stepper motor skip (it's operating open loop, so it doesn't measure where the head actually is, it just counts steps, so if one or more steps fails to move the head, the location of layers above the skip are displaced).
So what you want is for the machine to stop for you so you can do the needful and then tell it to start printing again. Fortunately there's a code for that.
The G code M0 stops the machine and waits until the user presses the button on the Ulticontroller. If you don't have an Ulticontroller, you can still use it with a timeout via the S parameter.
So the workflow is

  • slice the stl file to gcode
  • manually edit the gcode file to insert the wait code
  • load the file into the printrun program
  • start the print
  • when it pauses, apply the glue to the corners
  • press the continue button (or let the wait timeout)
  • continue the print
So, where do you insert the G code when you edit the file? Here's the first few lines of the part G code file.

;TYPE:CUSTOM
M92 E854.177692541
G21        ;metric values
G90        ;absolute positioning
G28 X0 Y0  ;move X/Y to min endstops
G28 Z0     ;move Z to min endstops
G92 X0 Y0 Z0 E0 ;reset software position to front/left/z=0.0
G1 Z15.0 F400
G92 E0         ;zero the extruded length
G1 F75 E5
G1 E4.5
G92 E0         ;zero the extruded length again
G1 X100.0 Y100.0 F3500
G1 Z0.0 F400
G90 ;set positioning to absolute
G21 ;set units to millimeters
M105
M106
M113 S1.0
M108 S25.0
;TYPE:SKIRT
G1 X57.35 Y111.134 Z0.1 F9000.0
G1 F2400.0
G1 E1.035
G1 F9000.0
G1 X63.234 Y117.017 Z0.1 F1500.0 E1.0935
G1 X138.734 Y115.05 E1.6242
G1 X142.65 Y111.134 E1.6631
G1 X142.65 Y88.866 E1.8196
G1 X138.724 Y84.941 E1.8586
G1 X61.285 Y84.932 E2.4028
G1 X57.35 Y88.866 E2.4419
G1 X57.35 Y111.134 E2.5984
G1 F2400.0
G1 E1.5984
G1 F1500.0
;TYPE:WALL-OUTER
G1 X64.15 Y91.75 Z0.1 F4500.0
G1 F2400.0
G1 E2.6334
G1 F4500.0
G1 X71.25 Y91.75 Z0.1 F1500.0 E2.6833
G1 X71.25 Y93.85 E2.698
G1 X66.25 Y93.85 E2.7332
G1 X66.25 Y106.15 E2.8196
G1 X126.65 Y106.15 E3.2441
G1 X126.65 Y93.85 E3.3305
G1 X121.65 Y93.85 E3.3656
G1 X121.65 Y91.75 E3.3804
G1 X135.85 Y91.75 E3.4802
G1 X135.85 Y108.25 E3.5961
G1 X64.15 Y108.25 E4.1
G1 X64.15 Y91.75 E4.2159
G1 F2400.0
G1 E3.2159
G1 F1500.0
M0 S30 ; wait to apply glue
;TYPE:WALL-OUTER
G1 X128.65 Y94.15 Z0.1 F4500.0
G1 F2400.0
G1 E4.2509
G1 F4500.0
G1 X128.65 Y105.75 Z0.1 F1500.0 E4.3324
G1 X133.85 Y105.75 E4.369
G1 X133.85 Y94.15 E4.4505
G1 X128.65 Y94.15 E4.487
;TYPE:WALL-INNER
G1 X128.65 Y93.75 F4500.0
G1 X128.25 Y93.75 F1500.0 E4.4899
G1 X128.25 Y106.15 E4.577
G1 X134.25 Y106.15 E4.6192
G1 X134.25 Y93.75 E4.7063
G1 X128.65 Y93.75 E4.7456
G1 F2400.0
G1 E4.1456
G1 F1500.0
;TYPE:WALL-INNER

Too much glue, 2nd layer separates.
The location I used was after the first TYPE:WALL-OUTER that defines the corners (see the line in yellow), right after the extrusion retraction preparing for the jump to the second outer wall. This should leave less of a blob.
The first time I did it I applied too much glue and the second layer was pretty much mush, so it separated from the first layer.
The second time I was more careful, and used a Q-Tip to smear the drops of glue out a bit. I also increased the extrusion temperature from my normal 230°C to 240°C to get the second layer to stick to the (now colder) first layer.
I also turned off the cooling fan by unplugging it at the extrusion head. There's a code for that too (M107, fan off), but this didn't work for me. Something to investigate later.
This yields the desired result, although now, the blue tape is starting to lift from the print bed, so the print was still distorted a bit.
Successful attempt, although the blue tape is lifting at the corners.
You can't really see the tape lifting in the picture, but the hole is supposed to be round (naturally).
Before the print, I did do the best I could to make the tape adhere to the bed. If you shine a light from below the acrylic and you run your fingernail backwards over the tape if the tape isn't pressed down completely you can see a mark where your finger nail presses the tape fully into the bed.
The slight curvature can maybe be seen better when the part is removed from the printer.
Only slightly warped part.
Still, it's good enough.
You can see the part on Thingiverse.

4.7.12

ABS Warping

The two types of plastic commonly used in 3D printing are PLA and ABS. PLA is more brittle and hence a little less strong than ABS, which is what LEGO bricks are made of. Working with ABS, however, has a few more issues than PLA.
The biggest issue is the thermal contraction of the plastic after extrusion. As an example, consider the part shown here (a SmartPhone tripod mount).
Printing with PLA is no problem, but printing with ABS yields a part that is curved like a banana. The photo shows the PLA part (back) and the ABS part (front).
You can see that the plastic on the bottom layers has separated from the printing platform due to the stress of the cooling plastic in the layers above it. It's the same reason that leaves curl up when they dry out. There are a number of ways suggested to fight warping and curling. Most sites suggest a heated bed, which is an extra cost, non-standard item for the Ultimaker. Maybe later.

I first wanted to try design with mouse ears. This only works if you have the source file and not just the STL file so you can manipulate the solid model. This is one of my pet peeves with Thingiverse, most things only have the STL files. I predict that in 3 years, Thingiverse will be considered a junk yard and obsoleted by a site that requires solid models. But I digress.

Adding small ears to the part, and it looks like this.
This only ameliorates the problem. The part edges still lift from the bed while printing.
Oh well. Back to PLA I think.