Content-type: text/html; charset=UTF-8 Man page of PYCAM


Section: PyCAM manual (1)
Updated: March 2017
Index Return to Main Contents


PyCAM - Toolpath Generation for 3-Axis CNC machining  


pycam [,options/] [,inputfile/]  


Start the PyCAM toolpath generator. Supplying one of the '--export-?' parameters will cause PyCAM to start in batch mode. Most parameters are useful only for batch mode.  


-h, --help
show this help message and exit
General options:
load a task settings file
choose 'mm' or 'inch' for all numbers. By default 'mm' is assumed.
choose a specific collision detection engine. The default is 'triangles'. Use 'help' to get a list of possible engines.
specify if the mill tool (including its radius) should move completely 'inside', 'along' or 'outside' the defined processing boundary.
override the default detection of multiple CPU cores. Parallel processing only works with Python 2.6 (or later) or with the additional 'multiprocessing' module.
enable a local server and (optionally) remote worker servers.
Connect to a remote task server to distribute the processing load. The server is given as an IP or a hostname with an optional port (default: 1250) separated by a colon.
Start only a local server for handling remote requests.
Secret used for connecting to a remote server or for granting access to remote clients.
-q, --quiet
output only warnings and errors.
-d, --debug
enable output of debug messages.
enable more verbose debug messages.
specify the type of progress bar used in non-GUI mode. The following options are available: text, none, bar, dot.
store profiling statistics in a file (only for debugging)
-v, --version
output the current version of PyCAM and exit
Export formats:
Export the resulting toolpath or meta-data in various formats. These options trigger the non-interactive mode. Thus the GUI is disabled.
export the generated toolpaths to a file
export the current task configuration (mainly for debugging)
Tool definition:
Specify the tool parameters. The default tool is spherical and has a diameter of 1 unit. The default speeds are 1000 units/minute (feedrate) and 250 (spindle rotations per minute)
tool shape for the operation (cylindrical, spherical, toroidal)
diameter of the tool
torus diameter of the tool (only for toroidal tool shape)
allowed movement velocity of the tool (units/minute)
rotation speed of the tool (per minute)
tool ID - to be used for tool selection via GCode (default: 1)
Process definition:
Specify the process parameters: toolpath strategy, layer height, and more. A typical roughing operation is configured by default.
primary direction of the generated toolpath (x/y/xy)
one of the available toolpath strategies (layer, surface, contour-follow, contour-polygon, engrave)
minimum distance between the tool and the object (for rough processing)
the maximum thickness of each processed material layer (only for 'layer' strategy)
how much should two adjacent parallel toolpaths overlap each other (0..99)
milling style (conventional / climb / ignore)
height for safe re-positioning moves
engrave along the contour of a model with a given distance (only for 'engrave' strategy)
Boundary definition:
Specify the outer limits of the processing area (x/y/z). You may choose between 'relative_margin' (margin is given as percentage of the respective model dimension), 'fixed_margin' (margin for each face given in absolute units of length) and 'custom' (absolute coordinates of the bounding box - regardless of the model size and position). Negative values are allowed and can make sense (e.g. negative margin).
type of the boundary definition (relative-margin, fixed-margin, custom)
comma-separated x/y/z combination of the lower boundary (e.g. '4,4,-0.5')
comma-separated x/y/z combination of the upper boundary (e.g. '12,5.5,0')
Support structure:
An optional support structure can be used to keep the object in place during the mill operation. The support structure can be removed manually afterwards. Various types of support structures are available. Support structures are disabled by default.
type of the support structure (default: none)
height of the support profile
width of the support profile
distance along the x-axis between two adjacent parallel lines of the support structure (only for grid type)
distance along the y-axis between two adjacent parallel lines of the support structure (only for grid type)
shift the support grid along the x axis
shift the support grid along the y axis
average distance between two adjacent support bridges
minimum number of support bridges per polygon
length of each support bridge
GCode settings:
Specify some details of the generated GCode.
do not start the spindle before and stop it after each operation (M3/M5)
minimum axial distance between two machine positions. Any shorter move is not written to GCode (default: 0.00001).
choose the GCode path mode from 'exact_path', 'exact_stop' and 'continuous'. Use '--gcode-motiontolerance' and and '--gcode-naive-tolerance' if you want to limit the deviation. See (G61) for details.
the optional motion tolerance for 'continuous' path mode (G64).
the optional naive CAM tolerance for 'continuous' path mode (G64).
External programs:
Some optional external programs are used for format conversions.
location of the Inkscape executable. This program is required for importing SVG files.
location of the PStoEdit executable. This program is required for importing SVG files.

PyCAM website:  


Override the default data directory of PyCAM. This allows you to provide customized logos, menu files or non-default sample files.
Override the default location of engrave fonts.
You may want to define this variable in case that you installed the PyCAM python package in a non-default location.


pycam --export-gcode=output.ngc --bounds-type=relative-margin --bounds-lower=0.1,0.05,-0.1 foo.stl

Use the default settings to process the model foo.stl with an adjusted lower margin (minx, miny, minz) of 10% (for x), 5% (for y) and -10% (for z).  




Copyright © 2008-2010 Lode Leroy
Copyright © 2010-2011 Lars Kruse

License GPLv3+: GNU GPL version 3 or later <>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  


Take a look at the output of pycam --help to get a slightly better formatted list of options. The manual that you are reading right now is derived from this output.

Take a look at the wiki for more information about PyCAM:

The website of the PyCAM project:




This document was created by man2html, using the manual pages.
Time: 05:46:08 GMT, March 19, 2017