Z-Slicer: Lightning fast 3D slicer
OVERVIEW
Z-Slicer is a powerful 3D slicing library. It uses a fast GPU-based slicing algorithm and is capable of rapidly slicing large models (up to several GB / hundreds of millions of vertices), which other commonly-available slicers may struggle to process. It supports “unlimited” slice size (limited only by available RAM).
It supports advanced features such as anti-aliasing, repetitions, transformations (rotate + scale) and many others. It is capable of generating raster images in memory as well as PNG files and vector data (SVG files).
The ZSlicer command-line utility is provided free for non-commercial usage. As it is in continual development these are subject to ongoing change, and feature requests are welcome.
Support/requirements:
- Models: STL, 3MF
- Platforms: Windows, Linux/OSX (upcoming)
- License: Released to the community for general use. Free for non-commercial usage only.
USAGE
ZSlicer.exe <filename> <options>
Ensure to use double quotation marks for filenames that include spaces in the path
Examples
Slice “example.stl” using default settings
-o: Set the output directory to “example”
Slice “example.stl”
-v: With verbose (progress logging)
-re: Slice resolution (50 microns)
-t: Slice height (80 microns)
-sc: Scale each dimension by x: 1 times larger, y: 2, z: 1.5
-ro: Rotate in X: 45 degrees, Y: 60 degrees
-c: Cleanup previous files in the output directory
-o: Set the output directory to “example”
-fs: set the output slice output size to 1280x1024
Slice “example.stl” to SVG files
-o: Set the output directory to “example_svg”
-svg: Slice to vector SVG files instead of PNG
-svc: Set the SVG color (“green”)
Full Options
-h, --help shows this help text
Preview output [default = false]
Show a preview window with each slice as it is processed.
-o, --output <outputdir>
output directory [default = '' (output disabled)]
Output the sliced files to this folder. It will be created automatically if it does not already exist. Existing files will be overwritten without warning.
The default value (blank) will run the full slicer process (including previewing, if set) but will not output any files to disk
-pr, --prefix <file_prefix>
specify a prefix to add to the output file names [default = '']
Output files as <prefix><filename><slice index>.png
It can be used in addition to other naming options
-su, --suffix <file_suffix>
specify a suffix to add to output file names (before index) [default = '']
Output files as <filename>_suffix_<slice index>.png
It can be used in addition to other naming options
-fn, --use_filename
use filename in output files [default = false]
Output as <filename>_<slice_index>.png
-v, --verbose
Verbose mode
Output progress logging at regular intervals
-c, --cleanup
Cleanup (delete) slices from previous runs
Remove all the generated files in the specified output directory. If the output directory is not specified (default), cleanup is not performed.
-mxy, --multi_sample_xy <multi_sample_xy>
Enable XY multisampling (valid range if set is 2-8)
-mz, --multi_sample_z <multi_sample_z>
Enable Z multisampling (valid range if set is 2-8)
-aa, --anti_alias <level>
Enable XY supersample anti-aliasing (valid range if set is 2-8).
-un, --units <units>
units (mm=1, cm=2, inch=3 [default = 1]
Specify units, default is mm - this assumes that the original dimensions are in mm and applies a multiplier to scale all vertex coordinates (ie 10x for cm, 25.4x for inches)
-re, --resolution <resolution>
Specify the X,Y resolution of the output slice in microns [default = 50.0]
-t, --slice_height <slice_height>
Specify the Z resolution in microns (layer thickness) [default = 50.0]
-sc, --scale <x> <y> <z>
model scaling factor, 1 = full scale (x, y, z) [default=1.0, 1.0, 1.0]
Scale the model by this factor - this applies the specified multiplier independently in each dimension
-ro, --rotate <x> <y> <z>
model rotation in degrees (x, y, z) [default=0.0, 0.0, 0.0]
Rotate the model before slicing in X, Y, Z
-fs, --fix_size <output_width> <output_height>
set output size in pixels (width,height) [default = 0 0]
Fix the output resolution to a specified slice size
-cols, --step_cols <step_cols>
Repeat the 3D object n times across the tray (X)
-rows, --repeat_rows <repeat_rows>
Repeat the 3D object n times down the tray (Y)
-ss, --step_spacing <step_spacing>
Add spacing between repeated columns (in selected units) [default = 0]
-rs, --repeat_spacing <repeat_spacing>
Add spacing between repeated rows (in selected units) [default = 0]
-st, --start_slice <start_slice>
start slicing from slice (inclusive) [default = 0]
Specify the first slice to output
-en, --end_slice <end_slice>
end slicing at slice (inclusive; 0 disables this feature) [default = 0]
Specify the final slice to output. Note that negative indexing is supported here i.e. -1 will print up to the second-last slice (inclusive)
-ri, --reset_index
always start the output index at 0 [default = false]
Used in conjunction with –start_slice where you want to force the output sequence to start at 0
-io, --index_offset <index_offset>
add an offset to file numbering [default = 0]
Add an additional offset to the index, note this can be negative if desirable
-svg --save_to-svg
Generate vector data and save to SVG files instead of PNG
-svq --svg_quality_factor
Set the SVG generation quality factor (2-8) [default = 6]
-svc --svg_color
Set the SVG color (e.g. “red”, “blue, “green”, “white”)