3D-printing

Introduction

One way of printing a 3-D object is develop the design in a software package and the to write out the design in something called stl format. This is also known as Standard Triangle Language. The shape is described by a triangular format. The 3D printer takes the stl file and it creates the object.

One simple software system to create the stl file is to use the online system tinkercad.

One disadvantage of tinkercad is that there is no way to program it. This makes it hard to use for advanced mathematics applications, such as those described here.

Exercise 1

This uses the openscad package to convert a surface stored as a text file, originally written by a python code, into a stl file which can be printed on a 3D printer. This example is a minor modification of the code in this book.

Here are the steps to get it to work

    • Download the openscad package from here

    • There is an example python file on trinket

    • The torus.dat file from the web browser should be pasted into a file called torus.dat in the same directory as the input file to SurfaceFromData.scad

    • The file SurfaceFromData.scad is the input to the openscad program. It creates the 3D model, which can be saved as a stlfile.

The low res image from the web browser code

If the python code is modified so that numx = numy = 100, a much more useful image

is obtained.

Unfortunately, these parameters are too large for the web browser, but work fine on a standalone code.

The first step is to reproduce the above 3D plots. Next the python code should be modified to implement the specified function.

Resources

Software

To use a 3D printer the design must be written into a file in the stl format.

One important issue is making sure that the design in the STL file is actually printable.

    • Many people on the web recommend using netfab to check the stl file and repairing any problems. The version I downloaded wouldn't import any stl files. I did run a stl file through the online version of netfab. (this requires a Microsoft account).

    • The online system Sculpeto also claims to have an online system to repair holes in any stl files. (I also ordered a print of a cheap design from them.)

    • There is a free online viewer of stl files at