--export-slicedata
<dir>Export the post-slice geometry for each plate as a tree of per-object JSON files so that a subsequent invocation with --load-slicedata can restore the slice state and bypass the geometry pass.
Details
After a successful slice, --export-slicedata <dir> serializes the computed slice geometry for every plate to a directory tree, so a subsequent invocation can load it with --load-slicedata and skip the geometry pass entirely. The flag accepts a path to an existing parent directory. Inside that directory it creates one subdirectory per plate, named by plate index (1, 2, and so on). Within each plate subdirectory it writes one JSON file per print object, with a filename of the form obj_<id>_<region_count>_<config_hash>.json. The identity portion comes from the model instance's recorded ID (falling back to an internal instance ID for older 3MF files); the region count and a combined hash of all print-region configs for the entire print are appended so that the cache filename changes automatically if the print settings change.
Each per-object JSON file captures the full geometric output of the slicing pass: every print layer with its Z position, slice height, and layer-height values; the sliced polygons and their bounding boxes; overhang polygons and their bounding box; the per-region extrusion data for each layer region; every support layer with its support islands and support fill extrusion paths; and the first-layer volume groupings used for first-layer checks. The JSON is written without indentation unless the log level is set to 4 (debug) or higher, in which case it is pretty-printed with four-space indentation.
Only objects that were actually sliced in the current run (those the engine marks as needing re-slicing, not shared copies reusing another object's geometry) are written. If a per-plate subdirectory cannot be created, or if writing any file fails, the CLI deletes the partial plate subdirectory and exits with a non-zero error code rather than leaving a partial cache behind. The export step runs only after slicing and G-code generation succeed for a plate; a slice error on any plate aborts before export occurs for that plate.
Watch out for
- ▲ The path you supply must be an existing directory; the slicer appends the one-based plate index to create each per-plate subdirectory automatically. Pointing `--load-slicedata` at the same parent path (not at a per-plate subdirectory) is the correct matching usage.
- ▲ Because the region-config hash is encoded in the filename, any change to print settings produces a new filename that `--load-slicedata` cannot match, causing it to fall back to a fresh slice for that object rather than erroring. This is intentional but means a stale cache directory is not an error — it is silently ignored.
- ▲ Objects that are shared (copies whose geometry is reused from another instance in the same print) are skipped during export and do not get their own cache file; `--load-slicedata` accounts for this and does not treat a missing file for a shared object as a failure.
Sign up for free today
No credit card required. Connect unlimited printers and get production automation running in minutes.