CLI Reference
layerforge
Slice an STL model into one SVG file per layer.
A setting comes from the command line first, then from a TOML file (--config, or layerforge.toml in the current directory), then from its default. Every option and the file are checked before the STL path is asked for.
Usage:
layerforge [OPTIONS]
Options:
--stl-file TEXT The path to the STL file. Asked for, after the
options are checked, if not given.
--config FILE A TOML settings file. Default: layerforge.toml in
the current directory, if it exists. The command
line overrides the file. The file that is used is
named on stderr.
--units [mm|cm|in] The unit of the model and of every length option.
It sets the physical size of each SVG. An STL
file has no unit, so this states it and nothing
is converted. Default mm.
--layer-height FLOAT The layer height, which is the thickness of the
sheet. Default 3.0 mm, stated in --units.
--kerf FLOAT The kerf: the width of material the tool removes.
It sets the smallest default mark size (1.5 x the
kerf). Default 0.3 mm, stated in --units. Use 0
for a CNC router or hand work.
--output-folder TEXT The output folder for SVG files.
--scale-factor FLOAT The scale factor to apply to the model.
--target-height FLOAT The target height for the model.
--mark-size FLOAT Size of every new mark. Default: the larger of 1
x the layer height and 1.5 x the kerf.
--mark-tolerance FLOAT Tolerance when matching existing marks. Default
0.1 x the mark size.
--mark-min-distance FLOAT Minimum distance from contours and between marks.
Default: the mark size.
--available-shapes TEXT Comma separated list of mark shapes. Default
circle,square,triangle,arrow.
--mark-angle FLOAT Default mark orientation in degrees. Default 0.0.
--cut-color TEXT The stroke colour of everything that is cut: the
outlines and the mark holes. An SVG colour such
as red, #f00 or rgb(255,0,0). Laser software
groups objects by colour, and you set the
operation for each group. Default red.
--engrave-color TEXT The colour of the number, which is engraved. A
name, #rgb, #rrggbb or rgb(r,g,b). Default black.
--number-height FLOAT The height of the layer number, which is engraved
on each piece, in the unit of the run. It must
fit clear of the outline, the holes and the
marks. Default 5 mm.
--help Show this message and exit.