SkillAgentSearch skills...

SmartWiper

Experimental Python tool for smarter wipe tower generation in multi-material 3D prints.

Install / Use

/learn @nic1972/SmartWiper

README

Smart-Wiper - Experimental G-Code Post-Processor for PrusaSlicer & OrcaSlicer to Optimize Wipe/Purge Towers and Reduce Waste in Multi-Color & Multi-Material 3D Printing

⚠️ Experimental Project – Open for Community Contributions


Current version: 0.1 (alpha)


📑 Jump to language section:

<img src="images/gb-40x30.png" alt="English" title="English"> English | <img src="images/de-40x30.png" alt="Deutsch" title="Deutsch"> Deutsch | <img src="images/it-40x30.png" alt="Italiano" title="Italiano"> Italiano


English (GB)

Flag England

1️⃣ 🧠 What is SmartWiper?

SmartWiper is a Python post-processing script for G-code files, specifically developed for multi-material printing with tools like the Prusa MMU3. It has been tested with G-code files from PrusaSlicer, but should also work with other slicers.

The script specifically addresses common weaknesses of conventional wipe towers: print interruptions, nozzle collisions, unstable towers, delamination, and material build-up. The towers are created entirely from scratch outside of the slicer. SmartWiper generates independent, optimized wipe towers, improving stability, enhancing print quality, and effectively preventing nozzle damage. The project was developed with the support of ChatGPT and is aimed at the maker community: Both beginners and experienced users can contribute, improve the tool, or adapt it to their printers and workflows.


2️⃣ 🧑‍💻 Main Features and Requirements

SmartWiper offers:

  • 🖥️ An intuitive graphical user interface (GUI)

  • 🎛️ Parameter control
    All important parameters – position, width, speed, extrusion factor, Z-hops, wipe paths, options, and much more can be adjusted.

  • 🖼️ An integrated 2D live preview
    Displays the wipe towers in X/Y and X/Z view for better control and placement.

  • 🪄 Automatic analysis
    Automatically detects layer heights, tool changes, and tower heights – no manual post-processing required.

Only a few requirements:

  • 🖥️ No installation required
    The script is standalone – it only requires Python 3. No additional libraries or modules are necessary.

3️⃣ 🔧 How does SmartWiper work? (Technical concept)

It adds its own wipe towers to the existing G-code afterwards, specifically avoiding common problems with material changes in multi-material printing.

Conventional wipe towers consist of a single block in which all materials alternate layer by layer. This often leads to:

❌ Delamination between different materials

❌ Warping – corners curling upwards ("elephant foot")

❌ Filament residues and blobs that can collide with the nozzle

SmartWiper takes a completely different approach – with surprisingly simple yet effective measures:

  • 🧱 A separate wipe tower for each material
    No more mixed layers – each tower consists exclusively of a single material or color. This improves layer adhesion and prevents delamination.

  • 🌀 Optional spiral build
    Instead of classic rectangular blocks, towers can be created in a spiral shape to reduce thermal stresses and the typical corner lifting ("elephant foot").

  • 🕳️ Central material channel – always present in optional spiral towers
    Excess material and strings are "flushed" down through the opening in the middle instead of sticking to the nozzle.

This architecture improves adhesion, reduces critical stresses, and ensures a more stable, reliable, and low-maintenance printing process, especially for taller towers – without the classic wipe tower problems.


4️⃣ ⚖️ Comparison: Single- / Multi-material

With my Prusa MK4S set, I achieve very good print results 99% of the time – as long as I only use a single material or a single color.
Normally, I start a print job, wait for the first layer to be fully extruded, and can then leave the printer unattended.

It’s a completely different story with multi-material printing:
The printer pauses at almost every tool change due to nozzle collisions. I have to intervene manually each time, removing strings and material residues with small side cutters and tweezers.
A job that would normally take 6 hours can take over 8 hours with mandatory manual intervention – assuming you’re always right there and react immediately each time the printer pauses.


5️⃣ 💬 Personal experiences with conventional wipe towers

In multi-material printing with tools like Prusa’s MMU3, the same problems occur repeatedly:

  • Delamination
  • Elephant foot
  • Blobs, strings, and filament residues colliding with the nozzle
  • Result: Crash detection → Print interrupted or destroyed

SmartWiper was developed specifically to permanently avoid these problems.


6️⃣ 🧱 Comparison: Conventional vs. SmartWiper towers

Example: Left: without towers. Right: the PrusaSlicer preview (based on the G-code).
However, when actually printed, the previously mentioned issues often occur.:
Example Prusa wipe tower preview

In contrast, here are some examples of how the towers actually look when printed based on that PrusaSlicer-generated G-code – showing the typical issues such as delamination, stringing, and unstable structures:
Example Prusa wipe tower print

You can see strings and blobs that make the towers unstable. The printer aborted the print several times due to detected collisions. After multiple stops, I had to cancel the print – filament, time, and electricity costs were wasted.

This problem is not unique to me. Comparable images can also be found online:
Example online wipe tower print

📷 This photo shows a print of the model
"Halloween Cat Full (MMU3-Version)" by Fireball.XE
License: CC BY-NC-SA 4.0

Even for completed print jobs, it is visible that conventional towers are often unstable – especially with many tool changes. The print height in this example was low. What would have happened with a taller print?

How SmartWiper calculates the wipe towers is shown below:
Example SmartWiper wipe tower preview

🧱 This image was created using the model
"Creature - Trash for your 3D printer" by lecaramel
License: CC BY-NC 4.0

You can immediately see the new strategy from the SmartWiper script, with rectangular towers on the left and spiral-option enabled on the right (which also has a hole in the middle):

  • One separate tower per material
  • Optional: Spiral build with central hole for material drainage

7️⃣ ⚙️ Slicer settings

For proper functionality in the slicer, first disable wipe tower and binary G-code.
Slicer settings

SmartWiper automatically inserts a wipe only when a tool change occurs.
This results in different tower heights – depending on how often each material is changed. This saves filament.

⚠️ But beware:
If a filament is used for the first time in later layers, the first layer of its wipe tower will only then, for the first time, be extruded "on the bed".

This could increase the risk that the first layer does not adhere to the print bed, and all subsequent extrusions on top will be in mid-air – leading to a faulty print.

🧠 Solution (temporary):
For materials missing in the first layer, create small, flat squares in the slicer (e.g., 10 × 10 × H mm, where H corresponds to the first-layer height – usually 0.2 mm).
This forces the script to insert a wipe operation for these filaments already in the first layer.

That way, all materials or colors are already present in the first layer, and if they adhere to the bed, all layers above will adhere as well. It would be a shame if a filament were only used towards the end, and the tower failed to adhere at that point.

Rule of thumb: For each filament not used in layer 1, create a small (10 mm x 10 mm), shallow (0.2 mm) start square in the slicer. Materials or colors already used in the first layer do not need these squares!

🔜 In a future script version, there will be an option to wipe all materials already in the first layer.
In the GUI, this function is already planned and visible as a radio button, but it has not been implemented yet – therefore, it is currently greyed out.


8️⃣ 🔍 Functionality and compatibility

📂 The input G-code file is selected.

  • The original G-code file is never overwritten.
  • The script always creates a new output file with the suffix _wipe.

Example: my_print.gcode becomes my_print_wipe.gcode.

🔍 The file is scanned in the first phase. PrusaSlicer G-code usually consists of three sections:

  1. Head:
    – Metadata and image (kept unchanged by the script).
  2. Main:
    – Print instructions (wipe commands are added here).
  3. Tail:
    – Material colors and types, temperatures, settings, bed size, etc. (kept unchanged by the script).
  • SmartWiper automatically detects these sections by scanning the G-code once.

  • Important information for later is extracted from the tail section.

  • If certain information is missing, default values are used.

  • These are centrally defined in the script and can be easily adjusted.

  • Search patterns can be easily adjusted directly in the script by experienced users for better compatibility with other slicers.

  • Likewise, default values, which can easily be modified directly in the script by experienced users, can further ensure compatibility with other slicers or printers.

  • The default values and settings modified in the script can be adjusted once and will then remain the

Related Skills

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated1mo ago
Forks0

Languages

Python

Security Score

80/100

Audited on Feb 6, 2026

No findings