How Printer Presets Work
Printer presets are defined in the application’s configuration file (config.toml) and are loaded at startup. When a preset is selected, it automatically sets the platform_resolution and platform_size values in the slice configuration.
PrinterDefaults Structure
Printer presets are defined by thePrinterDefaults struct in mslicer/src/app/config.rs:43:
The display name of the printer preset shown in the UI dropdown.
The LCD screen resolution in pixels (width × height).Example:
Vector2::new(11_520, 5_120) for 11,520 × 5,120 pixelsThe physical build platform dimensions in millimeters (width × depth × height).Example:
Vector3::new(218.88, 122.904, 260.0) for 218.88 × 122.904 × 260.0 mmDefault Preset
Mslicer includes one built-in preset by default:- Elegoo Saturn 3 Ultra
- Resolution: 11,520 × 5,120 pixels
- Build Size: 218.88 × 122.904 × 260.0 mm
mslicer/src/app/config.rs:114.
Creating Custom Presets
You can add custom printer presets by manually editing theconfig.toml file in your configuration directory. Access this directory through the Workspace tab in Mslicer.
Configuration File Format
Add printer presets to the[[printers]] array in config.toml:
Finding Your Printer’s Specifications
To create an accurate preset, you’ll need:- LCD Resolution: Check your printer’s specifications or manual for the pixel dimensions
- Build Volume: Note the X, Y, and Z dimensions of the build platform in millimeters
The resolution and size values must match precisely for accurate slicing. Incorrect values will result in models being sliced at the wrong scale.
Using Presets in the UI
The printer preset selector is located in the Slice Config window (mslicer/src/windows/slice_config.rs:60):
- Open the Slice Config panel
- Use the “Printer” dropdown to select your preset
- Hover over a preset name to see its resolution and build volume
- Select “Custom” to manually configure platform settings
Custom Mode
When “Custom” is selected (selected_printer == 0), you can manually adjust:
- Platform Resolution (using drag controls)
- Platform Size (X, Y, Z dimensions)
Preset Loading
Presets are loaded fromconfig.toml at application startup. The configuration is deserialized into the Config::printers vector, which contains all available PrinterDefaults entries.
When a preset is selected, the UI automatically:
- Updates
slice_config.platform_resolutionto match the preset - Updates
slice_config.platform_sizeto match the preset - Recalculates model bounds to ensure they fit within the build volume