pub struct ThreeMfInstance {
pub object_id: u32,
pub mesh: usize,
pub transform: [f64; 12],
pub first_vertex: usize,
pub vertex_count: usize,
pub first_triangle: usize,
pub triangle_count: usize,
pub name: Option<String>,
}Expand description
One placement of one mesh: a <build><item>, or a <component> reached
through one, with the transforms from the item down composed.
Fields§
§object_id: u32The mesh-bearing object placed (not the item’s objectid when the item
pointed at a <components> object).
mesh: usizeIndex into ThreeMfReadResult::meshes.
transform: [f64; 12]The composed 3x4 row-vector transform, in 3MF attribute order
(m00 m01 m02 m10 m11 m12 m20 m21 m22 m30 m31 m32), translation in mm.
first_vertex: usizeWhere this instance’s geometry sits in the flattened buffers: its
vertices are positions[first_vertex * 3 ..][.. vertex_count * 3] and
its triangles indices[first_triangle * 3 ..][.. triangle_count * 3].
Instances are laid out in order and never share a vertex, which is what
lets a consumer take one body out without re-flattening the build.
vertex_count: usize§first_triangle: usize§triangle_count: usize§name: Option<String>The placed object’s name, or failing that the nearest named
<components> object above it; None when nothing on the way was
named. Carries no geometry.