-
Download the current code of MFM and extract the entire folder to a location such as your user home directory
~
. -
Replace the UPPERCASE of the below sample MFM command text as described further below.
"PYTHONPATH/python3.exe" "SCRIPTPATH/mfm_cmd.py" -c "OPTIONSPATH/options.json" -t "TOOLCHANGEPATH/toolchange.gcode" --disable 0;
Command structure:
-
PYTHONPATH
is the location of your Python installation. This is the folder that the Python executable is in. You may need to changepython3.exe
to match your Python name. -
SCRIPTPATH
is the location of all the files in thesrc
directory. -
-c
– Options JSONOPTIONSPATH
is the location of your Options JSON file. Changeoptions.json
to the options file name.
-
-t
– Toolchange G-codeTOOLCHANGEPATH
is the location of your Minimal Toolchange G-code file. Changetoolchange.json
to the toolchange filename.
-
-le
optional – Line ending styleAUTO
– Auto detectWINDOWS
–\r\n
UNIX
–\n
-
-o
optional – Output Print G-code location.- Omit this parameter if using MFM as an intergrated Post-processing Script within the slicer. This is the location of the output printing G-code. MFM will overwrite the input file if no output file is specified.
-
--disable
optional – Quick toggle for enable/disable MFM post processing without needing to clear the entire slicer Post-processing scripts option.0
– MFM is enabled1
– MFM is disabled
-
-h
– Show parameter help.
Put the downloaded project folder in your user home folder. Replace USERNAME
with your username.
"C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\python3.exe" "C:\Users\USERNAME\mfm\src\mfm_cmd.py" -c "C:\Users\USERNAME\mfm\premade_options\USAofPlastic-meters.json" -t "C:\Users\USERNAME\mfm\minimal_toolchanges\bambu-p1-series.gcode" --disable 0;
Put the downloaded project folder in your user home folder.
/usr/local/bin/python3 "~/mfm/src/mfm_cmd.py" -c "~/mfm/premade_options/USAofPlastic-meters.json" -t "~/mfm/minimal_toolchanges/bambu-p1-series.gcode" --disable 0;
The exact PYTHONPATH will depend on how you installed Python.
Find where your Python location by running
- Windows cmd.exe
where python3
orwhere python
orGet-Command
- Linux/Mac terminal
which python3
orwhich python
Common Python install locations for Windows are
C:\Program Files\Python X.Y
Python installer "for everyone" optionC:\Users\USERNAME\AppData\Local\Programs\Python\PythonXY
Python installer "for me" optionC:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\python3.exe
VSCode Python install
Common Python install locations for Linux/Mac are
/usr/local/bin/python3
python3
orpython