Expand description
3MF: the mesh package, written with its own archive.
A 3MF file is a ZIP holding three parts: the content-types declaration, a relationship pointing at the model, and the model itself: an XML document of meshes and the items that place them. The mesh half is ordinary; the archive is the part a kernel usually reaches for a library to do, and this does not.
It writes stored entries (no compression), which the ZIP format has always allowed and every reader accepts: what a CAD kernel needs to write a ZIP is the container, not the codec. A file written this way is larger than one deflated, and says so by being what it is.
Reading is the other way round. Every package a slicer or a modelling
tool writes is deflated, so read_3mf inflates, with the decoder half
of DEFLATE kept in this crate, and reads the archive through its central
directory, where the sizes are, since a streamed entry leaves them out
of its local header.
Structs§
- Object
- One mesh in the package, with the name the item carries.
- Three
MfImport - What
read_3mffound. - Three
MfObject - One object of a package, placed as its build item places it.
Enums§
- Object
Type - What a 3MF object is for, as its
typeattribute says.
Functions§
- read_
3mf - Read a 3MF package into placed meshes.
- read_
package - Read every part of a package: the entry names and their bytes.
- write_
3mf - Write meshes as a 3MF package.