forked from malnvenshorn/OctoPrint-MetadataPreprocessor
-
Notifications
You must be signed in to change notification settings - Fork 0
Setup analysis script on Linux
Sven Lohrmann edited this page Oct 29, 2019
·
1 revision
This guide expects that you are using Slic3r, but it should also work with other slicers.
$ mkdir -p ~/.Slic3r/utils/gcode_metadata/analysis
$ cd ~/.Slic3r/utils/gcode_metadata/analysis
$ wget https://github.com/malnvenshorn/OctoPrint-MetadataPreprocessor/archive/master.zip
$ unzip -j master.zip "OctoPrint-MetadataPreprocessor-master/analysis/*" -d .
$ virtualenv -p /usr/bin/python2 venv
$ source venv/bin/activate
$ python setup.py install
$ analysis --help
Usage: analysis [OPTIONS] PATH
Options:
--speed-x FLOAT
--speed-y FLOAT
--offset <FLOAT FLOAT>...
--max-t INTEGER
--g90-extruder
--help Show this message and exit.
You can easily integrate the analysis script in your workflow with slic3r. Simply add the absolute path of the script under the post-processing scripts option.

If you want to supply arguments, e.g. --g90-extruder, you need to write a wrapper script. I placed mine under ~/.Slic3r/utils/gcode_metadata/generate_octoprint_metadata.sh, see screenshot above.
#!/bin/bash
~/.Slic3r/utils/gcode_metadata/analysis/venv/bin/analysis --g90-extruder "$@"