1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//! Core data model for 3MF files.
//!
//! This module contains the in-memory representation of a 3MF document, including all geometry,
//! materials, build instructions, and extension data.
//!
//! ## Key Types
//!
//! - [`Model`]: The root structure representing an entire 3MF document. Contains resources,
//! build instructions, metadata, and attachments.
//! - [`ResourceCollection`]: Central registry for all resources (objects, materials, textures)
//! using a global ID namespace within the model.
//! - [`Object`]: A 3MF resource representing geometry or components. Can be a mesh, support,
//! surface, solid support, boolean shape, or other type.
//! - [`Mesh`]: Triangle mesh geometry with vertices, triangles, and optional beam lattice data.
//! - [`Build`]: Collection of [`BuildItem`]s that define which objects to print and where to
//! position them.
//! - [`BuildItem`]: An instance of an object in the build volume, with optional transformation.
//!
//! ## Material System
//!
//! Materials are applied to geometry via property IDs (`pid`):
//!
//! - [`BaseMaterial`]: Simple named materials with optional display color
//! - [`ColorGroup`]: Per-vertex or per-triangle color assignments
//! - [`Texture2DGroup`]: Image-based materials with UV coordinates
//! - [`CompositeMaterials`]: Blended combinations of base materials
//! - [`MultiProperties`]: Multi-channel property assignments
//!
//! Materials can be assigned at the object level (default for all triangles) or overridden
//! per-triangle or per-vertex.
//!
//! ## Extension Support
//!
//! The model includes first-class support for 3MF extensions:
//!
//! - **Beam Lattice**: [`BeamLattice`] and [`BeamSet`] for structural lattices
//! - **Slice**: [`SliceStack`] for layer-based geometry
//! - **Volumetric**: [`VolumetricStack`] for voxel data
//! - **Boolean Operations**: [`BooleanShape`] for CSG operations
//! - **Displacement**: [`DisplacementMesh`] for texture-driven surface modification
//! - **Secure Content**: Cryptographic features (see [`secure_content`] module)
//!
//! ## Design Philosophy
//!
//! The model follows an **immutable-by-default** design:
//!
//! - All structures derive `Clone` for easy copying
//! - Modification happens via explicit operations (e.g., [`MeshRepair`] trait)
//! - Thread-safe by default (no interior mutability)
//! - Predictable behavior: functions don't have hidden side effects
//!
//! ## Re-exports
//!
//! For convenience, all public types are re-exported at the crate root via `pub use model::*`.
//! You can use `lib3mf_core::Model` instead of `lib3mf_core::model::Model`.
/// Build instructions — `Build` and `BuildItem` types.
/// Root `Model` struct and its `validate` / `compute_stats` methods.
/// XML-DSIG crypto data structures used by the Secure Content Extension.
/// Material and texture types (colors, base materials, composites, etc.).
/// Mesh geometry types (`Mesh`, `Triangle`, `Vertex`, `BeamLattice`, etc.).
/// Multi-part `Package` type for Production Extension multi-model files.
/// Mesh repair operations (`MeshRepair` trait and `RepairStats`).
/// Cross-file component resolver (`PartResolver`, `ResolvedMesh`, `ResolveOptions`).
/// `ResourceCollection` — central registry for all model resources.
/// Secure Content Extension key store types (`KeyStore`, `Consumer`, etc.).
/// Slice Extension types (`SliceStack`, `Slice`, `Polygon`, etc.).
/// Model statistics types returned by `Model::compute_stats()`.
/// Internal implementation of `compute_stats()` — not part of the public API surface.
/// Unit of measurement enum and conversion utilities.
/// Volumetric Extension types (`VolumetricStack`, `VolumetricLayer`, etc.).
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use ;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;