Overview
Mslicer uses a custom binary format for saving and loading projects. Project files store all scene information including models, transformations, slice configuration, and post-processing settings.File Structure
Project files use a binary serialization format with the following top-level structure:- Version Header (2 bytes) - Format version identifier
- Slice Configuration - Platform and exposure settings
- Post-Processing Settings - Anti-aliasing and elephant foot compensation
- Model Information - Metadata for each model in the scene
- Mesh Data - Shared mesh geometry (deduplicated)
Version
Current project file format version. Files with mismatched versions cannot be loaded.
Project Structure
A project contains the following components:Slice Configuration
TheSliceConfig includes:
- Output format (Goo, Ctb, NanoDLP, Svg)
- Platform resolution and physical size
- Layer height
- Exposure configuration for regular layers
- Exposure configuration for first layers
- Number of first and transition layers
Post-Processing
Post-processing settings control how layers are modified after slicing:Model Information
Each model in the scene is stored with:Mesh Deduplication
Mslicer optimizes file size by deduplicating mesh data. Multiple models can reference the same mesh geometry, only storing the unique transformations for each instance. For example, if you have 10 copies of the same model with different positions, only one copy of the mesh vertices and faces is stored.Serialization Format
Model Serialization
Mesh Data Serialization
Loading Projects
When loading a project:- Version check - Ensures file version matches current format
- Deserialize configuration - Loads slice and post-processing settings
- Load model information - Reads all model metadata
- Load mesh data - Deserializes unique mesh geometries
- Reconstruct models - Creates model instances by combining mesh data with transformations
Saving Projects
When saving a project:- Build mesh map - Identifies unique meshes across all models
- Write header - Version and configuration
- Write models - Serializes model information with mesh references
- Write meshes - Serializes unique mesh data
Error Handling
Common errors:- Version mismatch: File was created with a different format version
- Corrupted data: File is incomplete or damaged
- Invalid mesh references: Model references non-existent mesh
Example Usage
Saving a Project
Loading a Project
Performance Considerations
- Mesh deduplication significantly reduces file size for scenes with many instances
- Binary format is more compact and faster than text-based formats
- Streaming deserialization allows progress tracking for large files
- No compression - Files are uncompressed binary data
See Also
- Supported Mesh Formats - Input mesh file formats
- CLI Options - Configuration options stored in projects