Skip to content
/ sm2ss Public

Spoolman to slicer filament transfer

License

Notifications You must be signed in to change notification settings

bofh69/sm2ss

Repository files navigation

REUSE status GitHub Workflow Status

Spoolman to slicer filament transfer

Create slicer filament configuration files from the spools in Spoolman.

Working templates are not yet added, but will be added for:

It should be possible to use it with slic3r and PrusaSlicer too.

Usage

usage: spoolman2slicer.py [-h] [--version] -d DIR
                          [-s {orcaslicer,prusaslicer,slic3r,superslicer}]
                          [-u URL] [-U] [-D]

Fetches filaments from Spoolman and creates slicer filament config files.

options:
  -h, --help            show this help message and exit
  --version             show program\'s version number and exit
  -d DIR, --dir DIR     the filament config dir
  -s {orcaslicer,prusaslicer,slic3r,superslicer}, --slicer {orcaslicer,prusaslicer,slic3r,superslicer}
                        the slicer
  -u URL, --url URL     URL for the Spoolman installation
  -U, --updates         keep running and update filament configs if they\'re
                        updated in Spoolman
  -v, --verbose         verbose output
  -D, --delete-all      delete all filament configs before adding existing
                        ones

Prepare for running

Run:

virtualenv venv
. venv/bin/activate
pip install -r requirements.txt

Config file templates

spoolman2slicer uses Jinja2 templates for the configuration files it creates. They are stored with the filaments' material's name in templates-<slicer>/. If the material's template isn't found, default.template is used.

The variables available in the templates is the return data from Spoolman's filament request, described here.

They are also printed when the -v argument is used and the filament is about to be written.

The default templates assume there is an extra field defined called "pressure_advance" and adds a SET_PRESSURE_ADVANCE macro call with its value.

sm2s also adds its own fields under the sm2s field:

  • name - the name of the tool's program file.
  • version - the version of the tool.
  • now - the time when the file is created.
  • slicer_suffix - the filename suffix used by the slicer.

To generate your own templates, copy your existing filament settings from the slicers config dir (on linux: ~/.config/SuperSlicer/filament/) to the template dir with the material's name plus ".template", then change the fields' values like the provided template files.

The filename used for the filaments is created by the filename.template template.

Run

./spoolman2slicer.py -U -d ~/.config/SuperSlicer/filament/

See the other options above.

About

Spoolman to slicer filament transfer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages