Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ansonl committed Feb 11, 2025
1 parent 5a741ee commit 4b978a3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ Add colored [isolines (contour lines/elevation lines)](https://en.wikipedia.org/

**Use the latest version of MFM in 1 of the following 3 ways → [Getting Started](#getting-started)**

- [MFM App](/~https://github.com/ansonl/mfm/releases) - Easiest to use and get started with a graphical user interface. Precompiled for Windows/Linux/Mac
- [Integrated Post Processing Script in PrusaSlicer/Bambu Studio/Orca Slicer](/~https://github.com/ansonl/mfm/archive/refs/heads/master.zip) - Runs automatically after slicing.
- [Python Script](/~https://github.com/ansonl/mfm/archive/refs/heads/master.zip) - Runnable from command line.
- [MFM App](/~https://github.com/ansonl/mfm/releases) - Easiest to use and get started with a graphical user interface. Supports G-code and Plate Sliced 3MF (G-code embedded 3MF). Precompiled for Windows/Linux/Mac
- [Integrated Post Processing Script in PrusaSlicer/Bambu Studio/Orca Slicer](/~https://github.com/ansonl/mfm/archive/refs/heads/master.zip) - Runs automatically after slicing. Supports G-code.
- [Python Script](/~https://github.com/ansonl/mfm/archive/refs/heads/master.zip) - Runnable from command line. Supports G-code.

**MFM adds additional features to the model by post processing sliced [3D printer G-code](https://marlinfw.org/meta/gcode/). 3D models and printing g-code can be recolored at either layer or individual feature/line level granularity.**

- **Feature/Line Type Scoping** - Recoloring can be set to only affect specific printing feature/line types. *Recolor only the top surfaces or walls at certain heights with MFM!*

- **G-code Feature Print Order Optimization** - Printed features are rearranged for faster, more consistent prints. Nozzle pressure is maintained and the number of toolchanges is decreased.
- **G-code Feature Print Order Optimization** - Printed features are rearranged for faster, more consistent prints. Nozzle pressure is maintained and the number of toolchanges is minimized.

- **Wipe/Coasting Compensation** - Existing Wipe/Coasting flow compensation generated by the slicer is retained even when g-code features are relocated. MFM has a customizable flush volume based on the color used and can do a **Long retraction after cut** to reduce filament waste.

- **Prime Tower Aware** - Existing Prime Towers are reused for optimal filament flow and color flushing. *No prime tower or large prime tower? Both configurations are supported.*

- **Slicer Compatibility** - Tested to be compatible with PrusaSlicer, Bambu Studio, and OrcaSlicer.
- **Slicer Compatibility** - Tested to be compatible with PrusaSlicer, Bambu Studio, and OrcaSlicer. Supports G-code and Plate Sliced 3MF.

- **G-code Gadgets** - MFM's G-code parser has an advantage over other post-processers because organizes existing G-code features into reusable segments similar to [gadgets](https://en.wikipedia.org/wiki/Return-oriented_programming) which are rearranged and chained for efficiency.
- **G-code Gadgets** - MFM's G-code parser has an advantage over other post-processers because it organizes existing G-code features into reusable segments similar to [gadgets](https://en.wikipedia.org/wiki/Return-oriented_programming) which are rearranged and chained for printing efficiency.

![map feature gcode post processing screenshot](/assets/gui_screenshot.png)

Expand Down Expand Up @@ -53,11 +53,11 @@ Set up your slicer and printer for MFM by following the steps on each page below

2. [MFM Command Setup](terminal-setup.md) ***(Post Processing and Command Line only)***

3. [MFM Config Options](mfm-configuration-options-setup.md)
3. [Minimal Toolchange G-code](minimal-toolchange-gcode.md)

4. [Minimal Toolchange G-code](minimal-toolchange-gcode.md)
4. [MFM Config Options](mfm-configuration-options-setup.md)

5. [Printer Setup](printer-setup.md)
5. [MFM Usage and Printer Setup](printer-setup.md)

## Running MFM Post-processor

Expand Down
32 changes: 29 additions & 3 deletions printer-setup.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
# Printer Setup for MFM

You need to find a way to execute the G-code on your 3D printer.
You need to find a way to print the G-code on your 3D printer.

## Sending G-code to the 3D printer
## Sending G-code and Plate Sliced 3MF to the 3D printer

There are 2 options: Plate Sliced 3MF (G-code embedded 3MF) (preferred) and G-code

### Most 3D Printers

For most 3D printers you can send or stream G-code directly to your printer with a USB or network serial connection.
For most 3D printers you can send or stream G-code directly to your printer with a USB or network serial connection. This feature is usually built into your slicer and you just import your G-code or 3MF file and click **Print**.

You can also copy G-code to an SD card that you put into the printer.

#### Plate Sliced 3MF

1. Make sure your slicer project has at least 4 distinct filament colors enabled.

2. Export your original project as a Plate Sliced 3MF with File > Export > **Export all plate sliced file**.

3. Run MFM with the plate sliced 3MF as the input file.

4. Import the processed plate sliced 3MF in the Bambu Studio or OrcaSlicer.

5. Click **Print plate**

6. Select Bed Leveling and Timelapse as needed. Remap your AMS or multimaterial system if supported. Make sure you do not have duplicated materials across the slots as described in [Material Auto Refill](#material-auto-refill).

#### G-code

1. Export your original G-code from the slicer.

2. Run MFM with the G-code as the input file.

3. Import the processed plate sliced 3MF in the Bambu Studio or OrcaSlicer and click **Print**.

### Bambu Lab Printers

I recommend using the [Plate Sliced 3MF](#plate-sliced-3mf) method due to Bambu's overly restrictive limits on LAN mode.

Bambu Studio allows you to **Send** previewed G-code to Bambu Lab printers over a network connection. You can print the sent G-code on the Bambu printer screen itself after ensuring the colors are physically located in the correct AMS slots.

Bambu will not allow you to directly use the Bambu Studio **Print** action to run a G-code file.
Expand Down
2 changes: 1 addition & 1 deletion src/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def selectLineEndingFlavor(event):
importLabel.grid(row=1, column=0, sticky=tk.W, padx=10)
importGcodeButton = tk.Button(
master=self,
text='Select G-code / Plate Sliced 3MF (G-code embedded)',
text='Select G-code / Plate Sliced 3MF',
command=selectImportGcodeFile
)
importGcodeButton.grid(row=1, column=1, sticky=tk.EW, padx=10, pady=5)
Expand Down
1 change: 1 addition & 0 deletions src/mfm/plate_sliced.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def processAllPlateGcodeForZipFile(inputZip: zipfile.ZipFile, out: typing.TextIO
process(configuration=configuration, inputFP=gcodeText, outputFP=tmpGcodeFile, statusQueue=statusQueue)

# Zipfile implementation of seek is too slow because it restarts from start of file each time
# https://stackoverflow.com/questions/51801213/complexity-of-f-seek-in-python/51801243
#process(configuration=configuration, inputFP=io.TextIOWrapper(inputZip.open(zi.filename, mode='r')), outputFP=tmpGcodeFile, statusQueue=statusQueue)

new_archive.write(tmpGcodeFilename, arcname=item.filename)
Expand Down

0 comments on commit 4b978a3

Please sign in to comment.