Skip to content

feat: add native Export for Snapmaker U1 (bl2u1 integration)#208

Open
kbaker827 wants to merge 144 commits intoSnapmaker:mainfrom
kbaker827:feature/export-snapmaker-u1
Open

feat: add native Export for Snapmaker U1 (bl2u1 integration)#208
kbaker827 wants to merge 144 commits intoSnapmaker:mainfrom
kbaker827:feature/export-snapmaker-u1

Conversation

@kbaker827
Copy link

Summary

This PR integrates the bl2u1 converter as a native OrcaSlicer feature, adding a File → Export → Export for Snapmaker U1... menu item.

bl2u1 is a standalone Flask web app that converts Bambu Studio .3mf projects to Snapmaker U1-compatible format. This integration brings that conversion directly into OrcaSlicer with no external tools needed.

What it does

  • Adds a filament-mapping dialog that shows each extruder slot with a colour picker and filament-type dropdown (max 4, matching U1 hardware)
  • Auto-maps filament types → Snapmaker U1 preset names (PLASnapmaker PLA SnapSpeed @U1, etc.)
  • Applies the Snapmaker U1 printer profile from the profile library to the exported config
  • Pads the filament list to exactly 4 slots, filling unused slots with white PLA (same behaviour as bl2u1)
  • Remaps per-volume extruder IDs so multi-colour prints transfer correctly
  • Exports the modified project non-destructively (live scene is not changed) via the existing store_bbs_3mf() infrastructure

Files changed

File Change
src/slic3r/GUI/ExportSnapmakerU1.hpp New – types, constants, ExportSnapmakerU1Dialog class
src/slic3r/GUI/ExportSnapmakerU1.cpp New – dialog UI implementation
src/slic3r/GUI/Plater_export_snapmaker_u1.cpp NewPlater::export_snapmaker_u1()
src/slic3r/GUI/Plater.hpp +1 line – function declaration
src/slic3r/GUI/MainFrame.cpp +3 lines – menu item after "Export Generic 3MF"
src/slic3r/CMakeLists.txt +2 lines – register new source files

User flow

File → Export → Export for Snapmaker U1…
        │
        ▼
  Filament mapping dialog
  ┌──────────────────────────────────────┐
  │ ✓  Filament 1  [■ colour]  [PLA ▾]  │
  │    Profile: Snapmaker PLA SnapSpeed  │
  │    → Slot 1                          │
  │ ✓  Filament 2  [■ colour]  [PETG ▾] │
  │    → Slot 2                          │
  │ □  Filament 3  (excluded)            │
  └──────────────────────────────────────┘
        │ OK  →  wxFileDialog  →  .3mf

Test plan

  • Build compiles without errors on Linux, macOS, Windows
  • Menu item appears under File → Export when a model is loaded
  • Menu item is greyed out when no model is loaded
  • Dialog shows correct filament count from the active project
  • Enabling >4 filaments is blocked with an appropriate message
  • Output .3mf opens in OrcaSlicer with Snapmaker U1 printer selected
  • Output .3mf opens in Snapmaker Luban without errors
  • Multi-colour model retains correct extruder assignments after export
  • Live scene is unchanged after export (non-destructive)

🤖 Generated with Claude Code

