$\newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&}$

## Section7.1STL file Creation in CalcPlot3D

One of the CalcPlot3D's newest features is its ability to save a surface to an STL file. This STL file can then be used to print a solid 3D surface model using a 3D printer, sometimes called a rapid prototyping machine. For example, here are the saddle, $z = x^2 – y^2\text{,}$ and the parametric surface I call the Big Knot.

In order for the STL file to work well with the 3D printer, the surface must be given sufficient thickness. To address this issue, CalcPlot3D will automatically give the thickness you specify to a surface before creating the STL file. The app must create a closed solid to represent the surface if you wish it to print on a 3D printer.

To give this feature a try, first find a surface that you would like to print to a 3D printer and graph it with CalcPlot3D.

1. Open CalcPlot3D.
2. From the File menu select Create an STL file from the plot. A dialog will appear like the one below.

3. Enter the name you wish to give to the solid, and then enter the approximate size you expect to print it at and the desired thickness. These will be used together with the dimensions of the 3D plot window to determine the approximate correct thickness to use with the surface to account for the scaling to be done in the printer application. You may need to experiment a little with these values and your 3D printer software to get the thickness just right.
4. If the surface you wish to print is already a closed 3D surface like a sphere or a torus, you can specify that no thickness be given to the surface before printing, or you can still use a thickness, depending on how you desire the printer to fill the void inside the closed surface. In this case, if you choose to give the closed surface a thickness, you will need to choose between using the Opposite Normals direction (generally inside the closed solid), the Normal Direction (generally outside the closed surface), or the Half-and-Half option, which goes both directions half the thickness and creates two new shells with the same basic shape.
5. The Half-and-Half option is always best for surfaces that flip orientation in the middle of a surface like a Möbius Strip or a Klein Bottle.
6. Use the View Solid button to see what the surface/solid will look like before saving the STL file. Note that this can take a little while, during which the cursor will remain a hand. The more faces you have in the plot (for a more accurate printed solid), the longer this processing will take.
7. For regular surfaces given by functions of two variables like the saddle above, I prefer the $z$-shift down option since it preserves the exact shape of the surface on the bottom as well as the top of the printed surface. But you need to compensate for the fact that the thickness will vary over the surface and be least thick where the surface is steepest in the $z$-direction.
8. Once you see the solid in the plot, you can click on the plot and then type the n-key to view the surface normals of every triangular face in the plot. This can look a little busy, but can be helpful to check, as it is generally preferred (and possibly required) that the normal vectors of all faces point outwards. Sometimes this may require you to adjust the parameterization of a parameterized surface, for example.
9. Before saving the STL file, note that you can select either a Binary STL file (the default) or an ASCII STL file. The benefit of the Binary STL file is that it is much smaller than the ASCII STL file (about 1/5 the size). The benefit of the ASCII STL file is that you can actually read it to view the normal and vertices of each face.