This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

STL (.stl)

MIME type: application/sla
STL computer-aided design and manufacturing format.
3D geometry format.
Commonly used for representing solid models in rapid prototyping systems.
Native format of the 3D Systems stereolithography CAD software.
Developed in 1989 by 3D Systems, Inc.
STL is an acronym derived from stereolithography.
ASCII or binary format.
Binary STL files store data using little-endian byte ordering.
Stores a solid 3D object as a surface formed by a collection of adjacent triangles.
Does not store color information.
  • Export["file.stl", Graphics3D[...]] creates an STL file representing a solid physical model.
  • Import imports the specified element from an STL file.
  • Import imports multiple elements.
  • Export creates a binary STL file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Data representation elements:
"Graphics3D"STL file represented as a Graphics3D object
"GraphicsComplex"STL file as a GraphicsComplex object
"PolygonData"the polygon elements in indexed form
"PolygonObjects"list of Polygon primitives given in absolute coordinates
"VertexData"list of vertex coordinates
"BinaryFormat"whether the file is a binary or ASCII STL
ImageSizeAutomaticspecifies the overall size of the graphics to display
BackgroundAutomaticspecifies what background color to use
"BinaryFormat"Truewhether to write a binary or ASCII file
"SurfaceOrientation"Automaticspecifies how triangles should be oriented
  • Possible settings for are:
Automaticspecifies no orientation
{x,y,z}triangle faces are oriented toward the given point
Infinitytriangles face away from the origin of the coordinate system
Import a 3D model from STL and render it as Graphics3D:
Show the Import elements available in this file:
Test whether this file is a binary or ASCII STL:
Read the vertex coordinates represented in this file:
Construct a 3D model based on the evolution of a cellular automaton:
Export it to STL:
Import this file, rendering the model against a dark background:
Import a 3D model from STL and render it as Graphics3D:
In[1]:=
Click for copyable input
Out[1]=
Show the Import elements available in this file:
In[2]:=
Click for copyable input
Out[2]=
Test whether this file is a binary or ASCII STL:
In[3]:=
Click for copyable input
Out[3]=
Read the vertex coordinates represented in this file:
In[4]:=
Click for copyable input
Out[4]=
 
Construct a 3D model based on the evolution of a cellular automaton:
In[1]:=
Click for copyable input
Out[1]=
Export it to STL:
In[2]:=
Click for copyable input
Out[2]=
Import this file, rendering the model against a dark background:
In[3]:=
Click for copyable input
Out[3]=