Lib3MF is the reference implementation of the 3D Manufacturing Format file standard
Clone or download
t-paul and martinweismann Use Windows API for GUID generation on MinGW.
MinGW supports this API and adding libuuid to the Windows build is not
easy as this is part of the util-linux package which has lots of Linux
specific code.

This is tested via MXE based build for OpenSCAD.
Latest commit 2bf7b1c Nov 2, 2018


Build Status

Lib3MF is a C++ implementation of the 3D Manufacturing Format file standard.

As 3MF shall become an universal 3D Printing standard, its quick adoption is very important. This library shall lower all barriers of adoption to any possible user, let it be software providers, hardware providers, service providers or middleware tools. The specification can be downloaded at

Its aim is to offer an open source way to integrate 3MF reading and writing capabilities, as well as conversion and validation tools for input and output data. The 3MF Library shall provide a clean and easy-to-use API to speed up the development and keep integration costs at a minimum.

A lot of energy has been put into keeping it as platform independent as far as possible. For example, it compiles well with the GCC compiler, but there is some work left to recode a few platform specific functionalities, which are now covered by the WinRT platform (like XML parsing and ZIP compression). This will come when time passes.

Using lib3MF

The current code runs on Windows, Linux and Mac and has very little external dependencies.


  • Unix: uuid
    • Linux (Ubuntu/Debian): sudo apt-get install uuid-dev
    • MAC: brew install ossp-uuid

You then have two options:

A) Build lib3mf yourself

  1. Clone the repository
    git clone
  2. Enter local checkout
    cd lib3mf
  3. Initialize the googletest submodule by running
    git submodule update --init
  4. To generate projects for Visual Studio or Unix Makefiles use the scripts in the folder cmake:
    Call GenerateVS2015.bat (Windows) or (Linux, Mac), or define other targets by specifying custom CMake generators.
    A new folder build is created and contains projects for the IDE/build target you selected.
  5. Build the projects:
    • Windows:
      1. Open the VS Solution in the build folder and build it
      2. Select the project you want to run as "Start Up Project"
      3. Run/debug this project in VS
    • Linux/Mac:
      1. navigate to the build-folder
      2. Call make to build the projects
      3. Run/debug a project

B) Download the precompiled binary SDK of lib3mf

Instead of building lib3MF from source, you can download the compiled shared libarary as part of a minimal SDK from the official releases, or use the nightly builds.


For example code, please refer to the examples in the SDK (SDK/Examples). They are also part of the binary SDK from the official releases.


For a more detailed documentation, please take a look into the PDF in the root directory of this repository.


Lib3MF is licensed under the simplified BSD license.