:orphan:

##########
STL Writer
##########

.. rst-class:: format-title-block

+----------------------------------------------------------------------+
|                                   **Stereo Lithography (STL)**       |
+---------------------+-------------------+----------------------------+
| **File Extension**: STL                 | STL                        |
+---------------------+-------------------+----------------------------+
| **Supported Versions**                  | Any                        |
+-----------------------------------------+----------------------------+
| **Platforms**                           | |wy| |ly| |my| |an| |iy|   |
+-----------------------------------------+----------------------------+
| **Tessellation**                        | |t_green| Supported        |
+-----------------------------------------+----------------------------+
| **B-rep**                               | |c_grey| N/A               |
+-----------------------------------------+----------------------------+
| **PMI**                                 | |c_grey| N/A               |
+-----------------------------------------+----------------------------+

The STL (STereoLithography) file format was created by 3D Systems in 1987, under the direction of Chuck Hull, who is also credited with inventing stereolithography (SLA), a foundational 3D printing technology. The format is widely used for rapid prototyping and computer-aided manufacturing, describing the surface geometry of three-dimensional objects using a mesh of triangles.

STL is a widely-used file format for representing :doc:`3D surface geometry </guide/geometry>`
It is commonly employed in various industries such as manufacturing, engineering, architecture, and entertainment for creating and exchanging 3D models.
The STL format describes the surface geometry of a 3D object using a collection of triangular facets, providing a simple and efficient representation of complex shapes.
This format is particularly suitable for applications requiring rapid prototyping, computer-aided design (CAD), and 3D printing.

Our support for STL covers :doc:`reading <stl_reader>` and writing any version of the STL file format for Windows, GNU/Linux and macOS.
As a tessellation-only format, we only export tessellation data. 

How to Export to STL
====================

Our STL writer supports any version of the STL format.

To export a model file to STL format, call :cpp:func:`A3DAsmModelFileExportToStlFile`.
The format-specific :cpp:struct:`A3DRWParamsExportStlData` is used to describe how to export it.

.. code-block:: c

   A3DRWParamsExportStlData sParamsExportData = A3D_MAKE_DATA(A3DRWParamsExportStlData);
   // ... set export parameter options

   A3DAsmModelFileExportToStlFile(pModelFile, &sParamsExportData, "path/to/file.stl");
