pub fn read_3mf(bytes: &[u8], tol: Tolerances) -> OgeomResult<ThreeMfImport>Expand description
Read a 3MF package into placed meshes.
The start part is the one _rels/.rels names as the 3D model. Its
objects are meshes or assemblies of components; a component, or a
build item, may name an object in another model part of the package
through the production extension’s path, as slicers write every
object to its own part. Each build item comes back as one mesh, its
components flattened and every transform applied, scaled from the
model’s unit to millimetres. A transform that mirrors has its triangles
rewound, so every mesh keeps its outward winding. Vertices the
flattening brings together within the confusion tolerance are welded.
A uniform object colour is kept, from a base material or a colour group; colours that vary across the triangles are dropped with a warning, as are texture and composite properties.
§Errors
OgeomError::Construction if the
archive cannot be read (see read_package), a model part is not
well-formed, a reference names an object that is not there or contains
itself, a triangle names a vertex that is not there, or the model
requires the secure-content extension.