mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 22:47:32 -06:00

Signed-off-by: SoftFever <103989404+SoftFever@users.noreply.github.com> # Conflicts: # .github/ISSUE_TEMPLATE/bug_report.md # .github/workflows/build_ubuntu.yml # .gitignore # Containerfile # Dockerfile # README.md # deps/Boost/Boost.cmake # deps/OpenEXR/OpenEXR.cmake # deps/OpenVDB/OpenVDB.cmake # doc/How to build - Mac OS.md # localization/i18n/OrcaSlicer.pot # localization/i18n/de/OrcaSlicer_de.po # localization/i18n/en/OrcaSlicer_en.po # localization/i18n/es/OrcaSlicer_es.po # localization/i18n/fr/OrcaSlicer_fr.po # localization/i18n/hu/OrcaSlicer_hu.po # localization/i18n/it/OrcaSlicer_it.po # localization/i18n/ja/OrcaSlicer_ja.po # localization/i18n/list.txt # localization/i18n/nl/OrcaSlicer_nl.po # localization/i18n/sv/OrcaSlicer_sv.po # localization/i18n/zh_cn/OrcaSlicer_zh_CN.po # resources/i18n/de/BambuStudio.mo # resources/i18n/en/BambuStudio.mo # resources/i18n/es/BambuStudio.mo # resources/i18n/fr/BambuStudio.mo # resources/i18n/hu/BambuStudio.mo # resources/i18n/it/BambuStudio.mo # resources/i18n/ja/BambuStudio.mo # resources/i18n/nl/BambuStudio.mo # resources/i18n/sv/BambuStudio.mo # resources/i18n/zh_cn/BambuStudio.mo # resources/images/im_all_plates_stats.svg # resources/profiles/Anker.json # resources/profiles/Anker/filament/Generic ASA @Anker.json # resources/profiles/Anker/filament/Generic PA @Anker.json # resources/profiles/Anker/filament/Generic PA-CF @Anker.json # resources/profiles/Anker/filament/Generic PC @Anker.json # resources/profiles/Anker/filament/Generic PETG @Anker.json # resources/profiles/Anker/filament/Generic PLA-CF @Anker.json # resources/profiles/Anker/filament/Generic PVA @Anker.json # resources/profiles/Anker/filament/Generic TPU @Anker.json # resources/profiles/Anker/machine/Anker M5 0.4 nozzle.json # resources/profiles/Anker/machine/Anker M5.json # resources/profiles/Anker/machine/Anker M5C 0.4 nozzle.json # resources/profiles/Anker/machine/Anker M5C.json # resources/profiles/Anker/machine/fdm_machine_common.json # resources/profiles/Anker/process/0.05mm Ultradetail @Anker.json # resources/profiles/Anker/process/0.15mm Fast @Anker.json # resources/profiles/Anker/process/0.20mm Fast @Anker.json # resources/profiles/Anker/process/0.20mm Standard @Anker.json # resources/profiles/Anker/process/0.25mm Fast @Anker.json # resources/profiles/Anker/process/fdm_process_common.json # resources/profiles/Anycubic.json # resources/profiles/Anycubic/machine/Anycubic 4Max Pro 0.4 nozzle.json # resources/profiles/Anycubic/machine/Anycubic 4Max Pro 2 0.4 nozzle.json # resources/profiles/Anycubic/machine/Anycubic 4Max Pro 2.json # resources/profiles/Anycubic/machine/Anycubic 4Max Pro.json # resources/profiles/Anycubic/machine/Anycubic Chiron 0.4 nozzle.json # resources/profiles/Anycubic/machine/Anycubic Chiron.json # resources/profiles/Anycubic/machine/Anycubic Kobra 2 0.4 nozzle.json # resources/profiles/Anycubic/machine/Anycubic Kobra Max 0.4 nozzle.json # resources/profiles/Anycubic/machine/Anycubic Kobra Max.json # resources/profiles/Anycubic/machine/Anycubic Vyper 0.4 nozzle.json # resources/profiles/Anycubic/machine/Anycubic Vyper.json # resources/profiles/Anycubic/machine/Anycubic i3 Mega S 0.4 nozzle.json # resources/profiles/Anycubic/machine/Anycubic i3 Mega S.json # resources/profiles/Anycubic/machine/fdm_machine_common.json # resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic 4MaxPro2.json # resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic Chiron.json # resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic Kobra2.json # resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic KobraMax.json # resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic Vyper.json # resources/profiles/Anycubic/process/0.15mm Optimal @Anycubic i3MegaS.json # resources/profiles/Anycubic/process/0.20mm Standard @Anycubic 4MaxPro.json # resources/profiles/Anycubic/process/0.20mm Standard @Anycubic 4MaxPro2.json # resources/profiles/Anycubic/process/0.20mm Standard @Anycubic Chiron.json # resources/profiles/Anycubic/process/0.20mm Standard @Anycubic Kobra2.json # resources/profiles/Anycubic/process/0.20mm Standard @Anycubic KobraMax.json # resources/profiles/Anycubic/process/0.20mm Standard @Anycubic Vyper.json # resources/profiles/Anycubic/process/0.20mm Standard @Anycubic i3MegaS.json # resources/profiles/Anycubic/process/0.30mm Draft @Anycubic 4MaxPro2.json # resources/profiles/Anycubic/process/0.30mm Draft @Anycubic Chiron.json # resources/profiles/Anycubic/process/0.30mm Draft @Anycubic Kobra2.json # resources/profiles/Anycubic/process/0.30mm Draft @Anycubic KobraMax.json # resources/profiles/Anycubic/process/0.30mm Draft @Anycubic Vyper.json # resources/profiles/Anycubic/process/0.30mm Draft @Anycubic i3MegaS.json # resources/profiles/Anycubic/process/fdm_process_common.json # resources/profiles/BBL.json # resources/profiles/BBL/process/fdm_process_bbl_common.json # resources/profiles/Creality.json # resources/profiles/Creality/filament/fdm_filament_abs.json # resources/profiles/Creality/filament/fdm_filament_pla.json # resources/profiles/Creality/machine/Creality CR-10 Max 0.4 nozzle.json # resources/profiles/Creality/machine/Creality CR-10 Max.json # resources/profiles/Creality/machine/Creality CR-10 V2 0.4 nozzle.json # resources/profiles/Creality/machine/Creality CR-10 V2.json # resources/profiles/Creality/machine/Creality Ender-3 S1 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-3 S1 Pro 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-3 S1 Pro.json # resources/profiles/Creality/machine/Creality Ender-3 S1.json # resources/profiles/Creality/machine/Creality Ender-3 V2 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-3 V2.json # resources/profiles/Creality/machine/Creality Ender-5 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5 Plus 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5 Plus.json # resources/profiles/Creality/machine/Creality Ender-5 S1 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5 S1.json # resources/profiles/Creality/machine/Creality Ender-5.json # resources/profiles/Creality/machine/Creality Ender-5S 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-5S.json # resources/profiles/Creality/machine/Creality Ender-6 0.4 nozzle.json # resources/profiles/Creality/machine/Creality Ender-6.json # resources/profiles/Creality/machine/fdm_creality_common.json # resources/profiles/Creality/machine/fdm_machine_common.json # resources/profiles/Creality/process/0.12mm Fine @Creality CR10Max.json # resources/profiles/Creality/process/0.12mm Fine @Creality Ender3V2.json # resources/profiles/Creality/process/0.15mm Optimal @Creality CR10Max.json # resources/profiles/Creality/process/0.15mm Optimal @Creality Ender3V2.json # resources/profiles/Creality/process/0.16mm Optimal @Creality CR10V2.json # resources/profiles/Creality/process/0.16mm Optimal @Creality Ender3S1.json # resources/profiles/Creality/process/0.16mm Optimal @Creality Ender3S1Pro.json # resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5.json # resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5Plus.json # resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5S.json # resources/profiles/Creality/process/0.16mm Optimal @Creality Ender5S1.json # resources/profiles/Creality/process/0.16mm Optimal @Creality Ender6.json # resources/profiles/Creality/process/0.20mm Standard @Creality CR10Max.json # resources/profiles/Creality/process/0.20mm Standard @Creality CR10V2.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender3S1.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender3S1Pro.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender3V2.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender5.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender5Plus.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender5S.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender5S1.json # resources/profiles/Creality/process/0.20mm Standard @Creality Ender6.json # resources/profiles/Creality/process/0.24mm Draft @Creality CR10Max.json # resources/profiles/Creality/process/0.24mm Draft @Creality Ender3V2.json # resources/profiles/Creality/process/0.24mm Draft @Creality.json # resources/profiles/Creality/process/fdm_process_creality_common.json # resources/profiles/Custom/filament/My Generic PETG.json # resources/profiles/Custom/filament/My Generic PLA.json # resources/profiles/Elegoo.json # resources/profiles/Elegoo/filament/fdm_filament_common.json # resources/profiles/Elegoo/machine/Elegoo Neptune 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2D 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2D.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2S 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 2S.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Max 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Max.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Plus 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Plus.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Pro 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3 Pro.json # resources/profiles/Elegoo/machine/Elegoo Neptune 3.json # resources/profiles/Elegoo/machine/Elegoo Neptune X 0.4 nozzle.json # resources/profiles/Elegoo/machine/Elegoo Neptune X.json # resources/profiles/Elegoo/machine/Elegoo Neptune.json # resources/profiles/Elegoo/machine/fdm_machine_common.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune2.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune2D.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune2S.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3Max.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3Plus.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo Neptune3Pro.json # resources/profiles/Elegoo/process/0.08mm Extra Fine @Elegoo NeptuneX.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune2.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune2D.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune2S.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3Max.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3Plus.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo Neptune3Pro.json # resources/profiles/Elegoo/process/0.12mm Fine @Elegoo NeptuneX.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune2.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune2D.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune2S.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3Max.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3Plus.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo Neptune3Pro.json # resources/profiles/Elegoo/process/0.16mm Optimal @Elegoo NeptuneX.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune2.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune2D.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune2S.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3Max.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3Plus.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo Neptune3Pro.json # resources/profiles/Elegoo/process/0.20mm Standard @Elegoo NeptuneX.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune2.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune2D.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune2S.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3Max.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3Plus.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo Neptune3Pro.json # resources/profiles/Elegoo/process/0.24mm Draft @Elegoo NeptuneX.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune2.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune2D.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune2S.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3Max.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3Plus.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo Neptune3Pro.json # resources/profiles/Elegoo/process/0.28mm Extra Draft @Elegoo NeptuneX.json # resources/profiles/Prusa.json # resources/profiles/Prusa/filament/fdm_filament_common.json # resources/profiles/Prusa/machine/Prusa MINI 0.4 nozzle.json # resources/profiles/Prusa/machine/Prusa MINI.json # resources/profiles/Prusa/machine/Prusa MK3S 0.4 nozzle.json # resources/profiles/Prusa/machine/Prusa MK3S.json # resources/profiles/Prusa/machine/fdm_machine_common.json # resources/profiles/Prusa/process/0.20mm Standard @MINI.json # resources/profiles/Prusa/process/0.20mm Standard @MK3S.json # resources/profiles/Qidi.json # resources/profiles/Qidi/filament/fdm_filament_abs.json # resources/profiles/Qidi/filament/fdm_filament_asa.json # resources/profiles/Qidi/filament/fdm_filament_common.json # resources/profiles/Qidi/filament/fdm_filament_pa.json # resources/profiles/Qidi/filament/fdm_filament_pc.json # resources/profiles/Qidi/filament/fdm_filament_pet.json # resources/profiles/Qidi/filament/fdm_filament_pla.json # resources/profiles/Qidi/filament/fdm_filament_pva.json # resources/profiles/Qidi/filament/fdm_filament_tpu.json # resources/profiles/Qidi/machine/Qidi X-CF Pro 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-CF Pro.json # resources/profiles/Qidi/machine/Qidi X-Max 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Max 3 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Max 3.json # resources/profiles/Qidi/machine/Qidi X-Max.json # resources/profiles/Qidi/machine/Qidi X-Plus 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Plus 3 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Plus 3.json # resources/profiles/Qidi/machine/Qidi X-Plus.json # resources/profiles/Qidi/machine/Qidi X-Smart 3 0.4 nozzle.json # resources/profiles/Qidi/machine/Qidi X-Smart 3.json # resources/profiles/Qidi/machine/fdm_machine_common.json # resources/profiles/Qidi/machine/fdm_qidi_common.json # resources/profiles/Qidi/machine/fdm_qidi_x3_common.json # resources/profiles/Qidi/process/0.12mm Fine @Qidi XCFPro.json # resources/profiles/Qidi/process/0.12mm Fine @Qidi XMax.json # resources/profiles/Qidi/process/0.12mm Fine @Qidi XMax3.json # resources/profiles/Qidi/process/0.12mm Fine @Qidi XPlus.json # resources/profiles/Qidi/process/0.12mm Fine @Qidi XPlus3.json # resources/profiles/Qidi/process/0.12mm Fine @Qidi XSmart3.json # resources/profiles/Qidi/process/0.16mm Optimal @Qidi XCFPro.json # resources/profiles/Qidi/process/0.16mm Optimal @Qidi XMax.json # resources/profiles/Qidi/process/0.16mm Optimal @Qidi XMax3.json # resources/profiles/Qidi/process/0.16mm Optimal @Qidi XPlus.json # resources/profiles/Qidi/process/0.16mm Optimal @Qidi XPlus3.json # resources/profiles/Qidi/process/0.16mm Optimal @Qidi XSmart3.json # resources/profiles/Qidi/process/0.20mm Standard @Qidi XCFPro.json # resources/profiles/Qidi/process/0.20mm Standard @Qidi XMax.json # resources/profiles/Qidi/process/0.20mm Standard @Qidi XMax3.json # resources/profiles/Qidi/process/0.20mm Standard @Qidi XPlus.json # resources/profiles/Qidi/process/0.20mm Standard @Qidi XPlus3.json # resources/profiles/Qidi/process/0.20mm Standard @Qidi XSmart3.json # resources/profiles/Qidi/process/0.25mm Draft @Qidi XCFPro.json # resources/profiles/Qidi/process/0.25mm Draft @Qidi XMax.json # resources/profiles/Qidi/process/0.25mm Draft @Qidi XMax3.json # resources/profiles/Qidi/process/0.25mm Draft @Qidi XPlus.json # resources/profiles/Qidi/process/0.25mm Draft @Qidi XPlus3.json # resources/profiles/Qidi/process/0.25mm Draft @Qidi XSmart3.json # resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XCFPro.json # resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XMax.json # resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XMax3.json # resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XPlus.json # resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XPlus3.json # resources/profiles/Qidi/process/0.30mm Extra Draft @Qidi XSmart3.json # resources/profiles/Qidi/process/fdm_process_common.json # resources/profiles/Qidi/process/fdm_process_qidi_common.json # resources/profiles/Qidi/process/fdm_process_qidi_x3_common.json # resources/profiles/Tronxy/filament/Tronxy Generic ABS.json # resources/profiles/Tronxy/process/0.12mm Fine @Tronxy.json # resources/profiles/Tronxy/process/0.15mm Optimal @Tronxy.json # resources/profiles/Tronxy/process/0.20mm Standard @Tronxy.json # resources/profiles/Tronxy/process/0.24mm Draft @Tronxy.json # resources/profiles/Voron.json # resources/profiles/Voron/filament/Generic ABS @Voron.json # resources/profiles/Voron/filament/Generic ASA @Voron.json # resources/profiles/Voron/filament/Generic PA @Voron.json # resources/profiles/Voron/filament/Generic PETG @Voron.json # resources/profiles/Voron/filament/Generic PVA @Voron.json # resources/profiles/Voron/filament/Voron Generic PA-CF.json # resources/profiles/Voron/filament/Voron Generic PC.json # resources/profiles/Voron/filament/Voron Generic PLA-CF.json # resources/profiles/Voron/filament/Voron Generic PLA.json # resources/profiles/Voron/filament/Voron Generic TPU.json # resources/profiles/Voron/machine/Voron 0.1.json # resources/profiles/Voron/machine/Voron 2.4 250.json # resources/profiles/Voron/machine/Voron 2.4 300.json # resources/profiles/Voron/machine/Voron 2.4 350.json # resources/profiles/Voron/machine/Voron Trident 250.json # resources/profiles/Voron/machine/Voron Trident 300.json # resources/profiles/Voron/machine/Voron Trident 350.json # resources/profiles/Voron/process/fdm_process_voron_common.json # resources/profiles/Voxelab.json # resources/profiles/Voxelab/filament/Generic ABS @Voxelab.json # resources/profiles/Voxelab/filament/Generic PLA @Voxelab.json # resources/profiles/Voxelab/filament/fdm_filament_common.json # resources/profiles/Voxelab/machine/Voxelab Aquila X2 0.4 nozzle.json # resources/profiles/Voxelab/machine/Voxelab Aquila X2.json # resources/profiles/Voxelab/machine/fdm_machine_common.json # resources/profiles/Voxelab/process/0.16mm Optimal @Voxelab AquilaX2.json # resources/profiles/Voxelab/process/0.20mm Standard @Voxelab AquilaX2.json # resources/web/data/text.js # resources/web/guide/21/21.js # resources/web/guide/24/24.js # src/BaseException.cpp # src/OrcaSlicer.cpp # src/libslic3r/AppConfig.cpp # src/libslic3r/BoundingBox.hpp # src/libslic3r/Extruder.hpp # src/libslic3r/Fill/Fill.cpp # src/libslic3r/Format/bbs_3mf.cpp # src/libslic3r/GCode.cpp # src/libslic3r/GCode.hpp # src/libslic3r/GCode/CoolingBuffer.cpp # src/libslic3r/GCode/GCodeProcessor.cpp # src/libslic3r/GCode/GCodeProcessor.hpp # src/libslic3r/GCode/WipeTower.cpp # src/libslic3r/GCodeWriter.cpp # src/libslic3r/GCodeWriter.hpp # src/libslic3r/Model.cpp # src/libslic3r/PerimeterGenerator.cpp # src/libslic3r/Preset.cpp # src/libslic3r/Preset.hpp # src/libslic3r/PresetBundle.cpp # src/libslic3r/PresetBundle.hpp # src/libslic3r/Print.cpp # src/libslic3r/Print.hpp # src/libslic3r/PrintBase.hpp # src/libslic3r/PrintConfig.cpp # src/libslic3r/PrintConfig.hpp # src/libslic3r/PrintObject.cpp # src/libslic3r/TreeSupport.cpp # src/libslic3r/Utils.hpp # src/mcut/CMakeLists.txt # src/slic3r/CMakeLists.txt # src/slic3r/GUI/3DBed.cpp # src/slic3r/GUI/AMSMaterialsSetting.cpp # src/slic3r/GUI/AMSMaterialsSetting.hpp # src/slic3r/GUI/BBLTopbar.cpp # src/slic3r/GUI/BBLTopbar.hpp # src/slic3r/GUI/BackgroundSlicingProcess.hpp # src/slic3r/GUI/BindDialog.cpp # src/slic3r/GUI/ConfigManipulation.cpp # src/slic3r/GUI/DeviceManager.cpp # src/slic3r/GUI/Field.cpp # src/slic3r/GUI/GLCanvas3D.cpp # src/slic3r/GUI/GUI_App.cpp # src/slic3r/GUI/GUI_App.hpp # src/slic3r/GUI/GUI_Factories.cpp # src/slic3r/GUI/GUI_Factories.hpp # src/slic3r/GUI/GUI_ObjectList.cpp # src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp # src/slic3r/GUI/Jobs/ArrangeJob.cpp # src/slic3r/GUI/Jobs/FillBedJob.cpp # src/slic3r/GUI/MainFrame.cpp # src/slic3r/GUI/MediaPlayCtrl.cpp # src/slic3r/GUI/Monitor.cpp # src/slic3r/GUI/PartPlate.cpp # src/slic3r/GUI/PartPlate.hpp # src/slic3r/GUI/PlateSettingsDialog.cpp # src/slic3r/GUI/PlateSettingsDialog.hpp # src/slic3r/GUI/Plater.cpp # src/slic3r/GUI/Plater.hpp # src/slic3r/GUI/PresetComboBoxes.cpp # src/slic3r/GUI/ReleaseNote.cpp # src/slic3r/GUI/SelectMachine.cpp # src/slic3r/GUI/StatusPanel.cpp # src/slic3r/GUI/Tab.cpp # src/slic3r/GUI/Widgets/Label.cpp # src/slic3r/GUI/Widgets/Label.hpp # src/slic3r/GUI/Widgets/SideButton.cpp # src/slic3r/GUI/calib_dlg.cpp # src/slic3r/GUI/calib_dlg.hpp # src/slic3r/GUI/wxExtensions.hpp # src/slic3r/Utils/NetworkAgent.cpp # src/slic3r/Utils/bambu_networking.hpp # version.inc
659 lines
27 KiB
C++
659 lines
27 KiB
C++
#include <algorithm>
|
|
#include <sstream>
|
|
#include "libslic3r/FlushVolCalc.hpp"
|
|
#include "WipeTowerDialog.hpp"
|
|
#include "BitmapCache.hpp"
|
|
#include "GUI.hpp"
|
|
#include "I18N.hpp"
|
|
#include "GUI_App.hpp"
|
|
#include "MsgDialog.hpp"
|
|
#include "Widgets/Button.hpp"
|
|
#include "slic3r/Utils/ColorSpaceConvert.hpp"
|
|
#include "MainFrame.hpp"
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
using namespace Slic3r::GUI;
|
|
|
|
int scale(const int val) { return val * Slic3r::GUI::wxGetApp().em_unit() / 10; }
|
|
int ITEM_WIDTH() { return scale(30); }
|
|
static const wxColour g_text_color = wxColour(107, 107, 107, 255);
|
|
|
|
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
|
|
#define TABLE_BORDER FromDIP(28)
|
|
#define HEADER_VERT_PADDING FromDIP(12)
|
|
#define HEADER_BEG_PADDING FromDIP(30)
|
|
#define ICON_GAP FromDIP(44)
|
|
#define HEADER_END_PADDING FromDIP(24)
|
|
#define ROW_VERT_PADDING FromDIP(6)
|
|
#define ROW_BEG_PADDING FromDIP(20)
|
|
#define EDIT_BOXES_GAP FromDIP(30)
|
|
#define ROW_END_PADDING FromDIP(21)
|
|
#define BTN_SIZE wxSize(FromDIP(58), FromDIP(24))
|
|
#define BTN_GAP FromDIP(20)
|
|
#define TEXT_BEG_PADDING FromDIP(41)
|
|
#define MAX_FLUSH_VALUE 999
|
|
#define MIN_WIPING_DIALOG_WIDTH FromDIP(400)
|
|
|
|
static void update_ui(wxWindow* window)
|
|
{
|
|
Slic3r::GUI::wxGetApp().UpdateDarkUI(window);
|
|
}
|
|
|
|
#ifdef _WIN32
|
|
#define style wxSP_ARROW_KEYS | wxBORDER_SIMPLE
|
|
#else
|
|
#define style wxSP_ARROW_KEYS
|
|
#endif
|
|
|
|
static const float g_min_flush_multiplier = 0.f;
|
|
static const float g_max_flush_multiplier = 3.f;
|
|
|
|
wxBoxSizer* WipingDialog::create_btn_sizer(long flags)
|
|
{
|
|
auto btn_sizer = new wxBoxSizer(wxHORIZONTAL);
|
|
btn_sizer->AddStretchSpacer();
|
|
|
|
StateColor ok_btn_bg(
|
|
std::pair<wxColour, int>(wxColour(27, 136, 68), StateColor::Pressed),
|
|
std::pair<wxColour, int>(wxColour(61, 203, 115), StateColor::Hovered),
|
|
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal)
|
|
);
|
|
|
|
StateColor ok_btn_bd(
|
|
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal)
|
|
);
|
|
|
|
StateColor ok_btn_text(
|
|
std::pair<wxColour, int>(wxColour(255, 255, 254), StateColor::Normal)
|
|
);
|
|
|
|
StateColor cancel_btn_bg(
|
|
std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed),
|
|
std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered),
|
|
std::pair<wxColour, int>(wxColour(255, 255, 255), StateColor::Normal)
|
|
);
|
|
|
|
StateColor cancel_btn_bd_(
|
|
std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Normal)
|
|
);
|
|
|
|
StateColor cancel_btn_text(
|
|
std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Normal)
|
|
);
|
|
|
|
|
|
StateColor calc_btn_bg(
|
|
std::pair<wxColour, int>(wxColour(27, 136, 68), StateColor::Pressed),
|
|
std::pair<wxColour, int>(wxColour(61, 203, 115), StateColor::Hovered),
|
|
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal)
|
|
);
|
|
|
|
StateColor calc_btn_bd(
|
|
std::pair<wxColour, int>(wxColour(0, 150, 136), StateColor::Normal)
|
|
);
|
|
|
|
StateColor calc_btn_text(
|
|
std::pair<wxColour, int>(wxColour(255, 255, 254), StateColor::Normal)
|
|
);
|
|
|
|
if (flags & wxRESET) {
|
|
Button *calc_btn = new Button(this, _L("Auto-Calc"));
|
|
calc_btn->SetMinSize(wxSize(FromDIP(75), FromDIP(24)));
|
|
calc_btn->SetCornerRadius(FromDIP(12));
|
|
calc_btn->SetBackgroundColor(calc_btn_bg);
|
|
calc_btn->SetBorderColor(calc_btn_bd);
|
|
calc_btn->SetTextColor(calc_btn_text);
|
|
calc_btn->SetFocus();
|
|
calc_btn->SetId(wxID_RESET);
|
|
btn_sizer->Add(calc_btn, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, BTN_GAP);
|
|
m_button_list[wxRESET] = calc_btn;
|
|
}
|
|
if (flags & wxOK) {
|
|
Button* ok_btn = new Button(this, _L("OK"));
|
|
ok_btn->SetMinSize(BTN_SIZE);
|
|
ok_btn->SetCornerRadius(FromDIP(12));
|
|
ok_btn->SetBackgroundColor(ok_btn_bg);
|
|
ok_btn->SetBorderColor(ok_btn_bd);
|
|
ok_btn->SetTextColor(ok_btn_text);
|
|
ok_btn->SetFocus();
|
|
ok_btn->SetId(wxID_OK);
|
|
btn_sizer->Add(ok_btn, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, BTN_GAP);
|
|
m_button_list[wxOK] = ok_btn;
|
|
}
|
|
if (flags & wxCANCEL) {
|
|
Button* cancel_btn = new Button(this, _L("Cancel"));
|
|
cancel_btn->SetMinSize(BTN_SIZE);
|
|
cancel_btn->SetCornerRadius(FromDIP(12));
|
|
cancel_btn->SetBackgroundColor(cancel_btn_bg);
|
|
cancel_btn->SetBorderColor(cancel_btn_bd_);
|
|
cancel_btn->SetTextColor(cancel_btn_text);
|
|
cancel_btn->SetId(wxID_CANCEL);
|
|
btn_sizer->Add(cancel_btn, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, BTN_GAP);
|
|
m_button_list[wxCANCEL] = cancel_btn;
|
|
}
|
|
|
|
return btn_sizer;
|
|
|
|
}
|
|
void WipingDialog::on_dpi_changed(const wxRect &suggested_rect)
|
|
{
|
|
for (auto button_item : m_button_list)
|
|
{
|
|
if (button_item.first == wxRESET)
|
|
{
|
|
button_item.second->SetMinSize(wxSize(FromDIP(75), FromDIP(24)));
|
|
button_item.second->SetCornerRadius(FromDIP(12));
|
|
}
|
|
if (button_item.first == wxOK) {
|
|
button_item.second->SetMinSize(BTN_SIZE);
|
|
button_item.second->SetCornerRadius(FromDIP(12));
|
|
}
|
|
if (button_item.first == wxCANCEL) {
|
|
button_item.second->SetMinSize(BTN_SIZE);
|
|
button_item.second->SetCornerRadius(FromDIP(12));
|
|
}
|
|
}
|
|
m_panel_wiping->msw_rescale();
|
|
this->Refresh();
|
|
};
|
|
|
|
// Parent dialog for purging volume adjustments - it fathers WipingPanel widget (that contains all controls) and a button to toggle simple/advanced mode:
|
|
WipingDialog::WipingDialog(wxWindow* parent, const std::vector<float>& matrix, const std::vector<float>& extruders, const std::vector<std::string>& extruder_colours,
|
|
int extra_flush_volume, float flush_multiplier)
|
|
: DPIDialog(parent ? parent : static_cast<wxWindow *>(wxGetApp().mainframe),
|
|
wxID_ANY,
|
|
_(L("Flushing volumes for filament change")),
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
wxDEFAULT_DIALOG_STYLE /* | wxRESIZE_BORDER*/)
|
|
{
|
|
this->SetBackgroundColour(*wxWHITE);
|
|
this->SetMinSize(wxSize(MIN_WIPING_DIALOG_WIDTH, -1));
|
|
|
|
m_panel_wiping = new WipingPanel(this, matrix, extruders, extruder_colours, nullptr, extra_flush_volume, flush_multiplier);
|
|
|
|
auto main_sizer = new wxBoxSizer(wxVERTICAL);
|
|
|
|
// set min sizer width according to extruders count
|
|
auto sizer_width = (int)((sqrt(matrix.size()) + 2.8)*ITEM_WIDTH());
|
|
sizer_width = sizer_width > MIN_WIPING_DIALOG_WIDTH ? sizer_width : MIN_WIPING_DIALOG_WIDTH;
|
|
main_sizer->SetMinSize(wxSize(sizer_width, -1));
|
|
|
|
main_sizer->Add(m_panel_wiping, 1, wxEXPAND | wxALL, 0);
|
|
|
|
auto btn_sizer = create_btn_sizer(wxOK | wxCANCEL |wxRESET);
|
|
main_sizer->Add(btn_sizer, 0, wxBOTTOM | wxRIGHT | wxEXPAND, BTN_GAP);
|
|
SetSizer(main_sizer);
|
|
main_sizer->SetSizeHints(this);
|
|
|
|
if (this->FindWindowById(wxID_OK, this)) {
|
|
this->FindWindowById(wxID_OK, this)->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { // if OK button is clicked..
|
|
m_output_matrix = m_panel_wiping->read_matrix_values(); // ..query wiping panel and save returned values
|
|
m_output_extruders = m_panel_wiping->read_extruders_values(); // so they can be recovered later by calling get_...()
|
|
EndModal(wxID_OK);
|
|
}, wxID_OK);
|
|
}
|
|
if (this->FindWindowById(wxID_CANCEL, this)) {
|
|
update_ui(static_cast<wxButton*>(this->FindWindowById(wxID_CANCEL, this)));
|
|
this->FindWindowById(wxID_CANCEL, this)->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { EndModal(wxCANCEL); });
|
|
|
|
}
|
|
if (this->FindWindowById(wxID_RESET, this)) {
|
|
this->FindWindowById(wxID_RESET, this)->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { m_panel_wiping->calc_flushing_volumes(); });
|
|
}
|
|
this->Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent& e) { EndModal(wxCANCEL); });
|
|
this->Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& e) {
|
|
if (e.GetKeyCode() == WXK_ESCAPE) {
|
|
if (this->IsModal())
|
|
this->EndModal(wxID_CANCEL);
|
|
else
|
|
this->Close();
|
|
}
|
|
else
|
|
e.Skip();
|
|
});
|
|
|
|
wxGetApp().UpdateDlgDarkUI(this);
|
|
}
|
|
|
|
void WipingPanel::create_panels(wxWindow* parent, const int num) {
|
|
for (size_t i = 0; i < num; i++)
|
|
{
|
|
wxPanel* panel = new wxPanel(parent);
|
|
panel->SetBackgroundColour(i % 2 == 0 ? *wxWHITE : wxColour(238, 238, 238));
|
|
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
|
panel->SetSizer(sizer);
|
|
|
|
wxButton* icon = new wxButton(panel, wxID_ANY, {}, wxDefaultPosition, ICON_SIZE, wxBORDER_NONE | wxBU_AUTODRAW);
|
|
icon->SetBitmap(*get_extruder_color_icon(m_colours[i].GetAsString(wxC2S_HTML_SYNTAX).ToStdString(), std::to_string(i + 1), FromDIP(16), FromDIP(16)));
|
|
icon->SetCanFocus(false);
|
|
icon_list2.push_back(icon);
|
|
|
|
sizer->AddSpacer(ROW_BEG_PADDING);
|
|
sizer->Add(icon, 0, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, ROW_VERT_PADDING);
|
|
|
|
for (unsigned int j = 0; j < num; ++j) {
|
|
edit_boxes[j][i]->Reparent(panel);
|
|
edit_boxes[j][i]->SetBackgroundColour(panel->GetBackgroundColour());
|
|
sizer->AddSpacer(EDIT_BOXES_GAP);
|
|
sizer->Add(edit_boxes[j][i], 0, wxALIGN_CENTER_VERTICAL, 0);
|
|
}
|
|
sizer->AddSpacer(ROW_END_PADDING);
|
|
|
|
m_sizer_advanced->Add(panel, 0, wxRIGHT | wxLEFT | wxEXPAND, TABLE_BORDER);
|
|
panel->Layout();
|
|
}
|
|
}
|
|
|
|
// This panel contains all control widgets for both simple and advanced mode (these reside in separate sizers)
|
|
WipingPanel::WipingPanel(wxWindow* parent, const std::vector<float>& matrix, const std::vector<float>& extruders, const std::vector<std::string>& extruder_colours, Button* calc_button,
|
|
int extra_flush_volume, float flush_multiplier)
|
|
: wxPanel(parent,wxID_ANY, wxDefaultPosition, wxDefaultSize/*,wxBORDER_RAISED*/)
|
|
,m_matrix(matrix), m_min_flush_volume(extra_flush_volume), m_max_flush_volume(Slic3r::g_max_flush_volume)
|
|
{
|
|
m_number_of_extruders = (int)(sqrt(matrix.size())+0.001);
|
|
|
|
for (const std::string& color : extruder_colours) {
|
|
//unsigned char rgb[3];
|
|
//Slic3r::GUI::BitmapCache::parse_color(color, rgb);
|
|
m_colours.push_back(wxColor(color));
|
|
}
|
|
|
|
// Create two switched panels with their own sizers
|
|
m_sizer_simple = new wxBoxSizer(wxVERTICAL);
|
|
m_sizer_advanced = new wxBoxSizer(wxVERTICAL);
|
|
m_page_simple = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
|
m_page_advanced = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
|
m_page_simple->SetSizer(m_sizer_simple);
|
|
m_page_advanced->SetSizer(m_sizer_advanced);
|
|
|
|
update_ui(m_page_simple);
|
|
update_ui(m_page_advanced);
|
|
|
|
auto gridsizer_simple = new wxGridSizer(3, 5, 10);
|
|
m_gridsizer_advanced = new wxGridSizer(m_number_of_extruders + 1, 5, 1);
|
|
|
|
// First create controls for advanced mode and assign them to m_page_advanced:
|
|
for (unsigned int i = 0; i < m_number_of_extruders; ++i) {
|
|
edit_boxes.push_back(std::vector<wxTextCtrl*>(0));
|
|
|
|
for (unsigned int j = 0; j < m_number_of_extruders; ++j) {
|
|
#ifdef _WIN32
|
|
wxTextCtrl* text = new wxTextCtrl(m_page_advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(ITEM_WIDTH(), -1), wxTE_CENTER | wxBORDER_NONE | wxTE_PROCESS_ENTER);
|
|
update_ui(text);
|
|
edit_boxes.back().push_back(text);
|
|
#else
|
|
edit_boxes.back().push_back(new wxTextCtrl(m_page_advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(ITEM_WIDTH(), -1)));
|
|
#endif
|
|
if (i == j) {
|
|
edit_boxes[i][j]->SetValue(wxString("-"));
|
|
edit_boxes[i][j]->SetEditable(false);
|
|
edit_boxes[i][j]->Bind(wxEVT_KILL_FOCUS, [this](wxFocusEvent&) {});
|
|
edit_boxes[i][j]->Bind(wxEVT_SET_FOCUS, [this](wxFocusEvent&) {});
|
|
}
|
|
else {
|
|
edit_boxes[i][j]->SetValue(wxString("") << int(m_matrix[m_number_of_extruders * j + i] * flush_multiplier));
|
|
|
|
edit_boxes[i][j]->Bind(wxEVT_TEXT, [this, i, j](wxCommandEvent& e) {
|
|
wxString str = edit_boxes[i][j]->GetValue();
|
|
int value = wxAtoi(str);
|
|
if (value > MAX_FLUSH_VALUE) {
|
|
str = wxString::Format(("%d"), MAX_FLUSH_VALUE);
|
|
edit_boxes[i][j]->SetValue(str);
|
|
}
|
|
});
|
|
|
|
auto on_apply_text_modify = [this, i, j](wxEvent &e) {
|
|
wxString str = edit_boxes[i][j]->GetValue();
|
|
int value = wxAtoi(str);
|
|
m_matrix[m_number_of_extruders * j + i] = value / get_flush_multiplier();
|
|
this->update_warning_texts();
|
|
e.Skip();
|
|
};
|
|
|
|
edit_boxes[i][j]->Bind(wxEVT_TEXT_ENTER, on_apply_text_modify);
|
|
edit_boxes[i][j]->Bind(wxEVT_KILL_FOCUS, on_apply_text_modify);
|
|
}
|
|
}
|
|
}
|
|
|
|
// BBS
|
|
header_line_panel = new wxPanel(m_page_advanced, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
|
header_line_panel->SetBackgroundColour(wxColour(238, 238, 238));
|
|
auto header_line_sizer = new wxBoxSizer(wxHORIZONTAL);
|
|
header_line_panel->SetSizer(header_line_sizer);
|
|
|
|
header_line_sizer->AddSpacer(HEADER_BEG_PADDING);
|
|
for (unsigned int i = 0; i < m_number_of_extruders; ++i) {
|
|
wxButton* icon = new wxButton(header_line_panel, wxID_ANY, {}, wxDefaultPosition, ICON_SIZE, wxBORDER_NONE | wxBU_AUTODRAW);
|
|
icon->SetBitmap(*get_extruder_color_icon(m_colours[i].GetAsString(wxC2S_HTML_SYNTAX).ToStdString(), std::to_string(i + 1), FromDIP(16), FromDIP(16)));
|
|
icon->SetCanFocus(false);
|
|
icon_list1.push_back(icon);
|
|
|
|
header_line_sizer->AddSpacer(ICON_GAP);
|
|
header_line_sizer->Add(icon, 0, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, HEADER_VERT_PADDING);
|
|
}
|
|
header_line_sizer->AddSpacer(HEADER_END_PADDING);
|
|
|
|
m_sizer_advanced->Add(header_line_panel, 0, wxEXPAND | wxTOP | wxRIGHT | wxLEFT, TABLE_BORDER);
|
|
|
|
create_panels(m_page_advanced, m_number_of_extruders);
|
|
|
|
m_sizer_advanced->AddSpacer(BTN_SIZE.y);
|
|
|
|
// BBS: for tunning flush volumes
|
|
{
|
|
wxBoxSizer* param_sizer = new wxBoxSizer(wxHORIZONTAL);
|
|
|
|
wxStaticText* flush_multiplier_title = new wxStaticText(m_page_advanced, wxID_ANY, _L("Multiplier"));
|
|
param_sizer->Add(flush_multiplier_title);
|
|
param_sizer->AddSpacer(FromDIP(5));
|
|
m_flush_multiplier_ebox = new wxTextCtrl(m_page_advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(50), -1), wxTE_PROCESS_ENTER);
|
|
char flush_multi_str[32] = { 0 };
|
|
snprintf(flush_multi_str, sizeof(flush_multi_str), "%.2f", flush_multiplier);
|
|
m_flush_multiplier_ebox->SetValue(flush_multi_str);
|
|
param_sizer->Add(m_flush_multiplier_ebox);
|
|
param_sizer->AddStretchSpacer(1);
|
|
m_sizer_advanced->Add(param_sizer, 0, wxEXPAND | wxLEFT, TEXT_BEG_PADDING);
|
|
|
|
auto multi_desc_label = new wxStaticText(m_page_advanced, wxID_ANY, _(L("Flushing volume (mm³) for each filament pair.")), wxDefaultPosition, wxDefaultSize, 0);
|
|
multi_desc_label->SetForegroundColour(g_text_color);
|
|
m_sizer_advanced->Add(multi_desc_label, 0, wxEXPAND | wxLEFT, TEXT_BEG_PADDING);
|
|
|
|
wxString min_flush_str = wxString::Format(_L("Suggestion: Flushing Volume in range [%d, %d]"), m_min_flush_volume, m_max_flush_volume);
|
|
m_min_flush_label = new wxStaticText(m_page_advanced, wxID_ANY, min_flush_str, wxDefaultPosition, wxDefaultSize, 0);
|
|
m_min_flush_label->SetForegroundColour(g_text_color);
|
|
m_sizer_advanced->Add(m_min_flush_label, 0, wxEXPAND | wxLEFT, TEXT_BEG_PADDING);
|
|
|
|
auto on_apply_text_modify = [this](wxEvent& e) {
|
|
wxString str = m_flush_multiplier_ebox->GetValue();
|
|
float multiplier = wxAtof(str);
|
|
if (multiplier < g_min_flush_multiplier || multiplier > g_max_flush_multiplier) {
|
|
str = wxString::Format(("%.2f"), multiplier < g_min_flush_multiplier ? g_min_flush_multiplier : g_max_flush_multiplier);
|
|
m_flush_multiplier_ebox->SetValue(str);
|
|
MessageDialog dlg(nullptr,
|
|
wxString::Format(_L("The multiplier should be in range [%.2f, %.2f]."), g_min_flush_multiplier, g_max_flush_multiplier),
|
|
_L("Warning"), wxICON_WARNING | wxOK);
|
|
dlg.ShowModal();
|
|
}
|
|
for (unsigned int i = 0; i < m_number_of_extruders; ++i) {
|
|
for (unsigned int j = 0; j < m_number_of_extruders; ++j) {
|
|
edit_boxes[i][j]->SetValue(to_string(int(m_matrix[m_number_of_extruders * j + i] * multiplier)));
|
|
}
|
|
}
|
|
|
|
this->update_warning_texts();
|
|
e.Skip();
|
|
};
|
|
m_flush_multiplier_ebox->Bind(wxEVT_TEXT_ENTER, on_apply_text_modify);
|
|
m_flush_multiplier_ebox->Bind(wxEVT_KILL_FOCUS, on_apply_text_modify);
|
|
|
|
m_sizer_advanced->AddSpacer(10);
|
|
}
|
|
this->update_warning_texts();
|
|
|
|
m_page_advanced->Hide();
|
|
|
|
// Now the same for simple mode:
|
|
gridsizer_simple->Add(new wxStaticText(m_page_simple, wxID_ANY, wxString("")), 0, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL);
|
|
gridsizer_simple->Add(new wxStaticText(m_page_simple, wxID_ANY, wxString(_(L("unloaded")))), 0, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL);
|
|
gridsizer_simple->Add(new wxStaticText(m_page_simple,wxID_ANY,wxString(_(L("loaded")))), 0, wxALIGN_CENTER | wxALIGN_CENTER_VERTICAL);
|
|
|
|
auto add_spin_ctrl = [this](std::vector<wxSpinCtrl*>& vec, float initial)
|
|
{
|
|
wxSpinCtrl* spin_ctrl = new wxSpinCtrl(m_page_simple, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(ITEM_WIDTH(), -1), style | wxALIGN_RIGHT, 0, 300, (int)initial);
|
|
update_ui(spin_ctrl);
|
|
vec.push_back(spin_ctrl);
|
|
|
|
#ifdef __WXOSX__
|
|
// On OSX / Cocoa, wxSpinCtrl::GetValue() doesn't return the new value
|
|
// when it was changed from the text control, so the on_change callback
|
|
// gets the old one, and on_kill_focus resets the control to the old value.
|
|
// As a workaround, we get the new value from $event->GetString and store
|
|
// here temporarily so that we can return it from get_value()
|
|
spin_ctrl->Bind(wxEVT_TEXT, ([spin_ctrl](wxCommandEvent e)
|
|
{
|
|
long value;
|
|
const bool parsed = e.GetString().ToLong(&value);
|
|
int tmp_value = parsed && value >= INT_MIN && value <= INT_MAX ? (int)value : INT_MIN;
|
|
|
|
// Forcibly set the input value for SpinControl, since the value
|
|
// inserted from the keyboard or clipboard is not updated under OSX
|
|
if (tmp_value != INT_MIN) {
|
|
spin_ctrl->SetValue(tmp_value);
|
|
|
|
// But in SetValue() is executed m_text_ctrl->SelectAll(), so
|
|
// discard this selection and set insertion point to the end of string
|
|
spin_ctrl->GetText()->SetInsertionPointEnd();
|
|
}
|
|
}), spin_ctrl->GetId());
|
|
#endif
|
|
};
|
|
|
|
for (unsigned int i=0;i<m_number_of_extruders;++i) {
|
|
add_spin_ctrl(m_old, extruders[2 * i]);
|
|
add_spin_ctrl(m_new, extruders[2 * i+1]);
|
|
|
|
auto hsizer = new wxBoxSizer(wxHORIZONTAL);
|
|
wxWindow* w = new wxWindow(m_page_simple, wxID_ANY, wxDefaultPosition, ICON_SIZE, wxBORDER_SIMPLE);
|
|
w->SetCanFocus(false);
|
|
w->SetBackgroundColour(m_colours[i]);
|
|
hsizer->Add(w, wxALIGN_CENTER_VERTICAL);
|
|
hsizer->AddSpacer(10);
|
|
hsizer->Add(new wxStaticText(m_page_simple, wxID_ANY, wxString(_(L("Filament #"))) << i + 1 << ": "), 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
|
|
|
|
gridsizer_simple->Add(hsizer, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL);
|
|
gridsizer_simple->Add(m_old.back(),0);
|
|
gridsizer_simple->Add(m_new.back(),0);
|
|
}
|
|
|
|
m_sizer = new wxBoxSizer(wxVERTICAL);
|
|
m_sizer->Add(m_page_simple, 0, wxEXPAND, 0);
|
|
m_sizer->Add(m_page_advanced, 0, wxEXPAND, 0);
|
|
|
|
m_sizer->SetSizeHints(this);
|
|
SetSizer(m_sizer);
|
|
this->Layout();
|
|
|
|
toggle_advanced(); // to show/hide what is appropriate
|
|
|
|
header_line_panel->Bind(wxEVT_PAINT, [this](wxPaintEvent&) {
|
|
wxPaintDC dc(header_line_panel);
|
|
wxString from_text = _L("From");
|
|
wxString to_text = _L("To");
|
|
wxSize from_text_size = dc.GetTextExtent(from_text);
|
|
wxSize to_text_size = dc.GetTextExtent(to_text);
|
|
|
|
int base_y = (header_line_panel->GetSize().y - from_text_size.y - to_text_size.y) / 2;
|
|
int vol_width = ROW_BEG_PADDING + EDIT_BOXES_GAP / 2 + ICON_SIZE.x;
|
|
int base_x = (vol_width - from_text_size.x - to_text_size.x) / 2;
|
|
|
|
// draw from text
|
|
int x = base_x;
|
|
int y = base_y + to_text_size.y;
|
|
dc.DrawText(from_text, x, y);
|
|
|
|
// draw to text
|
|
x = base_x + from_text_size.x;
|
|
y = base_y;
|
|
dc.DrawText(to_text, x, y);
|
|
|
|
// draw a line
|
|
int p1_x = base_x + from_text_size.x - to_text_size.y;
|
|
int p1_y = base_y;
|
|
int p2_x = base_x + from_text_size.x + from_text_size.y;
|
|
int p2_y = base_y + from_text_size.y + to_text_size.y;
|
|
dc.SetPen(wxPen(wxColour(172, 172, 172, 1)));
|
|
dc.DrawLine(p1_x, p1_y, p2_x, p2_y);
|
|
});
|
|
}
|
|
|
|
int WipingPanel::calc_flushing_volume(const wxColour& from_, const wxColour& to_)
|
|
{
|
|
Slic3r::FlushVolCalculator calculator(m_min_flush_volume, m_max_flush_volume);
|
|
|
|
return calculator.calc_flush_vol(from_.Alpha(), from_.Red(), from_.Green(), from_.Blue(), to_.Alpha(), to_.Red(), to_.Green(), to_.Blue());
|
|
}
|
|
|
|
void WipingPanel::update_warning_texts()
|
|
{
|
|
static const wxColour g_warning_color = *wxRED;
|
|
static const wxColour g_normal_color = *wxBLACK;
|
|
|
|
wxString multi_str = m_flush_multiplier_ebox->GetValue();
|
|
float multiplier = wxAtof(multi_str);
|
|
|
|
bool has_exception_flush = false;
|
|
for (int i = 0; i < edit_boxes.size(); i++) {
|
|
auto& box_vec = edit_boxes[i];
|
|
for (int j = 0; j < box_vec.size(); j++) {
|
|
if (i == j)
|
|
continue;
|
|
|
|
auto text_box = box_vec[j];
|
|
wxString str = text_box->GetValue();
|
|
int actual_volume = wxAtoi(str);
|
|
if (actual_volume < m_min_flush_volume || actual_volume > m_max_flush_volume) {
|
|
if (text_box->GetForegroundColour() != g_warning_color) {
|
|
text_box->SetForegroundColour(g_warning_color);
|
|
text_box->Refresh();
|
|
}
|
|
has_exception_flush = true;
|
|
}
|
|
else {
|
|
if (text_box->GetForegroundColour() != g_normal_color) {
|
|
text_box->SetForegroundColour(StateColor::darkModeColorFor(g_normal_color));
|
|
text_box->Refresh();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (has_exception_flush && m_min_flush_label->GetForegroundColour() != g_warning_color) {
|
|
m_min_flush_label->SetForegroundColour(g_warning_color);
|
|
m_min_flush_label->Refresh();
|
|
}
|
|
else if (!has_exception_flush && m_min_flush_label->GetForegroundColour() != g_text_color) {
|
|
m_min_flush_label->SetForegroundColour(g_text_color);
|
|
m_min_flush_label->Refresh();
|
|
}
|
|
}
|
|
|
|
void WipingPanel::calc_flushing_volumes()
|
|
{
|
|
for (int from_idx = 0; from_idx < m_colours.size(); from_idx++) {
|
|
const wxColour& from = m_colours[from_idx];
|
|
bool is_from_support = is_support_filament(from_idx);
|
|
for (int to_idx = 0; to_idx < m_colours.size(); to_idx++) {
|
|
bool is_to_support = is_support_filament(to_idx);
|
|
if (from_idx == to_idx) {
|
|
edit_boxes[to_idx][from_idx]->SetValue(std::to_string(0));
|
|
}
|
|
else {
|
|
int flushing_volume = 0;
|
|
if (is_to_support) {
|
|
flushing_volume = Slic3r::g_flush_volume_to_support;
|
|
}
|
|
else {
|
|
const wxColour& to = m_colours[to_idx];
|
|
flushing_volume = calc_flushing_volume(from, to);
|
|
if (is_from_support) {
|
|
flushing_volume = std::max(Slic3r::g_min_flush_volume_from_support, flushing_volume);
|
|
}
|
|
}
|
|
|
|
m_matrix[m_number_of_extruders * from_idx + to_idx] = flushing_volume;
|
|
flushing_volume = int(flushing_volume * get_flush_multiplier());
|
|
edit_boxes[to_idx][from_idx]->SetValue(std::to_string(flushing_volume));
|
|
}
|
|
}
|
|
}
|
|
|
|
this->update_warning_texts();
|
|
}
|
|
|
|
void WipingPanel::msw_rescale()
|
|
{
|
|
for (unsigned int i = 0; i < icon_list1.size(); ++i) {
|
|
auto bitmap = *get_extruder_color_icon(m_colours[i].GetAsString(wxC2S_HTML_SYNTAX).ToStdString(), std::to_string(i + 1), FromDIP(16), FromDIP(16));
|
|
icon_list1[i]->SetBitmap(bitmap);
|
|
icon_list2[i]->SetBitmap(bitmap);
|
|
}
|
|
}
|
|
|
|
// Reads values from the (advanced) wiping matrix:
|
|
std::vector<float> WipingPanel::read_matrix_values() {
|
|
if (!m_advanced)
|
|
fill_in_matrix();
|
|
std::vector<float> output;
|
|
for (unsigned int i=0;i<m_number_of_extruders;++i) {
|
|
for (unsigned int j=0;j<m_number_of_extruders;++j) {
|
|
double val = 0.;
|
|
float flush_multipler = get_flush_multiplier();
|
|
if (flush_multipler == 0) {
|
|
output.push_back(0.);
|
|
}
|
|
else {
|
|
edit_boxes[j][i]->GetValue().ToDouble(&val);
|
|
output.push_back((float) val / get_flush_multiplier());
|
|
}
|
|
}
|
|
}
|
|
return output;
|
|
}
|
|
|
|
// Reads values from simple mode to save them for next time:
|
|
std::vector<float> WipingPanel::read_extruders_values() {
|
|
std::vector<float> output;
|
|
for (unsigned int i=0;i<m_number_of_extruders;++i) {
|
|
output.push_back(m_old[i]->GetValue());
|
|
output.push_back(m_new[i]->GetValue());
|
|
}
|
|
return output;
|
|
}
|
|
|
|
// This updates the "advanced" matrix based on values from "simple" mode
|
|
void WipingPanel::fill_in_matrix() {
|
|
for (unsigned i=0;i<m_number_of_extruders;++i) {
|
|
for (unsigned j=0;j<m_number_of_extruders;++j) {
|
|
if (i==j) continue;
|
|
edit_boxes[j][i]->SetValue(wxString("")<< (m_old[i]->GetValue() + m_new[j]->GetValue()));
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Function to check if simple and advanced settings are matching
|
|
bool WipingPanel::advanced_matches_simple() {
|
|
for (unsigned i=0;i<m_number_of_extruders;++i) {
|
|
for (unsigned j=0;j<m_number_of_extruders;++j) {
|
|
if (i==j) continue;
|
|
if (edit_boxes[j][i]->GetValue() != (wxString("")<< (m_old[i]->GetValue() + m_new[j]->GetValue())))
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
// Switches the dialog from simple to advanced mode and vice versa
|
|
void WipingPanel::toggle_advanced(bool user_action) {
|
|
if (user_action)
|
|
m_advanced = !m_advanced; // user demands a change -> toggle
|
|
else {
|
|
// BBS: show advanced mode by default
|
|
//m_advanced = !advanced_matches_simple(); // if called from constructor, show what is appropriate
|
|
m_advanced = true;
|
|
}
|
|
|
|
(m_advanced ? m_page_advanced : m_page_simple)->Show();
|
|
(!m_advanced ? m_page_advanced : m_page_simple)->Hide();
|
|
|
|
if (m_advanced)
|
|
if (user_action) fill_in_matrix(); // otherwise keep values loaded from config
|
|
|
|
m_sizer->Layout();
|
|
Refresh();
|
|
}
|