To 3D print an object you have to slice it into a stack of 2D layers.
If your slices are thick, it prints fast, but the individual layers are obvious.
If you slice thin layers, the part looks nicer, but it takes longer to print.
What if you could have the best both in the same print?
Hi Steve here from Autodesk.
We wrote an algorithm that automatically slices STL files at variable layer heights to optimize
for both print speed and print resolution.
We like to call it VariSlice.
For a shape with a certain slope—say 45°—and a printer with a certain XY resolution—
for the Ember that’s 50 microns—there is an optimum layer thickness.
If your layers are too thick you aren’t getting the best XY resolution that you can.
If your layers are too thin, you’re printing extra layers that are not helping.
So that’s how we would determine the optimum layer thickness for a cone, a pyramid or triangular
prism.
But what about a shape with sections that each have a different slope?
This dome has 4 different slopes.
If we slice it at 100 microns, the more vertical section is sliced at the optimum resolution.
But the shallower slopes are not well approximated.
At 50 microns slices, this middle section is sliced optimally, but the bottom has more
slices than necessary, and the upper regions don’t have enough.
The dome sliced at 25 microns has the same problem.
And 10 micron slices are great at the top, but are overkill for the lower sections.
So to optimize, we take a range from each and combine them into a print with four different
layer thickness in it.
Looking down from the top, you can see that the edges of each layer moves in 50 microns
from the layer beneath it.
What if the shape has a continuously changing slope?
Like a dome or a disk?
Same basic principle.
Thicker slices are ok at the bottom, thinner slices are great at the top.
Because the slope is not discrete we want our layers to have a gradual change in thickness.
Here we’ve got layers ranging from 100 to 10 microns in steps of 5 microns.
So, it goes 100, 95, 90, all the way till 20, 15 and 10 microns.
Here’s a disk printed with variable layers.
Here it is compared to a disk printed at constant 100 micron slices.
At the base, both prints are the same, but at the top, the variable slicing looks much
better.
Now let’s compare it to constant 10 micron slices.
At the top they both look the same.
At the base, the 10 µm slices are definitely smoother, but that section also takes 10 times
as long.
Here’s a simple dumbbell shape and how it looks sliced with variable layers.
The vertical regions have 100 micron layers, the straight slopes are at 25 microns.
The curved regions have a smooth gradient in layer thicknesses.
Here’s that shape printed with variable layers, constant 100 micron layers, and constant
10 micron slices.
And here’s the variable layer print close up.
Compare that to 100 micron layers—there’s a big difference.
Now compare it to 10 micron slices.
The variable layer slices look almost as good—and it prints much faster.
Here’s a more real-world example.
This bolt has a head and un-threaded shaft that don’t require high tolerance so 100
micron layers work great.
For the threads, we want higher resolution, so 25 micron layers are good here.
This spur gear with a collar is mostly an extrusion—so it’s a good candidate for
thicker layers, but there are subtle fillets and chamfers.
Also, it uses thinner layers to keep fidelity in the threaded hole for a set screw.
Variable layer slicing will result in mostly thicker layers with thinner layers to capture
the finer details.
So how much time does variable layer slicing save compared to constant layer thicknesses?
It completely depends on your geometry!
On one extreme if your object has a long shaft capped with a dome you’ll approach a factor
of 10 times time saved—or the ratio of your thickest layer to thinnest layer.
On the other extreme, a short and wide pyramid, wouldn’t save you any time at all.
Various shapes will be somewhere in between.
A dome printed with variable layers ranging from only 25 to 10 microns closely approaches
the best it can do: about two and a half times faster.
So how does VariSlice actually work?
Here’s an STL, which is a collection of triangles in 3D space.
We start at the bottom of the 3D model, and we have a window of interest along the Z-axis.
The bottom of the window is our current Z-level.
The top of the window is the Z-level plus the thickest layer thickness—for us it’s
100 microns.
We select all of the triangles that overlap fully or partially with the window.
In this case we’ve got 8 triangles, 4 have 90 degree slopes and 4 have 63.4 degree slopes.
We look at just the smallest slope.
And we ask “is a 100 micron layer good enough?”
Which is the same thing as setting up this right triangle and solving for the stepover.
Then asking is the stepover less than or equal to our XY resolution? which it is—so we
say, “Yes, 100 microns is good enough.
Let’s build the first layer”.
We record the first layer thickness as 100 microns, and move our current Z-level up and
the window with it.
And the we repeat this step.
Now there are 22 triangles in this window.
10 of them have 90 degree slopes, 4 are 45 degrees, four are 26.6 degrees and 4 are 11.3
degrees.
So we look at the smallest slope, do the math, but nope!
100 microns will not cut it.
Now we can quickly figure out that 10 microns layers are needed for 11.3 degree slopes.
But instead of jumping right to it, let’s take an iterative approach.
We’ll step our window down from 100 to 95 microns.
Same result, not good enough.
So step down to 90, still no good, 85 nope, 80 nope.
But look what happens when the window is 75 microns tall.
The topmost triangles are no longer inside the window and now the smallest slope is 26.6
degrees, so that’s what we’ll test.
It’s still not good enough, so we keep stepping down the window height.
We get to 50 microns and the smallest slope is 45 degrees which finally satisfies our
condition.
So we build up the second layer, move up and repeat.
So again we start back at 100 microns and iteratively step down until we get a thickness
that works, here 25 microns, so we build it, move up.
Repeat.
Start from 100 all the way down to 10.
Build that layer and move up.
Look, we started from the bottom and now we’re here.
At the very top there are zero triangles in our window.
This tells us that we must be at the end of the model.
We’re done!
That’s the basics of how VariSlice works.
Now variable layer slicing has been done before.
This 2014 white paper describes an adaptive slicing scheme, which they cleverly coined
“AdapSlice”.
And this Master’s thesis from 1996, describes a method of creating thick internal layers
for increasing the print speed and thin external layers for maintaining surface fidelity.
Also it’s important not to confuse it with farming equipment.
“Vari-Slice for use in either worked or no till conditions, is ideal anywhere
a tight germination of grass seed is needed.”
So if you want to use VariSlice, here’s what you gotta do.
First, create a model in Fusion 360—which is free for students.
Import the STL into Meshmixer, which is free, slice it in Print Studio, which is also free.
Next use the Processing script we wrote, which is open and free, then send it to an Ember
printer, which is open.
If you don’t have an Ember printer, that’s ok!
The Processing script outputs a CSV table which you can adapt for your own 3D printer.
Check out the details in the Instructable linked in the description.
So, thanks for watching and subscribe to see our latest research in making software for
additive manufacturing.
Have a wonderful day.
[Cool sound effects]