3MF Reader
| 3D Manufacturing Format | |
| File Extension | 3MF |
| Supported Versions | 1.2.3 |
| Platforms | |
| Tessellation | Read from file |
| B-rep | Unsupported by format |
| PMI | Unsupported by format |
3MF (3D Manufacturing Format) is an open-source file format designed 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.
How to Import From 3MF
To load a 3MF file with HOOPS Exchange, use the function A3DAsmModelFileLoadFromFile().
The structure A3DParamsLoadData is used to customize the loading behavior:
A3DAsmModelFile* pModelFile = 0;
A3DRWParamsLoadData sReadParam;
A3D_INITIALIZE_DATA(A3DRWParamsLoadData, sReadParam);
sReadParam.m_sGeneral.m_bReadSolids = true;
// ... set other A3DRWParamsLoadData fields as necessary
A3DAsmModelFileLoadFromFile("path/to/file.3mf", &sReadParam, &pModelFile);
See Simple Load and Export for more information about loading model files.
If you need more detail about the load parameters, see import_params_reference. For guidance on working with tessellation, consult extracting_tessellation.
Tessellation
Note that 3MF is a tessellation-only format. This means that when a 3MF file is read by HOOPS Exchange, only tessellation data is imported.
Due to the nature of the 3MF file format, tessellation information is directly read from the source without additional treatment.
Upon reading, use A3DRWParamsGeneralData::m_eReadGeomTessMode to decide whether tessellation is read.
The A3DRWParamsLoadData::m_sTessellation member is used to decide how this is performed.
For more information about tessellation in HOOPS Exchange, see Reading Tessellation.
Assembly Structure
Many 3MF files may contain multiple components or objects. HOOPS Exchange represents these as a model tree that you can traverse using the standard structure APIs.
To learn more about exploring assemblies, see assembly_traversal.
Format-Specific Notes
As noted above, 3MF is a tessellation-only format. Consequently, other data such as Product Manufacturing Information (PMI) and Boundary Representation (B-rep) are not supported by the format, including when using 3MF with HOOPS Exchange.