meiliang1123 and others added 30 commits December 9, 2024 16:35
mkdir -> mkdir -p
mkdir add try catch
1. change name slicer to orca
2. change version to 0.0.1
3. ignore the version check
2.add the default filament of j1
3.fix the default filament selected when choosing the nozzle
womendoushihaoyin and others added 28 commits April 14, 2025 14:51
# Conflicts:
#	.devcontainer/devcontainer.json
#	.github/workflows/build_all.yml
#	.github/workflows/build_check_cache.yml
#	.github/workflows/build_deps.yml
#	.github/workflows/build_orca.yml
#	Build.PL
#	BuildLinux.sh
#	CMakeLists.txt
#	README.md
#	build_release.bat
#	build_release_macos.sh
#	build_release_vs2022.bat
#	cmake/modules/MacOSXBundleInfo.plist.in
#	deps/CGAL/CGAL.cmake
#	deps/CMakeLists.txt
#	deps/FREETYPE/FREETYPE.cmake
#	deps/MPFR/MPFR.cmake
#	deps/OCCT/OCCT.cmake
#	deps/OpenCV/OpenCV.cmake
#	deps/OpenVDB/OpenVDB.cmake
#	deps/TIFF/TIFF.cmake
#	deps/wxWidgets/wxWidgets.cmake
#	deps_src/mcut/include/mcut/internal/frontend.h
#	doc/Auxiliary-fan.md
#	doc/Calibration.md
#	doc/Chamber-temperature.md
#	doc/Precise-wall.md
#	doc/developer-reference/Localization_guide.md
#	doc/print_settings/speed/speed_settings_advanced.md
#	doc/printer_settings/adaptive-bed-mesh.md
#	doc/printer_settings/air-filtration.md
#	doc/semm.md
#	flatpak/io.github.softfever.OrcaSlicer.metainfo.xml
#	flatpak/io.github.softfever.OrcaSlicer.yml
#	lib/Slic3r.pm
#	localazy.json
#	localization/i18n/Snapmaker_Orca.pot
#	localization/i18n/ca/Snapmaker_Orca_ca.po
#	localization/i18n/cs/Snapmaker_Orca_cs.po
#	localization/i18n/de/Snapmaker_Orca_de.po
#	localization/i18n/en/Snapmaker_Orca_en.po
#	localization/i18n/es/Snapmaker_Orca_es.po
#	localization/i18n/fr/Snapmaker_Orca_fr.po
#	localization/i18n/hu/Snapmaker_Orca_hu.po
#	localization/i18n/it/Snapmaker_Orca_it.po
#	localization/i18n/ja/Snapmaker_Orca_ja.po
#	localization/i18n/ko/Snapmaker_Orca_ko.po
#	localization/i18n/nl/Snapmaker_Orca_nl.po
#	localization/i18n/pl/Snapmaker_Orca_pl.po
#	localization/i18n/pt_BR/Snapmaker_Orca_pt_BR.po
#	localization/i18n/ru/Snapmaker_Orca_ru.po
#	localization/i18n/sv/Snapmaker_Orca_sv.po
#	localization/i18n/tr/Snapmaker_Orca_tr.po
#	localization/i18n/uk/Snapmaker_Orca_uk.po
#	localization/i18n/zh_CN/Snapmaker_Orca_zh_CN.po
#	localization/i18n/zh_TW/Snapmaker_Orca_zh_TW.po
#	resources/profiles/Custom/Snapmaker_Orca_bed_texture.svg
#	resources/profiles/Snapmaker.json
#	resources/profiles/Snapmaker/filament/Snapmaker ABS Benchy @Dual.json
#	resources/profiles/Snapmaker/filament/Snapmaker ABS Benchy @J1.json
#	resources/profiles/Snapmaker/filament/Snapmaker Breakaway Support @base.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA Matte @J1.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA Matte @base.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA Matte.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA Metal @U1 base.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA Silk @Dual.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA SnapSpeed @Dual.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA SnapSpeed @J1.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA SnapSpeed @base.json
#	resources/profiles/Snapmaker/filament/Snapmaker PLA SnapSpeed.json
#	resources/profiles/Snapmaker/filament/Snapmaker TPU @U1 base.json
#	resources/profiles/Snapmaker/filament/Snapmaker TPU High-Flow @Dual.json
#	resources/profiles/Snapmaker/filament/Snapmaker TPU High-Flow @J1.json
#	resources/profiles/Snapmaker/filament/fdm_filament_abs.json
#	resources/profiles/Snapmaker/filament/fdm_filament_petg.json
#	resources/profiles/Snapmaker/filament/fdm_filament_pla.json
#	resources/profiles/Snapmaker/filament/fdm_filament_pva.json
#	resources/profiles/Snapmaker/filament/fdm_filament_tpu.json
#	resources/profiles/Snapmaker/machine/fdm_common.json
#	resources/web/data/text.js
#	resources/web/guide/22/22.js
#	resources/web/guide/23/23.js
#	resources/web/guide/3/index.html
#	resources/web/guide/31/index.html
#	scripts/DockerBuild.sh
#	scripts/DockerRun.sh
#	scripts/Dockerfile
#	scripts/flatpak/entrypoint
#	scripts/flatpak/io.github.Snapmaker.Snapmaker_Orca.metainfo.xml
#	scripts/flatpak/io.github.Snapmaker.Snapmaker_Orca.yml
#	scripts/flatpak/io.github.softfever.Snapmaker_Orca.metainfo.xml
#	scripts/flatpak/io.github.softfever.Snapmaker_Orca.yml
#	scripts/run_gettext.bat
#	scripts/run_gettext.sh
#	src/CMakeLists.txt
#	src/OrcaSlicer_profile_validator.cpp
#	src/Snapmaker_Orca_app_msvc.cpp
#	src/Snapmaker_Orca_profile_validator.cpp
#	src/dev-utils/Snapmaker_Orca_profile_validator.cpp
#	src/dev-utils/platform/msw/Snapmaker_Orca-gcodeviewer.rc.in
#	src/dev-utils/platform/msw/Snapmaker_Orca.manifest.in
#	src/dev-utils/platform/msw/Snapmaker_Orca.rc.in
#	src/dev-utils/platform/unix/Snapmaker_Orca.desktop
#	src/libslic3r/AppConfig.cpp
#	src/libslic3r/AppConfig.hpp
#	src/libslic3r/GCode.hpp
#	src/libslic3r/GCode/WipeTower2.cpp
#	src/libslic3r/Model.cpp
#	src/libslic3r/PresetBundle.cpp
#	src/libslic3r/PresetBundle.hpp
#	src/libslic3r/PrintConfig.cpp
#	src/libslic3r/libslic3r.h
#	src/libslic3r/libslic3r_version.h.in
#	src/platform/unix/BuildLinuxImage.sh.in
#	src/slic3r/CMakeLists.txt
#	src/slic3r/GUI/AboutDialog.cpp
#	src/slic3r/GUI/CreatePresetsDialog.cpp
#	src/slic3r/GUI/DesktopIntegrationDialog.cpp
#	src/slic3r/GUI/GUI.cpp
#	src/slic3r/GUI/GUI_App.cpp
#	src/slic3r/GUI/GUI_App.hpp
#	src/slic3r/GUI/GUI_Init.cpp
#	src/slic3r/GUI/GUI_ObjectList.cpp
#	src/slic3r/GUI/MainFrame.cpp
#	src/slic3r/GUI/MediaFilePanel.cpp
#	src/slic3r/GUI/MsgDialog.cpp
#	src/slic3r/GUI/NetworkTestDialog.cpp
#	src/slic3r/GUI/Plater.cpp
#	src/slic3r/GUI/Preferences.cpp
#	src/slic3r/GUI/PrintHostDialogs.cpp
#	src/slic3r/GUI/ReleaseNote.cpp
#	src/slic3r/GUI/SelectMachine.cpp
#	src/slic3r/GUI/StatusPanel.cpp
#	src/slic3r/GUI/Tab.cpp
#	src/slic3r/GUI/UnsavedChangesDialog.cpp
#	src/slic3r/GUI/UpdateDialogs.cpp
#	src/slic3r/GUI/WebGuideDialog.cpp
#	src/slic3r/GUI/WebSMUserLoginDialog.cpp
#	src/slic3r/GUI/WebSMUserLoginDialog.hpp
#	src/slic3r/GUI/WebViewDialog.cpp
#	src/slic3r/GUI/WipeTowerDialog.cpp
#	src/slic3r/Utils/PresetUpdater.cpp
#	version.inc
Integrates the bl2u1 converter (https://github.com/josuanbn/bl2u1) as a
native OrcaSlicer feature, adding a File → Export → Export for Snapmaker U1
menu item.

What it does:
- Opens a filament-mapping dialog showing up to 4 selectable extruder slots,
  each with a colour picker and filament-type dropdown.
- Auto-maps filament types to their Snapmaker U1 preset equivalents
  (PLA → "Snapmaker PLA SnapSpeed @U1", PETG, ABS, TPU, etc.).
- Applies the Snapmaker U1 printer profile to the exported config.
- Pads the filament list to exactly 4 slots (Snapmaker U1 hardware limit),
  filling unused slots with white PLA.
- Remaps per-volume extruder IDs so multi-colour prints transfer correctly.
- Exports the modified project non-destructively as a .3mf via the existing
  store_bbs_3mf() infrastructure.

New files:
  src/slic3r/GUI/ExportSnapmakerU1.hpp   – types, constants, dialog class
  src/slic3r/GUI/ExportSnapmakerU1.cpp   – dialog UI implementation
  src/slic3r/GUI/Plater_export_snapmaker_u1.cpp – Plater::export_snapmaker_u1()

Modified files:
  src/slic3r/GUI/Plater.hpp    – add export_snapmaker_u1() declaration
  src/slic3r/GUI/MainFrame.cpp – add menu item after "Export Generic 3MF"
  src/slic3r/CMakeLists.txt    – register the two new .cpp sources

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants