Skip to content

malamaker/Convert-gcode.3mf-multi-2-single_plate

Repository files navigation

Convert gcode.3mf Multi-Plate → Single-Plate (Orca / Bambu)

Convert multi-plate .gcode.3mf files generated by Orca Slicer or Bambu Studio into clean, single-plate projects that still open correctly in Orca/Bambu.

This project supports both a Desktop UI (recommended) and CLI scripts (advanced / automation).


⭐ Desktop UI (Recommended)

Most users should use the Desktop UI, which provides a simple interface for:

  • Single file conversion
  • Batch directory conversion
  • Recursive folder processing
  • Dry-run support (batch mode)
  • Live log output

The UI calls the CLI scripts via subprocess — no logic is duplicated.

UI Features (current)

  • Mode: Single File or Batch Directory
  • Input / Output:
    • Select a .gcode.3mf file or a directory
    • Select an output folder
  • Batch Options:
    • Recursive directory traversal
    • Dry-run (batch only)
  • Behavior:
    • Automatically detects the exported plate
    • Renumbers the kept plate to Plate 1 internally
    • Output filename includes the original plate number
      • foo.gcode.3mf → foo_plate2.gcode.3mf
    • Batch mode mirrors the input folder structure in the output folder

The UI assumes these files are in the same folder:

  • 3mf_single_plate_launcher.py
  • convert_3mf_to_single_plate.py
  • batch_convert_3mf_to_single_plate.py

📦 Download

You can use either:

  • Download ZIP (recommended for most users):
    • GitHub → CodeDownload ZIP
  • Git clone (developers / contributors):
    git clone https://github.com/malamaker/Convert-gcode.3mf-multi-2-single_plate.git

🖥 Desktop UI Setup & Usage

Windows (Easiest)

Requirements

  • Windows 10 or 11
  • Python 3.11+ from python.org
    • ✔ Be sure to check “Add Python to PATH”

Tkinter is included automatically on Windows.

Option A (Recommended): Double-click, no console

  • Use the included launcher:
    • launchers/Launch_UI_windows.vbs
  • Double-click → UI opens without a terminal window

Option B: Direct

python 3mf_single_plate_launcher.py

macOS

Requirements

  • Python 3.11+ (recommended: python.org installer)

Recommended Python (avoids Tk issues)

⚠️ macOS + pyenv users (important)

If you use pyenv, Python must be built with Tcl/Tk or the UI will crash.

brew install tcl-tk

export LDFLAGS="-L$(brew --prefix tcl-tk)/lib"
export CPPFLAGS="-I$(brew --prefix tcl-tk)/include"
export PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig"

pyenv uninstall 3.11.9
pyenv install 3.11.9

Verify Tkinter:

python -c "import tkinter; tkinter.Tk()"

Option A (Included): Double-click launcher

  • launchers/Run_UI.command
  • You may need to make it executable once:
    chmod +x launchers/Run_UI.command
  • Then double-click in Finder

Option B: Terminal

python 3mf_single_plate_launcher.py

Ubuntu / Debian Linux

Requirements

sudo apt update
sudo apt install -y python3 python3-tk

Launch

python3 3mf_single_plate_launcher.py

🧰 CLI Usage (Advanced / Automation)

Single file

python convert_3mf_to_single_plate.py input.gcode.3mf -o output_dir

Batch directory

python batch_convert_3mf_to_single_plate.py input_dir -o output_dir --recursive

CLI behavior matches the UI:

  • Detects the exported plate
  • Converts to Plate 1 internally
  • Preserves Orca/Bambu project usability

📁 Included Helper Launchers

This repository includes optional launcher scripts to make the UI easier to start:

launchers/
├── Launch_UI_windows.vbs     # Windows, no console
├── Launch_UI_windows.bat     # Windows, console
├── Run_UI.command            # macOS Finder launcher
├── run_ui_linux.sh           # Linux shell launcher

⚠️ Warnings You May See

WARNING: gcode_file listed but not found in archive

This usually means:

  • A plate exists in metadata but was never sliced/exported

This warning is safe to ignore if conversion succeeds.


🧠 Notes & Design Intent

  • This tool does not merge plates
  • It keeps exactly one exported plate
  • The UI never imports converter logic — it only launches scripts
  • Designed to be safe for batch / print-farm workflows

📜 License

AGPL-3.0 license (see LICENSE)

About

Script to convert a multi-plate .gcode.3mf file to a single plate gcode.3mf file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages