Slicing Process
Prev: Part 11: Creating Your First Slicable Device
In this step, you will run the slicer to convert your device into a print-ready output bundle. This is the moment where geometry, settings, and device size are combined into layer-by-layer images and metadata.
Step 1 — Create the slicer
The slicer needs three things:
- The
deviceyou created in Step 9 - The
settingsobject (printer + resin + defaults) - A filename prefix for output
from pymfcad import Slicer
slicer = Slicer(
device=device,
settings=settings,
filename="my_first_slicer_output",
minimize_file=True,
zip_output=True,
)
Checkpoint: You now have a slicer object configured for your device.
Step 2 — Generate the print file
slicer.make_print_file()
This will write the slicing output to a new folder using the filename you chose. The output usually includes:
- A JSON settings file (device + print metadata)
- Layer images (one per slice)
By default the file is zipped. This can directly be uploaded to one of our custom printers. If you need to further modify or view the sliced output you can instead export to a folder.
Checkpoint: You should see a new output ZIP (or a folder) in your working directory.
Common slicing options
You can adjust slicer behavior with a few key flags:
minimize_file=Truereduces file size by minimizing JSON and images.zip_output=Trueproduces a compressed archive instead of a directory.filenamecontrols the output folder name (keep it short and descriptive).
Use defaults for your first run; adjust only after verifying the output in Part 13.
Quick troubleshooting
If slicing fails, check:
- The device size matches the printer’s light engine resolution.
- Bulk shapes exist.
- If you need negative features, the device has at least one void.
- Your
settingsJSON contains a valid printer and resin (includingbulk_exposure).
Next
In Part 13, you will inspect the slicer output, understand the JSON schema, and learn how to validate layer images and metadata.