3MF Format3MF is a 3D printing format along with AMF meant to supersede the STL format (see www.3MF.io for more details).
The 3D manufacturing format describes a packaged series of files use to define 3D-printable models in a similar way to CAD software, that is with the concept of components and multiple reference systems. A 3MF file is an archive, which can be opened with Winzip since it is compressed using a zipping algorithm. Under this archive can be stored thumbnails, printing tickets and other software specific files. Located in the 3D folder in the archive, 3dmodel.model is a xml file describing the model. You may extract it to analyse it. It is structured as follows, the attribute values given are examples: <model unit="millimeter" xml:lang="en-US" xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02"> <resources> <basematerials id="1"> <base name="" displaycolor="#b0b0be" /> </basematerials> <object id="2" type="model" pid="1" pindex="0"> <mesh> <vertices> <vertex x="-53.0978" y="72.4551" z="0" /> <vertex x="-53.0978" y="2.45509" z="0" /> <vertex x="-53.0978" y="2.45509" z="200" /> </vertices> <triangles> <triangle v1="2" v2="1" v3="0" /> </triangles> </mesh> </object> <object id="8" type="model"> <components> <component objectid="7" transform="1 0 0 0 1 0 0 0 1 0 0 0" /> </components> </object> </resources> <build> <item objectid="2" /> </build> </model> The resources element contains everything that could be used to create the model but are not necessarily used, these are uniquely identified by their attribute 'id'.
The basematerials element describes basic colours associated with names, the colours are read in hexadecimal as prescribed by the sRGB standard.
The object elements describe either a mesh or a component for meshes, they can also point to a default basematerial with the 'pid' and 'pindex' attributes.
In the mesh element are vertices and triangles, these are implicitly indexed by their position in their elements. The underlying vertex element reads the 3D coordinates and the triangle element links to its vertices by index, it may also contain 'pid' and 'p1', 'p2' and 'p3' which point to attributes attached to each vertex. Do note that with the currently supported version of 3MF (only the base specifications, no extension) p1, p2 and p3 must be equal if they are specified, p1 may also be specified on its own.
In the components element are referred objects and their associated local transformation. Note that the object must be described above in the document.
The build element defines what is to be printed/shown from the above resources. Each item element points to an object and potentially associates a transformation with it.
|