:orphan:

##########
3MF Writer
##########

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

+----------------------------------------------------------------------+
|                       **3D Manufacturing Format**                    |
+---------------------+-------------------+----------------------------+
| **File Extension**                      | 3MF                        |
+---------------------+-------------------+----------------------------+
| **Supported Versions**                  | 1.2.3                      |
+-----------------------------------------+----------------------------+
| **Platforms**                           | |wy| |ly| |my| |an| |iy|   |
+-----------------------------------------+----------------------------+
| **Tessellation**                        | |t_green| Supported        |
+-----------------------------------------+----------------------------+
| **B-rep**                               | |c_grey| N/A               |
+-----------------------------------------+----------------------------+
| **PMI**                                 | |c_grey| N/A               |
+-----------------------------------------+----------------------------+


`3MF (3D Manufacturing Format) <https://en.wikipedia.org/wiki/3D_Manufacturing_Format>`__ is an open-source file format designed specifically for additive manufacturing.

Developed by the 3MF Consortium, which includes major industry players, the format aims to provide a comprehensive and interoperable model.

3MF supports detailed specifications of object geometries, colors, materials, and other properties essential for 3D printing, ensuring that designs and their intentions are transmitted accurately and effectively between different software applications and printers.

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


How to Export to 3MF
--------------------

To export a model file to 3MF format, call :cpp:func:`A3DAsmModelFileExportTo3mfFile`.
The format-specific :cpp:struct:`A3DRWParamsExport3mfData` is used to describe how to export it.

.. code-block:: c

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

   A3DAsmModelFileExportTo3mfFile(pModelFile, &sParamsExportData, "path/to/file.3mf");

See the "Direct Integration" section of :doc:`/guide/basic_operations/load_model` for general information about writing model files.

To understand and manipulate the model tree before export, see
:doc:`assembly traversal </tutorials/c/print-assembly-structure>` or the :doc:`Tree Traversal API </guide/tree_traversal>`.

Before exporting, ensure that the model contains the geometry and tessellation
you expect. See our pages on :doc:`tessellation  <guide/geometry/getting_tessellation>` for tips on generating visualization data for export.