diff --git a/CMakeLists.txt b/CMakeLists.txt index 88db091a81..0a6f3fb3f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -704,7 +704,6 @@ elseif (SLIC3R_FHS) DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME BambuStudio.png ) endforeach() - install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/udev/ DESTINATION lib/udev/rules.d) elseif (CMAKE_MACOSX_BUNDLE) install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/BambuStudio.app/Contents/resources") else () diff --git a/bbl/i18n/BambuStudio.pot b/bbl/i18n/BambuStudio.pot index 950f131fcf..0540d8b1d0 100644 --- a/bbl/i18n/BambuStudio.pot +++ b/bbl/i18n/BambuStudio.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1328,6 +1328,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "" +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1770,8 +1773,8 @@ msgid "" msgstr "" msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" msgid "" diff --git a/bbl/i18n/de/BambuStudio_de.po b/bbl/i18n/de/BambuStudio_de.po index 8de39dc828..0543ff90da 100644 --- a/bbl/i18n/de/BambuStudio_de.po +++ b/bbl/i18n/de/BambuStudio_de.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Bambu Studio\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -1395,6 +1395,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "" +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1903,12 +1906,9 @@ msgstr "" "Der Wert wird auf 0 zurückgesetzt." msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" -"Der Spiralmodus funktioniert nur, wenn die Wand 1 Linienweite breit sind, \n" -"Support ist deaktiviert, die oberen Schalenschichten sind 0 und die Dichte " -"der Füllung ist 0\n" msgid "" "Change these settings automatically? \n" @@ -7988,6 +7988,16 @@ msgid "" "density to improve the strength of the model?" msgstr "" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "Der Spiralmodus funktioniert nur, wenn die Wand 1 Linienweite breit " +#~ "sind, \n" +#~ "Support ist deaktiviert, die oberen Schalenschichten sind 0 und die " +#~ "Dichte der Füllung ist 0\n" + #~ msgid "Choose one or more files (3mf/step/stl/obj/amf):" #~ msgstr "Wählen sie eine oder mer Dateien (3mf/step/stl/obj/amf):" diff --git a/bbl/i18n/en/BambuStudio_en.po b/bbl/i18n/en/BambuStudio_en.po index 9ea01cb7c1..8940fa6ae9 100644 --- a/bbl/i18n/en/BambuStudio_en.po +++ b/bbl/i18n/en/BambuStudio_en.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Bambu Studio\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1361,6 +1361,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "" +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1859,11 +1862,9 @@ msgstr "" "The value will be reset to 0." msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" -"Spiral mode only works when wall loops is set to 1, \n" -"support is disabled, top shell layers is 0, and sparse infill density is 0\n" msgid "" "Change these settings automatically? \n" @@ -7850,6 +7851,15 @@ msgid "" "density to improve the strength of the model?" msgstr "" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "Spiral mode only works when wall loops is set to 1, \n" +#~ "support is disabled, top shell layers is 0, and sparse infill density is " +#~ "0\n" + #~ msgid "Choose one or more files (3mf/step/stl/obj/amf):" #~ msgstr "Choose one or more files (3mf/step/stl/obj/amf):" diff --git a/bbl/i18n/es/BambuStudio_es.po b/bbl/i18n/es/BambuStudio_es.po index 4d6b5a1252..c491143c27 100644 --- a/bbl/i18n/es/BambuStudio_es.po +++ b/bbl/i18n/es/BambuStudio_es.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Bambu Studio\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -1392,6 +1392,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "" +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1896,12 +1899,9 @@ msgstr "" "El valor se restablecerá a 0." msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" -"El modo espiral sólo funciona cuando los bucles de pared son 1, \n" -"el soporte está desactivado, las capas superiores de la cáscara es 0 y la " -"densidad de relleno dispersa es 0\n" msgid "" "Change these settings automatically? \n" @@ -7976,6 +7976,15 @@ msgid "" "density to improve the strength of the model?" msgstr "" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "El modo espiral sólo funciona cuando los bucles de pared son 1, \n" +#~ "el soporte está desactivado, las capas superiores de la cáscara es 0 y la " +#~ "densidad de relleno dispersa es 0\n" + #~ msgid "Choose one or more files (3mf/step/stl/obj/amf):" #~ msgstr "Elija uno o varios archivos (3mf/step/stl/obj/amf):" diff --git a/bbl/i18n/fr/BambuStudio_fr.po b/bbl/i18n/fr/BambuStudio_fr.po index 71240fe325..331ac228cf 100644 --- a/bbl/i18n/fr/BambuStudio_fr.po +++ b/bbl/i18n/fr/BambuStudio_fr.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Bambu Studio\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -1386,6 +1386,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "" +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1877,12 +1880,9 @@ msgstr "" "La valeur sera remise à 0." msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" -"Le mode spirale ne fonctionne que lorsque les boucles murales sont à 1, \n" -"le support est désactivé, les couches de coque supérieures sont à 0 et la " -"densité de remplissage clairsemée est à 0\n" msgid "" "Change these settings automatically? \n" @@ -7977,6 +7977,15 @@ msgid "" "density to improve the strength of the model?" msgstr "" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "Le mode spirale ne fonctionne que lorsque les boucles murales sont à 1, \n" +#~ "le support est désactivé, les couches de coque supérieures sont à 0 et la " +#~ "densité de remplissage clairsemée est à 0\n" + #~ msgid "Choose one or more files (3mf/step/stl/obj/amf):" #~ msgstr "Choisissez un ou plusieurs fichiers (3mf/step/stl/obj/amf) :" diff --git a/bbl/i18n/hu/BambuStudio_hu.po b/bbl/i18n/hu/BambuStudio_hu.po index 33b73cf4fb..84357a177d 100644 --- a/bbl/i18n/hu/BambuStudio_hu.po +++ b/bbl/i18n/hu/BambuStudio_hu.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Bambu Studio\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -1387,6 +1387,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "A LAN-on keresztüli nyomtatáshoz helyezz be egy SD kártyát." +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1892,12 +1895,9 @@ msgstr "" "Az érték 0-ra áll vissza." msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" -"A spirál mód csak akkor működik, ha a falak száma 1,\n" -"a támaszok ki vannak kapcsolva, a felső rétegek száma 0 és a hiányos " -"kitöltés sűrűsége 0\n" msgid "" "Change these settings automatically? \n" @@ -7960,6 +7960,15 @@ msgid "" "density to improve the strength of the model?" msgstr "" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "A spirál mód csak akkor működik, ha a falak száma 1,\n" +#~ "a támaszok ki vannak kapcsolva, a felső rétegek száma 0 és a hiányos " +#~ "kitöltés sűrűsége 0\n" + #~ msgid "Choose one or more files (3mf/step/stl/obj/amf):" #~ msgstr "Válassz ki egy vagy több fájlt (3mf/step/stl/obj/amf):" diff --git a/bbl/i18n/nl/BambuStudio_nl.po b/bbl/i18n/nl/BambuStudio_nl.po index 3dd3539e03..bde61dd925 100644 --- a/bbl/i18n/nl/BambuStudio_nl.po +++ b/bbl/i18n/nl/BambuStudio_nl.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Bambu Studio\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -1393,6 +1393,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "" +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1898,12 +1901,9 @@ msgstr "" "De waarde wordt teruggezet naar 0." msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" -"Spiraal modus werkt alleen indien indien er 1 wall gekozen is, \n" -"support uitgeschakeld is, er 0 top layers gekozen zijn en de vulling " -"dichtheid 0 is\n" msgid "" "Change these settings automatically? \n" @@ -7998,6 +7998,15 @@ msgid "" "density to improve the strength of the model?" msgstr "" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "Spiraal modus werkt alleen indien indien er 1 wall gekozen is, \n" +#~ "support uitgeschakeld is, er 0 top layers gekozen zijn en de vulling " +#~ "dichtheid 0 is\n" + #~ msgid "Choose one or more files (3mf/step/stl/obj/amf):" #~ msgstr "Kies een of meer bestanden (3mf/step/stl/obj/amf):" diff --git a/bbl/i18n/sv/BambuStudio_sv.po b/bbl/i18n/sv/BambuStudio_sv.po index 49046d80cf..17d2b5e467 100644 --- a/bbl/i18n/sv/BambuStudio_sv.po +++ b/bbl/i18n/sv/BambuStudio_sv.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Bambu Studio\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -1373,6 +1373,9 @@ msgstr "" msgid "An SD card needs to be inserted before printing via LAN." msgstr "" +msgid "Failed to send the print job. Please try again." +msgstr "" + msgid "Send to Printer failed. Please try again." msgstr "" @@ -1868,11 +1871,9 @@ msgstr "" "Värdet kommer att återställas till 0." msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" msgstr "" -"Spiral läge fungerar bara när vägg antalet är 1,\n" -"support är inaktiverad, top lager är 0 och låg ifyllnads densitet är 0\n" msgid "" "Change these settings automatically? \n" @@ -7853,6 +7854,14 @@ msgid "" "density to improve the strength of the model?" msgstr "" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "Spiral läge fungerar bara när vägg antalet är 1,\n" +#~ "support är inaktiverad, top lager är 0 och låg ifyllnads densitet är 0\n" + #~ msgid "Choose one or more files (3mf/step/stl/obj/amf):" #~ msgstr "Välj en eller flera filer (3mf/step/stl/obj/amf):" diff --git a/bbl/i18n/zh_cn/BambuStudio_zh_CN.po b/bbl/i18n/zh_cn/BambuStudio_zh_CN.po index ab55b0215e..3b0cba24f5 100644 --- a/bbl/i18n/zh_cn/BambuStudio_zh_CN.po +++ b/bbl/i18n/zh_cn/BambuStudio_zh_CN.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Slic3rPE\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-13 20:02+0800\n" +"POT-Creation-Date: 2022-12-17 12:28+0800\n" "PO-Revision-Date: 2022-12-13 20:18+0800\n" "Last-Translator: Jiang Yue \n" "Language-Team: \n" @@ -1342,6 +1342,9 @@ msgstr "已发送完成,即将自动跳转到设备页面(%s秒)" msgid "An SD card needs to be inserted before printing via LAN." msgstr "需要插入SD卡后方可发送局域网打印" +msgid "Failed to send the print job. Please try again." +msgstr "无法发送打印任务,请重试。" + msgid "Send to Printer failed. Please try again." msgstr "发送到打印机失败。请重试。" @@ -1824,10 +1827,9 @@ msgstr "" "这个数值将被重置为0。" msgid "" -"Spiral mode only works when wall loops is 1, \n" -"support is disabled, top shell layers is 0 and sparse infill density is 0\n" -msgstr "" -"旋转模式只能在外墙层数为1,关闭支撑,顶层层数为0,稀疏填充密度为0时有效。\n" +"Spiral mode only works when wall loops is 1, support is disabled, top shell " +"layers is 0, sparse infill density is 0 and timelapse type is traditional" +msgstr "旋转模式只能在外墙层数为1,关闭支撑,顶层层数为0,稀疏填充密度为0,传统延时摄影时有效" msgid "" "Change these settings automatically? \n" @@ -7841,6 +7843,14 @@ msgstr "" "提高强度\n" "你知道吗?你可以使用更多的墙层数和更高的疏散填充密度来提高模型的强度。" +#~ msgid "" +#~ "Spiral mode only works when wall loops is 1, \n" +#~ "support is disabled, top shell layers is 0 and sparse infill density is " +#~ "0\n" +#~ msgstr "" +#~ "旋转模式只能在外墙层数为1,关闭支撑,顶层层数为0,稀疏填充密度为0时有" +#~ "效。\n" + #~ msgid "" #~ "When sparse infill density is low, the internal solid infill or internal " #~ "bridge may have no archor at the end of line. This cause falling and bad " @@ -8631,9 +8641,6 @@ msgstr "" #~ msgid "Uploading print job timed out. Please try again." #~ msgstr "上传打印任务超时,请重试。" -#~ msgid "Failed to send the print job. Please try again." -#~ msgstr "无法发送打印任务,请重试。" - #~ msgid "Sending print task timed out. Please try again." #~ msgstr "发送打印任务超时,请重试。" diff --git a/cmake/modules/FindTBB.cmake.in b/cmake/modules/FindTBB.cmake.in index a7eafa545f..49e405c184 100644 --- a/cmake/modules/FindTBB.cmake.in +++ b/cmake/modules/FindTBB.cmake.in @@ -293,7 +293,7 @@ if(NOT TBB_FOUND) # Create targets ################################## - if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND) + if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND AND NOT TARGET TBB::tbb) add_library(TBB::tbb UNKNOWN IMPORTED) set_target_properties(TBB::tbb PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${TBB_DEFINITIONS}" diff --git a/deps/Boost/Boost.cmake b/deps/Boost/Boost.cmake index ae2bd96466..be86209a4d 100644 --- a/deps/Boost/Boost.cmake +++ b/deps/Boost/Boost.cmake @@ -8,12 +8,10 @@ else() set(_build_cmd ./b2) endif() -set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/common.jam ./tools/build/src/tools/common.jam) - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam) set(_boost_toolset gcc) - set(_patch_command ${_patch_command} && ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam) + configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam) + set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html if (MSVC_VERSION EQUAL 1800) @@ -28,6 +26,9 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") elseif (MSVC_VERSION LESS 1930) # 1920-1929 = VS 16.0 (v142 toolset) set(_boost_toolset "msvc-14.2") + elseif (MSVC_VERSION LESS 1940) + # 1930-1939 = VS 17.0 (v143 toolset) + set(_boost_toolset "msvc-14.3") else () message(FATAL_ERROR "Unsupported MSVC version") endif () @@ -35,7 +36,9 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (WIN32) set(_boost_toolset "clang-win") else() - set(_boost_toolset "clang") + set(_boost_toolset clang) + configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam) + set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam) endif() elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") set(_boost_toolset "intel") @@ -68,9 +71,11 @@ ProcessorCount(NPROC) file(TO_NATIVE_PATH ${DESTDIR}/usr/local/ _prefix) set(_boost_flags "") -if (UNIX) +if (UNIX) set(_boost_flags "cflags=-fPIC;cxxflags=-fPIC") -elseif(APPLE) +endif () + +if(APPLE) set(_boost_flags "cflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET};" "cxxflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET};" @@ -92,7 +97,7 @@ if (_cfg_rel GREATER -1 OR _cfg_relwdeb GREATER -1 OR _cfg_minsizerel GREATER -1 list(APPEND _boost_variants release) endif() -if (_cfg_deb GREATER -1 OR (MSVC AND ${DEP_DEBUG}) ) +if ( (NOT MSVC AND _cfg_deb GREATER -1) OR (MSVC AND ${DEP_DEBUG}) ) list(APPEND _boost_variants debug) endif() @@ -119,8 +124,8 @@ set(_install_cmd ${_build_cmd} --prefix=${_prefix} install) ExternalProject_Add( dep_Boost - URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz" - URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a + URL "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip" + URL_HASH SHA256=f22143b5528e081123c3c5ed437e92f648fe69748e95fa6e2bd41484e2986cc3 DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost CONFIGURE_COMMAND "${_bootstrap_cmd}" PATCH_COMMAND ${_patch_command} @@ -147,4 +152,4 @@ if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") ) # Only override boost::Polygon Voronoi implementation with Vojtech's GMP hacks on 64bit platforms. list(APPEND _dep_list "dep_boost_polygon") -endif () \ No newline at end of file +endif () diff --git a/deps/Boost/common.jam b/deps/Boost/common.jam deleted file mode 100644 index 75d995aa10..0000000000 --- a/deps/Boost/common.jam +++ /dev/null @@ -1,1095 +0,0 @@ -# Copyright 2003, 2005 Dave Abrahams -# Copyright 2005, 2006 Rene Rivera -# Copyright 2005 Toon Knapen -# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) - -# Provides actions common to all toolsets, such as creating directories and -# removing files. - -import os ; -import modules ; -import utility ; -import print ; -import type ; -import feature ; -import errors ; -import path ; -import sequence ; -import toolset ; -import virtual-target ; -import numbers ; - -if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] -{ - .debug-configuration = true ; -} -if [ MATCH (--show-configuration) : [ modules.peek : ARGV ] ] -{ - .show-configuration = true ; -} - -# Configurations -# -# The following class helps to manage toolset configurations. Each configuration -# has a unique ID and one or more parameters. A typical example of a unique ID -# is a condition generated by 'common.check-init-parameters' rule. Other kinds -# of IDs can be used. Parameters may include any details about the configuration -# like 'command', 'path', etc. -# -# A toolset configuration may be in one of the following states: -# -# - registered -# Configuration has been registered (e.g. explicitly or by auto-detection -# code) but has not yet been marked as used, i.e. 'toolset.using' rule has -# not yet been called for it. -# - used -# Once called 'toolset.using' rule marks the configuration as 'used'. -# -# The main difference between the states above is that while a configuration is -# 'registered' its options can be freely changed. This is useful in particular -# for autodetection code - all detected configurations may be safely overwritten -# by user code. - -class configurations -{ - import errors ; - - rule __init__ ( ) - { - } - - # Registers a configuration. - # - # Returns 'true' if the configuration has been added and an empty value if - # it already exists. Reports an error if the configuration is 'used'. - # - rule register ( id ) - { - if $(id) in $(self.used) - { - errors.error "common: the configuration '$(id)' is in use" ; - } - - local retval ; - - if ! $(id) in $(self.all) - { - self.all += $(id) ; - - # Indicate that a new configuration has been added. - retval = true ; - } - - return $(retval) ; - } - - # Mark a configuration as 'used'. - # - # Returns 'true' if the state of the configuration has been changed to - # 'used' and an empty value if it the state has not been changed. Reports an - # error if the configuration is not known. - # - rule use ( id ) - { - if ! $(id) in $(self.all) - { - errors.error "common: the configuration '$(id)' is not known" ; - } - - local retval ; - - if ! $(id) in $(self.used) - { - self.used += $(id) ; - - # Indicate that the configuration has been marked as 'used'. - retval = true ; - } - - return $(retval) ; - } - - # Return all registered configurations. - # - rule all ( ) - { - return $(self.all) ; - } - - # Return all used configurations. - # - rule used ( ) - { - return $(self.used) ; - } - - # Returns the value of a configuration parameter. - # - rule get ( id : param ) - { - return $(self.$(param).$(id)) ; - } - - # Sets the value of a configuration parameter. - # - rule set ( id : param : value * ) - { - self.$(param).$(id) = $(value) ; - } -} - - -# The rule for checking toolset parameters. Trailing parameters should all be -# parameter name/value pairs. The rule will check that each parameter either has -# a value in each invocation or has no value in each invocation. Also, the rule -# will check that the combination of all parameter values is unique in all -# invocations. -# -# Each parameter name corresponds to a subfeature. This rule will declare a -# subfeature the first time a non-empty parameter value is passed and will -# extend it with all the values. -# -# The return value from this rule is a condition to be used for flags settings. -# -rule check-init-parameters ( toolset requirement * : * ) -{ - local sig = $(toolset) ; - local condition = $(toolset) ; - local subcondition ; - for local index in 2 3 4 5 6 7 8 9 - { - local name = $($(index)[1]) ; - local value = $($(index)[2]) ; - - if $(value)-is-not-empty - { - condition = $(condition)-$(value) ; - if $(.had-unspecified-value.$(toolset).$(name)) - { - errors.user-error - "$(toolset) initialization: parameter '$(name)'" - "inconsistent" : "no value was specified in earlier" - "initialization" : "an explicit value is specified now" ; - } - # The below logic is for intel compiler. It calls this rule with - # 'intel-linux' and 'intel-win' as toolset, so we need to get the - # base part of toolset name. We can not pass 'intel' as toolset - # because in that case it will be impossible to register versionless - # intel-linux and intel-win toolsets of a specific version. - local t = $(toolset) ; - local m = [ MATCH "([^-]*)-" : $(toolset) ] ; - if $(m) - { - t = $(m[1]) ; - } - if ! $(.had-value.$(toolset).$(name)) - { - if ! $(.declared-subfeature.$(t).$(name)) - { - feature.subfeature toolset $(t) : $(name) : : propagated ; - .declared-subfeature.$(t).$(name) = true ; - } - .had-value.$(toolset).$(name) = true ; - } - feature.extend-subfeature toolset $(t) : $(name) : $(value) ; - subcondition += $(value) ; - } - else - { - if $(.had-value.$(toolset).$(name)) - { - errors.user-error - "$(toolset) initialization: parameter '$(name)'" - "inconsistent" : "an explicit value was specified in an" - "earlier initialization" : "no value is specified now" ; - } - .had-unspecified-value.$(toolset).$(name) = true ; - } - sig = $(sig)$(value:E="")- ; - } - # We also need to consider requirements on the toolset as we can - # configure the same toolset multiple times with different options that - # are selected with the requirements. - if $(requirement) - { - sig = $(sig)$(requirement:J=,) ; - } - if $(sig) in $(.all-signatures) - { - local message = - "duplicate initialization of $(toolset) with the following parameters: " ; - for local index in 2 3 4 5 6 7 8 9 - { - local p = $($(index)) ; - if $(p) - { - message += "$(p[1]) = $(p[2]:E=)" ; - } - } - message += "previous initialization at $(.init-loc.$(sig))" ; - errors.user-error - $(message[1]) : $(message[2]) : $(message[3]) : $(message[4]) : - $(message[5]) : $(message[6]) : $(message[7]) : $(message[8]) ; - } - .all-signatures += $(sig) ; - .init-loc.$(sig) = [ errors.nearest-user-location ] ; - - # If we have a requirement, this version should only be applied under that - # condition. To accomplish this we add a toolset requirement that imposes - # the toolset subcondition, which encodes the version. - if $(requirement) - { - local r = $(toolset) $(requirement) ; - r = $(r:J=,) ; - toolset.add-requirements "$(r):$(subcondition)" ; - } - - # We add the requirements, if any, to the condition to scope the toolset - # variables and options to this specific version. - condition += $(requirement) ; - - if $(.show-configuration) - { - ECHO "notice:" $(condition) ; - } - return $(condition:J=/) ; -} - - -# A helper rule to get the command to invoke some tool. If -# 'user-provided-command' is not given, tries to find binary named 'tool' in -# PATH and in the passed 'additional-path'. Otherwise, verifies that the first -# element of 'user-provided-command' is an existing program. -# -# This rule returns the command to be used when invoking the tool. If we can not -# find the tool, a warning is issued. If 'path-last' is specified, PATH is -# checked after 'additional-paths' when searching for 'tool'. -# -rule get-invocation-command-nodefault ( toolset : tool : - user-provided-command * : additional-paths * : path-last ? ) -{ - local command ; - if ! $(user-provided-command) - { - command = [ find-tool $(tool) : $(additional-paths) : $(path-last) ] ; - if ! $(command) && $(.debug-configuration) - { - ECHO "warning:" toolset $(toolset) "initialization:" can not find tool - $(tool) ; - ECHO "warning:" initialized from [ errors.nearest-user-location ] ; - } - } - else - { - command = [ check-tool $(user-provided-command) ] ; - if ! $(command) && $(.debug-configuration) - { - ECHO "warning:" toolset $(toolset) "initialization:" ; - ECHO "warning:" can not find user-provided command - '$(user-provided-command)' ; - ECHO "warning:" initialized from [ errors.nearest-user-location ] ; - } - } - - return $(command) ; -} - - -# Same as get-invocation-command-nodefault, except that if no tool is found, -# returns either the user-provided-command, if present, or the 'tool' parameter. -# -rule get-invocation-command ( toolset : tool : user-provided-command * : - additional-paths * : path-last ? ) -{ - local result = [ get-invocation-command-nodefault $(toolset) : $(tool) : - $(user-provided-command) : $(additional-paths) : $(path-last) ] ; - - if ! $(result) - { - if $(user-provided-command) - { - result = $(user-provided-command) ; - } - else - { - result = $(tool) ; - } - } - return $(result) ; -} - - -# Given an invocation command return the absolute path to the command. This -# works even if command has no path element and was found on the PATH. -# -rule get-absolute-tool-path ( command ) -{ - if $(command:D) - { - return $(command:D) ; - } - else - { - local m = [ GLOB [ modules.peek : PATH Path path ] : $(command) - $(command).exe ] ; - return $(m[1]:D) ; - } -} - - -# Attempts to find tool (binary) named 'name' in PATH and in 'additional-paths'. -# If found in PATH, returns 'name' and if found in additional paths, returns -# absolute name. If the tool is found in several directories, returns the first -# path found. Otherwise, returns an empty string. If 'path-last' is specified, -# PATH is searched after 'additional-paths'. -# -rule find-tool ( name : additional-paths * : path-last ? ) -{ - if $(name:D) - { - return [ check-tool-aux $(name) ] ; - } - local path = [ path.programs-path ] ; - local match = [ path.glob $(path) : $(name) $(name).exe ] ; - local additional-match = [ path.glob $(additional-paths) : $(name) - $(name).exe ] ; - - local result ; - if $(path-last) - { - result = $(additional-match) ; - if ! $(result) && $(match) - { - result = $(name) ; - } - } - else - { - if $(match) - { - result = $(name) ; - } - else - { - result = $(additional-match) ; - } - } - if $(result) - { - return [ path.native $(result[1]) ] ; - } -} - -# Checks if 'command' can be found either in path or is a full name to an -# existing file. -# -local rule check-tool-aux ( command ) -{ - if $(command:D) - { - if [ path.exists $(command) ] - # Both NT and Cygwin will run .exe files by their unqualified names. - || ( [ os.on-windows ] && [ path.exists $(command).exe ] ) - # Only NT will run .bat & .cmd files by their unqualified names. - || ( ( [ os.name ] = NT ) && ( [ path.exists $(command).bat ] || - [ path.exists $(command).cmd ] ) ) - { - return $(command) ; - } - } - else - { - if [ GLOB [ modules.peek : PATH Path path ] : $(command) ] - { - return $(command) ; - } - } -} - - -# Checks that a tool can be invoked by 'command'. If command is not an absolute -# path, checks if it can be found in 'path'. If command is an absolute path, -# check that it exists. Returns 'command' if ok or empty string otherwise. -# -local rule check-tool ( xcommand + ) -{ - if [ check-tool-aux $(xcommand[1]) ] || - [ check-tool-aux $(xcommand[-1]) ] - { - return $(xcommand) ; - } -} - - -# Handle common options for toolset, specifically sets the following flag -# variables: -# - CONFIG_COMMAND to $(command) -# - OPTIONS for compile to the value of in $(options) -# - OPTIONS for compile.c to the value of in $(options) -# - OPTIONS for compile.c++ to the value of in $(options) -# - OPTIONS for compile.asm to the value of in $(options) -# - OPTIONS for compile.fortran to the value of in $(options) -# - OPTIONS for link to the value of in $(options) -# -rule handle-options ( toolset : condition * : command * : options * ) -{ - if $(.debug-configuration) - { - ECHO "notice:" will use '$(command)' for $(toolset), condition - $(condition:E=(empty)) ; - } - - # The last parameter ('unchecked') says it is OK to set flags for another - # module. - toolset.flags $(toolset) CONFIG_COMMAND $(condition) : $(command) - : unchecked ; - - toolset.flags $(toolset).compile OPTIONS $(condition) : - [ feature.get-values : $(options) ] : unchecked ; - - toolset.flags $(toolset).compile.c OPTIONS $(condition) : - [ feature.get-values : $(options) ] : unchecked ; - - toolset.flags $(toolset).compile.c++ OPTIONS $(condition) : - [ feature.get-values : $(options) ] : unchecked ; - - toolset.flags $(toolset).compile.asm OPTIONS $(condition) : - [ feature.get-values : $(options) ] : unchecked ; - - toolset.flags $(toolset).compile.fortran OPTIONS $(condition) : - [ feature.get-values : $(options) ] : unchecked ; - - toolset.flags $(toolset).link OPTIONS $(condition) : - [ feature.get-values : $(options) ] : unchecked ; -} - - -# Returns the location of the "program files" directory on a Windows platform. -# -rule get-program-files-dir ( ) -{ - local ProgramFiles = [ modules.peek : ProgramFiles ] ; - if $(ProgramFiles) - { - ProgramFiles = "$(ProgramFiles:J= )" ; - } - else - { - ProgramFiles = "c:\\Program Files" ; - } - return $(ProgramFiles) ; -} - - -if [ os.name ] = NT -{ - NULL_DEVICE = "NUL" ; - IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE) & setlocal" ; - RM = del /f /q ; - CP = copy /b ; - LN ?= $(CP) ; - # Ugly hack to convince copy to set the timestamp of the destination to the - # current time by concatenating the source with a nonexistent file. Note - # that this requires /b (binary) as the default when concatenating files is - # /a (ascii). - WINDOWS-CP-HACK = "+ this-file-does-not-exist-A698EE7806899E69" ; -} -else if [ os.name ] = VMS -{ - NULL_DEVICE = "NL:" ; - PIPE = PIPE ; - IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE)" ; - RM = DELETE /NOCONF ; - CP = COPY /OVERWRITE ; - LN = $(CP) ; -} -else -{ - NULL_DEVICE = "/dev/null" ; - IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE)" ; - RM = rm -f ; - CP = cp ; - LN = ln ; -} - -NULL_OUT = ">$(NULL_DEVICE)" ; - -rule null-device ( ) -{ - return $(NULL_DEVICE) ; -} - - -rule rm-command ( ) -{ - return $(RM) ; -} - - -rule copy-command ( ) -{ - return $(CP) ; -} - - -if "\n" = "n" -{ - # Escape characters not supported so use ugly hacks. Will not work on Cygwin - # - see below. - nl = " -" ; - q = "" ; -} -else -{ - nl = "\n" ; - q = "\"" ; -} - - -rule newline-char ( ) -{ - return $(nl) ; -} - - -# Returns the command needed to set an environment variable on the current -# platform. The variable setting persists through all following commands and is -# visible in the environment seen by subsequently executed commands. In other -# words, on Unix systems, the variable is exported, which is consistent with the -# only possible behavior on Windows systems. -# -rule variable-setting-command ( variable : value ) -{ - if [ os.name ] = NT - { - return "set $(variable)=$(value)$(nl)" ; - } - else if [ os.name ] = VMS - { - return "$(variable) == $(q)$(value)$(q)$(nl)" ; - } - else - { - # If we do not have escape character support in bjam, the cod below - # blows up on CYGWIN, since the $(nl) variable holds a Windows new-line - # \r\n sequence that messes up the executed export command which then - # reports that the passed variable name is incorrect. - # But we have a check for cygwin in kernel/bootstrap.jam already. - return "$(variable)=$(q)$(value)$(q)$(nl)export $(variable)$(nl)" ; - } -} - - -# Returns a command to sets a named shell path variable to the given NATIVE -# paths on the current platform. -# -rule path-variable-setting-command ( variable : paths * ) -{ - local sep = [ os.path-separator ] ; - return [ variable-setting-command $(variable) : $(paths:J=$(sep)) ] ; -} - - -# Returns a command that prepends the given paths to the named path variable on -# the current platform. -# -rule prepend-path-variable-command ( variable : paths * ) -{ - return [ path-variable-setting-command $(variable) - : $(paths) [ os.expand-variable $(variable) ] ] ; -} - - -# Return a command which can create a file. If 'r' is result of invocation, then -# 'r foobar' will create foobar with unspecified content. What happens if file -# already exists is unspecified. -# -rule file-creation-command ( ) -{ - if [ os.name ] = NT - { - # A few alternative implementations on Windows: - # - # 'type NUL >> ' - # That would construct an empty file instead of a file containing - # a space and an end-of-line marker but it would also not change - # the target's timestamp in case the file already exists. - # - # 'type NUL > ' - # That would construct an empty file instead of a file containing - # a space and an end-of-line marker but it would also destroy an - # already existing file by overwriting it with an empty one. - # - # I guess the best solution would be to allow Boost Jam to define - # built-in functions such as 'create a file', 'touch a file' or 'copy a - # file' which could be used from inside action code. That would allow - # completely portable operations without this kind of kludge. - # (22.02.2009.) (Jurko) - return "echo. > " ; - } - else if [ os.name ] = VMS - { - return "APPEND /NEW NL: " ; - } - else - { - return "touch " ; - } -} - - -# Returns a command that may be used for 'touching' files. It is not a real -# 'touch' command on NT because it adds an empty line at the end of file but it -# works with source files. -# -rule file-touch-command ( ) -{ - if [ os.name ] = NT - { - return "echo. >> " ; - } - else if [ os.name ] = VMS - { - return "APPEND /NEW NL: " ; - } - else - { - return "touch " ; - } -} - - -rule MkDir -{ - # If dir exists, do not update it. Do this even for $(DOT). - NOUPDATE $(<) ; - - if $(<) != $(DOT) && ! $($(<)-mkdir) - { - # Cheesy gate to prevent multiple invocations on same dir. - $(<)-mkdir = true ; - - # Schedule the mkdir build action. - common.mkdir $(<) ; - - # Prepare a Jam 'dirs' target that can be used to make the build only - # construct all the target directories. - DEPENDS dirs : $(<) ; - - # Recursively create parent directories. $(<:P) = $(<)'s parent & we - # recurse until root. - - local s = $(<:P) ; - if [ os.name ] = NT - { - switch $(s) - { - case "*:" : s = ; - case "*:\\" : s = ; - } - } - - if $(s) - { - if $(s) != $(<) - { - DEPENDS $(<) : $(s) ; - MkDir $(s) ; - } - else - { - NOTFILE $(s) ; - } - } - } -} - - -#actions MkDir1 -#{ -# mkdir "$(<)" -#} - -# The following quick-fix actions should be replaced using the original MkDir1 -# action once Boost Jam gets updated to correctly detect different paths leading -# up to the same filesystem target and triggers their build action only once. -# (todo) (04.07.2008.) (Jurko) - -if [ os.name ] = NT -{ - actions quietly mkdir - { - if not exist "$(<)\\" mkdir "$(<)" - } -} -else -{ - actions quietly mkdir - { - mkdir -p "$(<)" - } -} - - -actions piecemeal together existing Clean -{ - $(RM) "$(>)" -} - - -rule copy -{ -} - - -actions copy -{ - $(CP) "$(>)" $(WINDOWS-CP-HACK) "$(<)" -} - - -rule RmTemps -{ -} - - -actions quietly updated piecemeal together RmTemps -{ - $(RM) "$(>)" $(IGNORE) -} - - -actions hard-link -{ - $(RM) "$(<)" 2$(NULL_OUT) $(NULL_OUT) - $(LN) "$(>)" "$(<)" $(NULL_OUT) -} - - -if [ os.name ] = VMS -{ - actions mkdir - { - IF F$PARSE("$(<:W)") .EQS. "" THEN CREATE /DIR $(<:W) - } - - actions piecemeal together existing Clean - { - $(RM) $(>:WJ=;*,);* - } - - actions copy - { - $(CP) $(>:WJ=,) $(<:W) - } - - actions quietly updated piecemeal together RmTemps - { - $(PIPE) $(RM) $(>:WJ=;*,);* $(IGNORE) - } - - actions hard-link - { - $(PIPE) $(RM) $(>[1]:W);* $(IGNORE) - $(PIPE) $(LN) $(>[1]:W) $(<:W) $(NULL_OUT) - } -} - -# Given a target, as given to a custom tag rule, returns a string formatted -# according to the passed format. Format is a list of properties that is -# represented in the result. For each element of format the corresponding target -# information is obtained and added to the result string. For all, but the -# literal, the format value is taken as the as string to prepend to the output -# to join the item to the rest of the result. If not given "-" is used as a -# joiner. -# -# The format options can be: -# -# [joiner] -# :: The basename of the target name. -# [joiner] -# :: The abbreviated toolset tag being used to build the target. -# [joiner] -# :: Indication of a multi-threaded build. -# [joiner] -# :: Collective tag of the build runtime. -# [joiner] -# :: Short version tag taken from the given "version-feature" in the -# build properties. Or if not present, the literal value as the -# version number. -# [joiner] -# :: Direct lookup of the given property-name value in the build -# properties. /property-name/ is a regular expression. E.g. -# will match every toolset. -# /otherwise/ -# :: The literal value of the format argument. -# -# For example this format: -# -# boost_ -# -# Might return: -# -# boost_thread-vc80-mt-gd-1_33.dll, or -# boost_regex-vc80-gd-1_33.dll -# -# The returned name also has the target type specific prefix and suffix which -# puts it in a ready form to use as the value from a custom tag rule. -# -rule format-name ( format * : name : type ? : property-set ) -{ - local result = "" ; - for local f in $(format) - { - switch $(f:G) - { - case : - result += $(name:B) ; - - case : - result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) : - $(property-set) ] ] ; - - case : - result += [ join-tag $(f:G=) : [ threading-tag $(name) : $(type) - : $(property-set) ] ] ; - - case : - result += [ join-tag $(f:G=) : [ runtime-tag $(name) : $(type) : - $(property-set) ] ] ; - - case : - result += [ join-tag $(f:G=) : [ qt-tag $(name) : $(type) : - $(property-set) ] ] ; - - case : - result += [ join-tag $(f:G=) : [ address-model-tag $(name) : - $(type) : $(property-set) ] ] ; - - case : - result += [ join-tag $(f:G=) : [ arch-and-model-tag $(name) : - $(type) : $(property-set) ] ] ; - - case : - local key = [ MATCH : $(f:G) ] ; - local version = [ $(property-set).get <$(key)> ] ; - version ?= $(key) ; - version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ] ; - result += [ join-tag $(f:G=) : $(version[1])_$(version[2]) ] ; - - case : - local key = [ MATCH : $(f:G) ] ; - local p0 = [ MATCH <($(key))> : [ $(property-set).raw ] ] ; - if $(p0) - { - local p = [ $(property-set).get <$(p0)> ] ; - if $(p) - { - result += [ join-tag $(f:G=) : $(p) ] ; - } - } - - case * : - result += $(f:G=) ; - } - } - return [ virtual-target.add-prefix-and-suffix $(result:J=) : $(type) : - $(property-set) ] ; -} - - -local rule join-tag ( joiner ? : tag ? ) -{ - if ! $(joiner) { joiner = - ; } - return $(joiner)$(tag) ; -} - - -local rule toolset-tag ( name : type ? : property-set ) -{ - local tag = ; - - local properties = [ $(property-set).raw ] ; - switch [ $(property-set).get ] - { - case borland* : tag += bcb ; - case clang* : - { - switch [ $(property-set).get ] - { - case darwin : tag += clang-darwin ; - case linux : tag += clang ; - case win : tag += clangw ; - } - } - case como* : tag += como ; - case cw : tag += cw ; - case darwin* : tag += xgcc ; - case edg* : tag += edg ; - case gcc* : - { - switch [ $(property-set).get ] - { - case *windows* : tag += mgw ; - case * : tag += gcc ; - } - } - case intel : - if [ $(property-set).get ] = win - { - tag += iw ; - } - else - { - tag += il ; - } - case kcc* : tag += kcc ; - case kylix* : tag += bck ; - #case metrowerks* : tag += cw ; - #case mingw* : tag += mgw ; - case mipspro* : tag += mp ; - case msvc* : tag += vc ; - case qcc* : tag += qcc ; - case sun* : tag += sw ; - case tru64cxx* : tag += tru ; - case vacpp* : tag += xlc ; - } - local version = [ MATCH "([0123456789]+)[.]?([0123456789]*)" - : $(properties) ] ; - # For historical reasons, vc6.0 and vc7.0 use different naming. - if $(tag) = vc - { - if $(version[1]) = 6 - { - # Cancel minor version. - version = 6 ; - } - else if $(version[1]) = 7 && $(version[2]) = 0 - { - version = 7 ; - } - } - - # From GCC 5, versioning changes and minor becomes patch - if ( $(tag) = gcc || $(tag) = mgw ) && [ numbers.less 4 $(version[1]) ] - { - version = $(version[1]) ; - } - - # Ditto, from Clang 4 - if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ] - { - version = $(version[1]) ; - } - - # On intel, version is not added, because it does not matter and it is the - # version of vc used as backend that matters. Ideally, we should encode the - # backend version but that would break compatibility with V1. - if $(tag) = iw - { - version = ; - } - - # On borland, version is not added for compatibility with V1. - if $(tag) = bcb - { - version = ; - } - - tag += $(version) ; - - return $(tag:J=) ; -} - - -local rule threading-tag ( name : type ? : property-set ) -{ - if multi in [ $(property-set).raw ] - { - return mt ; - } -} - - -local rule runtime-tag ( name : type ? : property-set ) -{ - local tag = ; - - local properties = [ $(property-set).raw ] ; - if static in $(properties) { tag += s ; } - - # This is an ugly thing. In V1, there is code to automatically detect which - # properties affect a target. So, if does not affect gcc - # toolset, the tag rules will not even see . Similar - # functionality in V2 is not implemented yet, so we just check for toolsets - # known to care about runtime debugging. - if ( msvc in $(properties) ) || - ( stlport in $(properties) ) || - ( win in $(properties) ) - { - if on in $(properties) { tag += g ; } - } - - if on in $(properties) { tag += y ; } - if debug in $(properties) { tag += d ; } - if stlport in $(properties) { tag += p ; } - if hostios in $(properties) { tag += n ; } - - return $(tag:J=) ; -} - - -# Create a tag for the Qt library version -# "4.6.0" will result in tag "qt460" -local rule qt-tag ( name : type ? : property-set ) -{ - local v = [ MATCH "([0123456789]+)[.]?([0123456789]*)[.]?([0123456789]*)" : - [ $(property-set).get ] ] ; - return qt$(v:J=) ; -} - - -# Create a tag for the address-model -# 64 will simply generate "64" -local rule address-model-tag ( name : type ? : property-set ) -{ - return [ $(property-set).get ] ; -} - -# Create a tag for the architecture and model -# x86 32 would generate "x32" -# This relies on the fact that all architectures start with -# unique letters. -local rule arch-and-model-tag ( name : type ? : property-set ) -{ - local architecture = [ $(property-set).get ] ; - local address-model = [ $(property-set).get ] ; - - local arch = [ MATCH ^(.) : $(architecture) ] ; - - return $(arch)$(address-model) ; -} - -rule __test__ ( ) -{ - import assert ; - - local save-os = [ modules.peek os : .name ] ; - - modules.poke os : .name : LINUX ; - assert.result "PATH=\"foo:bar:baz\"\nexport PATH\n" - : path-variable-setting-command PATH : foo bar baz ; - assert.result "PATH=\"foo:bar:$PATH\"\nexport PATH\n" - : prepend-path-variable-command PATH : foo bar ; - - modules.poke os : .name : NT ; - assert.result "set PATH=foo;bar;baz\n" - : path-variable-setting-command PATH : foo bar baz ; - assert.result "set PATH=foo;bar;%PATH%\n" - : prepend-path-variable-command PATH : foo bar ; - - modules.poke os : .name : $(save-os) ; -} diff --git a/deps/Boost/user-config.jam b/deps/Boost/user-config.jam index eff13db28c..6d86ef8df3 100644 --- a/deps/Boost/user-config.jam +++ b/deps/Boost/user-config.jam @@ -1 +1 @@ -using gcc : : @CMAKE_CXX_COMPILER@ ; \ No newline at end of file +using @_boost_toolset@ : : @CMAKE_CXX_COMPILER@ ; \ No newline at end of file diff --git a/deps/CURL/CURL.cmake b/deps/CURL/CURL.cmake index b369caed21..206a4bcfab 100644 --- a/deps/CURL/CURL.cmake +++ b/deps/CURL/CURL.cmake @@ -25,7 +25,8 @@ set(_curl_platform_flags ) if (WIN32) - set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON) + #set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON) + set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_OPENSSL=ON -DCURL_CA_PATH:STRING=none) elseif (APPLE) set(_curl_platform_flags diff --git a/deps/deps-windows.cmake b/deps/deps-windows.cmake index 7288cfe6fa..aba6fcab49 100644 --- a/deps/deps-windows.cmake +++ b/deps/deps-windows.cmake @@ -15,6 +15,10 @@ elseif (MSVC_VERSION LESS 1930) # 1920-1929 = VS 16.0 (v142 toolset) set(DEP_VS_VER "16") set(DEP_BOOST_TOOLSET "msvc-14.2") +elseif (MSVC_VERSION LESS 1940) +# 1930-1939 = VS 17.0 (v143 toolset) + set(DEP_VS_VER "17") + set(DEP_BOOST_TOOLSET "msvc-14.3") else () message(FATAL_ERROR "Unsupported MSVC version") endif () diff --git a/resources/i18n/de/BambuStudio.mo b/resources/i18n/de/BambuStudio.mo index 5d65f784f5..ffedd6d910 100644 Binary files a/resources/i18n/de/BambuStudio.mo and b/resources/i18n/de/BambuStudio.mo differ diff --git a/resources/i18n/en/BambuStudio.mo b/resources/i18n/en/BambuStudio.mo index f5952f13f2..03f553c6b6 100644 Binary files a/resources/i18n/en/BambuStudio.mo and b/resources/i18n/en/BambuStudio.mo differ diff --git a/resources/i18n/es/BambuStudio.mo b/resources/i18n/es/BambuStudio.mo index 741ca77c63..af888d2379 100644 Binary files a/resources/i18n/es/BambuStudio.mo and b/resources/i18n/es/BambuStudio.mo differ diff --git a/resources/i18n/fr/BambuStudio.mo b/resources/i18n/fr/BambuStudio.mo index 5067d1175c..7d9856085f 100644 Binary files a/resources/i18n/fr/BambuStudio.mo and b/resources/i18n/fr/BambuStudio.mo differ diff --git a/resources/i18n/hu/BambuStudio.mo b/resources/i18n/hu/BambuStudio.mo index 870b9b4f9f..4dce64e862 100644 Binary files a/resources/i18n/hu/BambuStudio.mo and b/resources/i18n/hu/BambuStudio.mo differ diff --git a/resources/i18n/nl/BambuStudio.mo b/resources/i18n/nl/BambuStudio.mo index 386dd88b24..b4b4d309bb 100644 Binary files a/resources/i18n/nl/BambuStudio.mo and b/resources/i18n/nl/BambuStudio.mo differ diff --git a/resources/i18n/sv/BambuStudio.mo b/resources/i18n/sv/BambuStudio.mo index b419318549..99556705d9 100644 Binary files a/resources/i18n/sv/BambuStudio.mo and b/resources/i18n/sv/BambuStudio.mo differ diff --git a/src/BaseException.cpp b/src/BaseException.cpp index 31d8684006..7d69b0e588 100644 --- a/src/BaseException.cpp +++ b/src/BaseException.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp index c93dc274c7..b26f2873d0 100644 --- a/src/hints/HintsToPot.cpp +++ b/src/hints/HintsToPot.cpp @@ -9,7 +9,7 @@ bool write_to_pot(boost::filesystem::path path, const std::vector>& data) { - boost::filesystem::ofstream file(std::move(path), std::ios_base::app); + boost::nowide::ofstream file(path.string(), std::ios_base::app); for (const auto& element : data) { //Example of .pot element diff --git a/src/libslic3r/Format/3mf.hpp b/src/libslic3r/Format/3mf.hpp index 9509b2c704..c46b4e5533 100644 --- a/src/libslic3r/Format/3mf.hpp +++ b/src/libslic3r/Format/3mf.hpp @@ -1,6 +1,6 @@ #ifndef slic3r_Format_3mf_hpp_ #define slic3r_Format_3mf_hpp_ -#include "../expat.h" +#include namespace Slic3r { // PrusaFileParser is used to check 3mf file is from Prusa diff --git a/src/libslic3r/Format/bbs_3mf.cpp b/src/libslic3r/Format/bbs_3mf.cpp index 61f854e491..69f12b32fe 100644 --- a/src/libslic3r/Format/bbs_3mf.cpp +++ b/src/libslic3r/Format/bbs_3mf.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 19ff0f8cbe..8d5aa3df83 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index 47e8c50f51..0a6918e4e6 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index 78a156c989..75d8c00528 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -2889,7 +2889,7 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::raft_and_int // Generate intermediate layers. // The first intermediate layer is the same as the 1st layer if there is no raft, // or the bottom of the first intermediate layer is aligned with the bottom of the raft contact layer. - // Intermediate layers are always printed with a normal etrusion flow (non-bridging). + // Intermediate layers are always printed with a normal extrusion flow (non-bridging). size_t idx_layer_object = 0; size_t idx_extreme_first = 0; if (! extremes.empty() && std::abs(extremes.front()->extreme_z() - m_slicing_params.raft_interface_top_z) < EPSILON) { diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index 24fb7f65c8..ce8d5ffc87 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -29,7 +29,7 @@ #define TAU (2.0 * M_PI) #define NO_INDEX (std::numeric_limits::max()) -//#define SUPPORT_TREE_DEBUG_TO_SVG +// #define SUPPORT_TREE_DEBUG_TO_SVG namespace Slic3r { @@ -1399,7 +1399,6 @@ void TreeSupport::generate_toolpaths() const size_t wall_count = object_config.tree_support_wall_count.value; const bool with_infill = object_config.support_base_pattern != smpNone && object_config.support_base_pattern != smpDefault; - auto m_support_material_flow = support_material_flow(m_object, float(m_slicing_params.layer_height)); // coconut: use same intensity settings as SupportMaterial.cpp auto m_support_material_interface_flow = support_material_interface_flow(m_object, float(m_slicing_params.layer_height)); @@ -1407,8 +1406,6 @@ void TreeSupport::generate_toolpaths() coordf_t bottom_interface_spacing = object_config.support_bottom_interface_spacing.value + m_support_material_interface_flow.spacing(); coordf_t interface_density = std::min(1., m_support_material_interface_flow.spacing() / interface_spacing); coordf_t bottom_interface_density = std::min(1., m_support_material_interface_flow.spacing() / bottom_interface_spacing); - coordf_t support_spacing = object_config.support_base_pattern_spacing.value + m_support_material_flow.spacing(); - coordf_t support_density = std::min(1., m_support_material_flow.spacing() / support_spacing); const coordf_t branch_radius = object_config.tree_support_branch_diameter.value / 2; const coordf_t branch_radius_scaled = scale_(branch_radius); @@ -1518,6 +1515,9 @@ void TreeSupport::generate_toolpaths() TreeSupportLayer* ts_layer = m_object->get_tree_support_layer(layer_id); Flow support_flow(support_extrusion_width, ts_layer->height, nozzle_diameter); + coordf_t support_spacing = object_config.support_base_pattern_spacing.value + support_flow.spacing(); + coordf_t support_density = std::min(1., support_flow.spacing() / support_spacing); + ts_layer->support_fills.no_sort = false; for (auto& area_group : ts_layer->area_groups) { @@ -1569,12 +1569,11 @@ void TreeSupport::generate_toolpaths() } else { // base_areas - filler_support->spacing = m_support_material_flow.spacing(); - Flow flow = (layer_id == 0 && m_raft_layers == 0) ? m_object->print()->brim_flow() : - (m_support_params.base_fill_pattern == ipRectilinear && (layer_id % num_layers_to_change_infill_direction == 0) ? support_transition_flow(m_object) : support_flow); - if (area_group.dist_to_top < 10 / layer_height) { - // extra 2 walls for the top tips - make_perimeter_and_inner_brim(ts_layer->support_fills.entities, *m_object->print(), poly, wall_count + 2, flow, false); + filler_support->spacing = support_flow.spacing(); + Flow flow = (layer_id == 0 && m_raft_layers == 0) ? m_object->print()->brim_flow() : support_flow; + if (area_group.dist_to_top < 10 / layer_height && !with_infill) { + // at least 2 walls for the top tips + make_perimeter_and_inner_brim(ts_layer->support_fills.entities, *m_object->print(), poly, std::max(wall_count, size_t(2)), flow, false); } else { if (with_infill && layer_id > 0 && m_support_params.base_fill_pattern != ipLightning) { filler_support->angle = Geometry::deg2rad(object_config.support_angle.value); @@ -1893,7 +1892,7 @@ void TreeSupport::generate_support_areas() profiler.stage_finish(STAGE_DROP_DOWN_NODES); // Adjust support layer heights - adjust_layer_heights(contact_nodes); + // adjust_layer_heights(contact_nodes); //Generate support areas. profiler.stage_start(STAGE_DRAW_CIRCLES); @@ -2023,20 +2022,24 @@ void TreeSupport::draw_circles(const std::vector>& contact_no { if (print->canceled()) break; + const std::vector& curr_layer_nodes = contact_nodes[layer_nr]; TreeSupportLayer* ts_layer = m_object->get_tree_support_layer(layer_nr + m_raft_layers); assert(ts_layer != nullptr); // skip if current layer has no points. This fixes potential crash in get_collision (see jira BBL001-355) - if (curr_layer_nodes.empty()) + if (curr_layer_nodes.empty()) { + ts_layer->print_z = 0.0; + ts_layer->height = 0.0; continue; + } Node* first_node = curr_layer_nodes.front(); ts_layer->print_z = first_node->print_z; ts_layer->height = first_node->height; - - if (ts_layer->height < EPSILON) + if (ts_layer->height < EPSILON) { continue; + } ExPolygons& base_areas = ts_layer->base_areas; ExPolygons& roof_areas = ts_layer->roof_areas; @@ -2057,16 +2060,16 @@ void TreeSupport::draw_circles(const std::vector>& contact_no const Node& node = *p_node; ExPolygon area; - // 直接从overhang多边形生成,如果�? - // 1) 是混合支撑里的普通部分, - // 2) 启用了顶部接触层�? - // 3) 是顶部空�? + // Generate directly from overhang polygon if one of the following is true: + // 1) node is a normal part of hybrid support + // 2) top interface layers are enabled + // 3) node is virtual if (node.type == ePolygon || (top_interface_layers>0 &&node.support_roof_layers_below > 0) || node.distance_to_top<0) { if (node.overhang->contour.size() > 100 || node.overhang->holes.size()>1) area = *node.overhang; else { auto tmp = offset_ex({ *node.overhang }, scale_(m_ts_data->m_xy_distance)); - if(!tmp.empty()) // 对于有缺陷的模型,overhang膨胀以后可能是空的! + if(!tmp.empty()) // can be empty for non-manifold models area = tmp[0]; } } @@ -2396,7 +2399,22 @@ void TreeSupport::draw_circles(const std::vector>& contact_no char fname[10]; sprintf(fname, "%d_%.2f", layer_nr, ts_layer->print_z); draw_contours_and_nodes_to_svg(-1, base_areas, roof_areas, roof_1st_layer, {}, {}, get_svg_filename(fname, "circles"), { "base", "roof", "roof1st" }); } -#endif + + // export layer & print_z log + std::ofstream draw_circles_layer_out; + draw_circles_layer_out.open("./SVG/layer_heights_draw_circles.txt"); + if (draw_circles_layer_out.is_open()) { + for (int layer_nr = m_object->layer_count() - 1; layer_nr > 0; layer_nr--) { + TreeSupportLayer* ts_layer = m_object->get_tree_support_layer(layer_nr + m_raft_layers); + ExPolygons& base_areas = ts_layer->base_areas; + ExPolygons& roof_areas = ts_layer->roof_areas; + ExPolygons& roof_1st_layer = ts_layer->roof_1st_layer; + ExPolygons& floor_areas = ts_layer->floor_areas; + if (base_areas.empty() && roof_areas.empty() && roof_1st_layer.empty()) continue; + draw_circles_layer_out << layer_nr << " " << ts_layer->print_z << " " << ts_layer->height << std::endl; + } + } +#endif // SUPPORT_TREE_DEBUG_TO_SVG TreeSupportLayerPtrs& ts_layers = m_object->tree_support_layers(); auto iter = std::remove_if(ts_layers.begin(), ts_layers.end(), [](TreeSupportLayer* ts_layer) { return ts_layer->height < EPSILON; }); @@ -2410,7 +2428,7 @@ void TreeSupport::draw_circles(const std::vector>& contact_no void TreeSupport::drop_nodes(std::vector>& contact_nodes) { const PrintObjectConfig &config = m_object->config(); - //Use Minimum Spanning Tree to connect the points on each layer and move them while dropping them down. + // Use Minimum Spanning Tree to connect the points on each layer and move them while dropping them down. const coordf_t layer_height = config.layer_height.value; const double angle = config.tree_support_branch_angle.value * M_PI / 180.; const int wall_count = std::max(1, config.tree_support_wall_count.value); @@ -2424,6 +2442,7 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) const bool support_on_buildplate_only = config.support_on_build_plate_only.value; const size_t bottom_interface_layers = config.support_interface_bottom_layers.value; const size_t top_interface_layers = config.support_interface_top_layers.value; + std::vector> layer_heights = plan_layer_heights(contact_nodes); std::unordered_set to_free_node_set; m_spanning_trees.resize(contact_nodes.size()); @@ -2467,16 +2486,22 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) BOOST_LOG_TRIVIAL(debug) << "before m_avoidance_cache.size()=" << m_ts_data->m_avoidance_cache.size(); } - for (size_t layer_nr = contact_nodes.size() - 1; layer_nr > 0; layer_nr--) //Skip layer 0, since we can't drop down the vertices there. + for (size_t layer_nr = contact_nodes.size() - 1; layer_nr > 0; layer_nr--) // Skip layer 0, since we can't drop down the vertices there. { if (m_object->print()->canceled()) break; auto& layer_contact_nodes = contact_nodes[layer_nr]; - std::deque> unsupported_branch_leaves; // All nodes that are leaves on this layer that would result in unsupported ('mid-air') branches. - const Layer* ts_layer = m_object->get_tree_support_layer(layer_nr); if (layer_contact_nodes.empty()) continue; + + int jump_nr = 1; + while (layer_heights[layer_nr - jump_nr].second < EPSILON) + jump_nr++; + + std::deque> unsupported_branch_leaves; // All nodes that are leaves on this layer that would result in unsupported ('mid-air') branches. + const Layer* ts_layer = m_object->get_tree_support_layer(layer_nr); + m_object->print()->set_status(60, (boost::format(_L("Support: propagate branches at layer %d")) % layer_nr).str()); Polygons layer_contours = std::move(m_ts_data->get_contours_with_holes(layer_nr)); @@ -2512,8 +2537,8 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) if (node.distance_to_top < 0) { // virtual node do not merge or move Node* next_node = new Node(p_node->position, p_node->distance_to_top + 1, p_node->skin_direction, p_node->support_roof_layers_below - 1, p_node->to_buildplate, p_node, - m_object->get_layer(layer_nr - 1)->print_z, m_object->get_layer(layer_nr - 1)->height); - contact_nodes[layer_nr - 1].emplace_back(next_node); + layer_heights[layer_nr - jump_nr].first, layer_heights[layer_nr - jump_nr].second); + contact_nodes[layer_nr - jump_nr].emplace_back(next_node); continue; } if (support_on_buildplate_only && !node.to_buildplate) //Can't rest on model and unable to reach the build plate. Then we must drop the node and leave parts unsupported. @@ -2530,8 +2555,8 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) // polygon node do not merge or move const bool to_buildplate = !is_inside_ex(m_ts_data->m_layer_outlines[layer_nr], p_node->position); Node *next_node = new Node(p_node->position, p_node->distance_to_top + 1, p_node->skin_direction, p_node->support_roof_layers_below - 1, to_buildplate, p_node, - m_object->get_layer(layer_nr - 1)->print_z, m_object->get_layer(layer_nr - 1)->height); - contact_nodes[layer_nr - 1].emplace_back(next_node); + layer_heights[layer_nr - jump_nr].first, layer_heights[layer_nr - jump_nr].second); + contact_nodes[layer_nr - jump_nr].emplace_back(next_node); continue; } /* Find which part this node is located in and group the nodes in @@ -2608,7 +2633,7 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) const coordf_t branch_radius_node = calc_branch_radius(branch_radius, node.distance_to_top, tip_layers, diameter_angle_scale_factor); - auto avoid_layer = m_ts_data->get_avoidance(branch_radius_node, layer_nr - 1); + auto avoid_layer = m_ts_data->get_avoidance(branch_radius_node, layer_nr - jump_nr); if (group_index == 0) { //Avoid collisions. @@ -2620,11 +2645,11 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) size_t new_distance_to_top = std::max(node.distance_to_top, neighbour->distance_to_top) + 1; size_t new_support_roof_layers_below = std::max(node.support_roof_layers_below, neighbour->support_roof_layers_below) - 1; - const bool to_buildplate = !is_inside_ex(m_ts_data->get_avoidance(0, layer_nr - 1), next_position); + const bool to_buildplate = !is_inside_ex(m_ts_data->get_avoidance(0, layer_nr - jump_nr), next_position); Node * next_node = new Node(next_position, new_distance_to_top, node.skin_direction, new_support_roof_layers_below, to_buildplate, p_node, - m_object->get_layer(layer_nr - 1)->print_z, p_node->height); + layer_heights[layer_nr - jump_nr].first, layer_heights[layer_nr - jump_nr].second); next_node->movement = next_position - node.position; - contact_nodes[layer_nr - 1].push_back(next_node); + contact_nodes[layer_nr - jump_nr].push_back(next_node); // Make sure the next pass doesn't drop down either of these (since that already happened). node.merged_neighbours.push_front(neighbour); @@ -2708,8 +2733,8 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) Point direction = neighbour - node.position; Node *neighbour_node = nodes_per_part[group_index][neighbour]; - coordf_t branch_bottom_radius = calc_branch_radius(branch_radius, node.distance_to_top + layer_nr, tip_layers, diameter_angle_scale_factor); - coordf_t neighbour_bottom_radius = calc_branch_radius(branch_radius, neighbour_node->distance_to_top + layer_nr, tip_layers, diameter_angle_scale_factor); + coordf_t branch_bottom_radius = calc_branch_radius(branch_radius, node.distance_to_top + 1, tip_layers, diameter_angle_scale_factor); + coordf_t neighbour_bottom_radius = calc_branch_radius(branch_radius, neighbour_node->distance_to_top + 1, tip_layers, diameter_angle_scale_factor); const coordf_t min_overlap = branch_radius; double max_converge_distance = tan_angle * (ts_layer->print_z - DO_NOT_MOVER_UNDER_MM) + branch_bottom_radius + neighbour_bottom_radius - min_overlap; if (vsize2_with_unscale(direction) > max_converge_distance * max_converge_distance) @@ -2740,7 +2765,7 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) branch_radius_temp = branch_radius_node; } #endif - auto avoid_layer = m_ts_data->get_avoidance(branch_radius_node, layer_nr - 1); + auto avoid_layer = m_ts_data->get_avoidance(branch_radius_node, layer_nr - jump_nr); Point to_outside = projection_onto_ex(avoid_layer, node.position); Point movement = to_outside - node.position; @@ -2785,15 +2810,15 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) const bool to_buildplate = !is_inside_ex(m_ts_data->m_layer_outlines[layer_nr], next_layer_vertex);// !is_inside_ex(m_ts_data->get_avoidance(m_ts_data->m_xy_distance, layer_nr - 1), next_layer_vertex); Node * next_node = new Node(next_layer_vertex, node.distance_to_top + 1, node.skin_direction, node.support_roof_layers_below - 1, to_buildplate, p_node, - m_object->get_layer(layer_nr - 1)->print_z, m_object->get_layer(layer_nr-1)->height); + layer_heights[layer_nr - jump_nr].first, layer_heights[layer_nr - jump_nr].second); next_node->movement = movement; - contact_nodes[layer_nr - 1].push_back(next_node); + contact_nodes[layer_nr - jump_nr].push_back(next_node); } } #ifdef SUPPORT_TREE_DEBUG_TO_SVG draw_contours_and_nodes_to_svg(layer_nr, m_ts_data->get_avoidance(0, layer_nr), m_ts_data->get_avoidance(branch_radius_temp, layer_nr), m_ts_data->m_layer_outlines_below[layer_nr], - contact_nodes[layer_nr], contact_nodes[layer_nr - 1], "contact_points", { "overhang","avoid","outline" }, { "blue","red","yellow" }); + contact_nodes[layer_nr], contact_nodes[layer_nr - jump_nr], "contact_points", { "overhang","avoid","outline" }, { "blue","red","yellow" }); #endif // Prune all branches that couldn't find support on either the model or the buildplate (resulting in 'mid-air' branches). @@ -2840,6 +2865,27 @@ void TreeSupport::drop_nodes(std::vector>& contact_nodes) delete node; } to_free_node_set.clear(); + + // Merge empty contact_nodes layers + + +#ifdef SUPPORT_TREE_DEBUG_TO_SVG + // export all print_z and layer height into .txt + std::ofstream layer_heights_out; + layer_heights_out.open("./SVG/layer_heights_drop_nodes.txt"); + //layer_heights_out.open("layer_heights_out.txt"); + if (layer_heights_out.is_open()) { + for (int i = 0; i < layer_heights.size(); i++) { + if (contact_nodes[i].empty()) { + layer_heights_out << 0 << " " << 0 << std::endl; + } + else { + layer_heights_out << contact_nodes[i][0]->print_z << " " << contact_nodes[i][0]->height << std::endl; + } + } + layer_heights_out.close(); + } +#endif } void TreeSupport::adjust_layer_heights(std::vector>& contact_nodes) @@ -2849,6 +2895,7 @@ void TreeSupport::adjust_layer_heights(std::vector>& contact_ const PrintConfig& print_config = m_object->print()->config(); const PrintObjectConfig& config = m_object->config(); + if (!print_config.independent_support_layer_height) { for (int layer_nr = 0; layer_nr < contact_nodes.size(); layer_nr++) { std::vector& curr_layer_nodes = contact_nodes[layer_nr]; @@ -2932,6 +2979,108 @@ void TreeSupport::adjust_layer_heights(std::vector>& contact_ } } +std::vector> TreeSupport::plan_layer_heights(std::vector>& contact_nodes) +{ + const PrintObjectConfig& config = m_object->config(); + const coordf_t max_layer_height = m_slicing_params.max_layer_height; + const coordf_t layer_height = config.layer_height.value; + coordf_t z_distance_top = m_slicing_params.gap_support_object; + // BBS: add extra distance if thick bridge is enabled + // Note: normal support uses print_z, but tree support uses integer layers, so we need to subtract layer_height + if (!m_slicing_params.soluble_interface && m_object_config->thick_bridges) { + z_distance_top += m_object->layers()[0]->regions()[0]->region().bridging_height_avg(m_object->print()->config()) - layer_height; + } + const size_t support_roof_layers = config.support_interface_top_layers.value; + const int z_distance_top_layers = round_up_divide(scale_(z_distance_top), scale_(layer_height)) + 1; + std::vector> layer_heights(contact_nodes.size(), std::pair(0.0, 0.0)); + std::vector bounds; + + if (layer_height == max_layer_height) + return std::vector>(); + + bounds.push_back(0); + // Keep first layer still + layer_heights[0].first = m_object->get_layer(0)->print_z; + layer_heights[0].second = m_object->get_layer(0)->height; + // Collect top contact layers + for (int layer_nr = 1; layer_nr < contact_nodes.size(); layer_nr++) + { + if (!contact_nodes[layer_nr].empty()) + for (int i = 0; i < support_roof_layers + z_distance_top_layers + 1; i++) { + if (layer_nr - i > 0) { + bounds.push_back(layer_nr - i); + layer_heights[layer_nr - i].first = m_object->get_layer(layer_nr - i)->print_z; + layer_heights[layer_nr - i].second = m_object->get_layer(layer_nr - i)->height; + } + else { + break; + } + + } + } + std::set s(bounds.begin(), bounds.end()); + bounds.assign(s.begin(), s.end()); + + for (size_t idx_extreme = 0; idx_extreme < bounds.size(); idx_extreme++) { + int extr2_layer_nr = bounds[idx_extreme]; + coordf_t extr2z = m_object->get_layer(extr2_layer_nr)->bottom_z(); + int extr1_layer_nr = idx_extreme == 0 ? -1 : bounds[idx_extreme - 1]; + coordf_t extr1z = idx_extreme == 0 ? 0.f : m_object->get_layer(extr1_layer_nr)->print_z; + coordf_t dist = extr2z - extr1z; + + // Insert intermediate layers. + size_t n_layers_extra = size_t(ceil(dist / (m_slicing_params.max_suport_layer_height + EPSILON))); + int actual_internel_layers = extr2_layer_nr - extr1_layer_nr - 1; + int extr_layers_left = extr2_layer_nr - extr1_layer_nr - n_layers_extra - 1; + if (n_layers_extra < 1) + continue; + + coordf_t step = dist / coordf_t(n_layers_extra); + coordf_t print_z = extr1z + step; + assert(step >= layer_height - EPSILON); + for (int layer_nr = extr1_layer_nr + 1; layer_nr < extr2_layer_nr; layer_nr++) { + // if (curr_layer_nodes.empty()) continue; + if (std::abs(print_z - m_object->get_layer(layer_nr)->print_z) < step / 2 + EPSILON || extr_layers_left < 1) { + layer_heights[layer_nr].first = print_z; + layer_heights[layer_nr].second = step; + print_z += step; + } + else { + // can't clear curr_layer_nodes, or the model will have empty layers + layer_heights[layer_nr].first = 0.0; + layer_heights[layer_nr].second = 0.0; + extr_layers_left--; + } + } + } + +#ifdef SUPPORT_TREE_DEBUG_TO_SVG + // export all print_z and layer height into .txt + std::ofstream layer_heights_out; + layer_heights_out.open("./SVG/layer_heights_out.txt"); + //layer_heights_out.open("layer_heights_out.txt"); + if (layer_heights_out.is_open()) { + for (int i = 0; i < layer_heights.size(); i++) { + layer_heights_out << layer_heights[i].first << " " << layer_heights[i].second << std::endl; + } + layer_heights_out.close(); + } + // check bounds + if (1) + { + std::ofstream bounds_out; + bounds_out.open("bounds.txt"); + if (bounds_out.is_open()) { + for (int i = 0; i < bounds.size(); i++) { + bounds_out << bounds[i] << std::endl; + } + } + } +#endif + + return layer_heights; +} + void TreeSupport::generate_contact_points(std::vector>& contact_nodes) { const PrintObjectConfig &config = m_object->config(); @@ -3118,6 +3267,16 @@ void TreeSupport::generate_contact_points(std::vector& nodes_layer, Node* p_node) diff --git a/src/libslic3r/TreeSupport.hpp b/src/libslic3r/TreeSupport.hpp index b5f25a507b..26abb74c52 100644 --- a/src/libslic3r/TreeSupport.hpp +++ b/src/libslic3r/TreeSupport.hpp @@ -170,7 +170,7 @@ public: struct LineHash { size_t operator()(const Line& line) const { return (std::hash()(line.a(0)) ^ std::hash()(line.b(1))) * 102 + - (std::hash()(line.a(0)) ^ std::hash()(line.b(1))) * 10222; + (std::hash()(line.a(1)) ^ std::hash()(line.b(0))) * 10222; } }; @@ -401,6 +401,12 @@ private: void adjust_layer_heights(std::vector>& contact_nodes); + /*! BBS: MusangKing: maximum layer height + * \brief Optimize the generation of tree support by pre-planning the layer_heights + * + */ + + std::vector> plan_layer_heights(std::vector>& contact_nodes); /*! * \brief Creates points where support contacts the model. * diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index 5951b2217c..b4e6e42602 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -1405,7 +1405,7 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out) unsigned char digest[16]; MD5_CTX ctx; MD5_Init(&ctx); - boost::filesystem::ifstream ifs(filename, std::ios::binary); + boost::nowide::ifstream ifs(filename, std::ios::binary); std::string buf(64 * 1024, 0); const std::size_t & size = boost::filesystem::file_size(filename); std::size_t left_size = size; diff --git a/src/platform/unix/BuildLinuxImage.sh.in b/src/platform/unix/BuildLinuxImage.sh.in index 13921dd400..d23384e50f 100644 --- a/src/platform/unix/BuildLinuxImage.sh.in +++ b/src/platform/unix/BuildLinuxImage.sh.in @@ -41,11 +41,7 @@ export LD_LIBRARY_PATH="\$DIR/bin" # FIXME: BambuStudio segfault workarounds # 1) BambuStudio will segfault on systems where locale info is not as expected (i.e. Holo-ISO arch-based distro) -# 2) BambuStudio will segfault with a boost logging error if ~/.config/BambuStudio doesn't exist on first run export LC_ALL=C -# FIXME: BambuStudio doesn't respect dark mode; use GTK_THEME workaround from sigxcpu76 │ -export GTK_THEME=Adwaita:light -mkdir -p \${HOME}/.config/BambuStudio/ 2> /dev/null exec "\$DIR/bin/@SLIC3R_APP_CMD@" "\$@" EOF diff --git a/src/slic3r/GUI/AMSMaterialsSetting.cpp b/src/slic3r/GUI/AMSMaterialsSetting.cpp index f509a2681a..1dc4aef593 100644 --- a/src/slic3r/GUI/AMSMaterialsSetting.cpp +++ b/src/slic3r/GUI/AMSMaterialsSetting.cpp @@ -64,7 +64,7 @@ void AMSMaterialsSetting::create() m_clrData->SetChooseFull(true); m_clrData->SetChooseAlpha(false); - m_clr_picker = new Button(this, "", ""); + m_clr_picker = new Button(this, wxEmptyString, wxEmptyString, wxBU_AUTODRAW); m_clr_picker->SetCanFocus(false); m_clr_picker->SetSize(FromDIP(50), FromDIP(25)); m_clr_picker->SetMinSize(wxSize(FromDIP(50), FromDIP(25))); @@ -364,7 +364,12 @@ void AMSMaterialsSetting::on_clr_picker(wxCommandEvent & event) show_flag = true; if (clr_dialog->ShowModal() == wxID_OK) { m_clrData = &(clr_dialog->GetColourData()); - m_clr_picker->SetBackgroundColor(m_clrData->GetColour()); + m_clr_picker->SetBackgroundColor(wxColour( + m_clrData->GetColour().Red(), + m_clrData->GetColour().Green(), + m_clrData->GetColour().Blue(), + 254 + )); } } @@ -374,13 +379,19 @@ bool AMSMaterialsSetting::Show(bool show) m_button_confirm->SetMinSize(AMS_MATERIALS_SETTING_BUTTON_SIZE); m_input_nozzle_max->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(20))); m_input_nozzle_min->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(20))); + m_clr_picker->SetBackgroundColour(m_clr_picker->GetParent()->GetBackgroundColour()); } return DPIDialog::Show(show); } void AMSMaterialsSetting::Popup(wxString filament, wxString sn, wxString temp_min, wxString temp_max) { - m_clr_picker->SetBackgroundColor(m_clrData->GetColour()); + m_clr_picker->SetBackgroundColor(wxColour( + m_clrData->GetColour().Red(), + m_clrData->GetColour().Green(), + m_clrData->GetColour().Blue(), + 254 + )); if (!m_is_third) { m_button_confirm->Hide(); diff --git a/src/slic3r/GUI/AMSMaterialsSetting.hpp b/src/slic3r/GUI/AMSMaterialsSetting.hpp index 8b950bf8e0..4a4b635be6 100644 --- a/src/slic3r/GUI/AMSMaterialsSetting.hpp +++ b/src/slic3r/GUI/AMSMaterialsSetting.hpp @@ -83,7 +83,7 @@ protected: Button * m_button_confirm; wxStaticText* m_tip_readonly; Button * m_button_close; - Button * m_clr_picker; + Button * m_clr_picker; wxColourData * m_clrData; #ifdef __APPLE__ wxComboBox *m_comboBox_filament_mac; diff --git a/src/slic3r/GUI/AMSSetting.cpp b/src/slic3r/GUI/AMSSetting.cpp index 020f115ee8..687888e7e9 100644 --- a/src/slic3r/GUI/AMSSetting.cpp +++ b/src/slic3r/GUI/AMSSetting.cpp @@ -200,6 +200,11 @@ void AMSSetting::create() m_panel_img->Layout(); m_sizer_img->Fit(m_panel_img); + m_sizer_remain_block = new wxBoxSizer(wxVERTICAL); + m_sizer_remain_block->Add(m_sizer_remain, 0, wxEXPAND | wxTOP, FromDIP(8)); + m_sizer_remain_block->Add(0, 0, 0, wxTOP, 8); + m_sizer_remain_block->Add(m_sizer_remain_tip, 0, wxLEFT, 18); + m_sizer_remain_block->Add(0, 0, 0, wxTOP, 15); m_sizerl_body->Add(m_sizer_Insert_material, 0, wxEXPAND, 0); m_sizerl_body->Add(0, 0, 0, wxTOP, 8); @@ -209,10 +214,7 @@ void AMSSetting::create() m_sizerl_body->Add(0, 0, 0, wxTOP, 8); m_sizerl_body->Add(m_sizer_starting_tip, 0, wxLEFT, 18); m_sizerl_body->Add(0, 0, 0, wxTOP, 15); - m_sizerl_body->Add(m_sizer_remain, 0, wxEXPAND | wxTOP, FromDIP(8)); - m_sizerl_body->Add(0, 0, 0, wxTOP, 8); - m_sizerl_body->Add(m_sizer_remain_tip, 0, wxLEFT, 18); - m_sizerl_body->Add(0, 0, 0, wxTOP, 15); + m_sizerl_body->Add(m_sizer_remain_block, 0, wxEXPAND, 0); m_sizerl_body->Add(m_sizer_switch_filament, 0, wxEXPAND | wxTOP, FromDIP(8)); m_sizerl_body->Add(0, 0, 0, wxTOP, 8); m_sizerl_body->Add(m_sizer_switch_filament_tip, 0, wxLEFT, 18); @@ -231,6 +233,17 @@ void AMSSetting::create() this->Centre(wxBOTH); wxGetApp().UpdateDlgDarkUI(this); + + Bind(wxEVT_SHOW, [this](auto& e) { + if (this->IsShown()) { + if (ams_support_remain) { + m_sizer_remain_block->Show(true); + } + else { + m_sizer_remain_block->Show(false); + } + } + }); } void AMSSetting::update_insert_material_read_mode(bool selected) diff --git a/src/slic3r/GUI/AMSSetting.hpp b/src/slic3r/GUI/AMSSetting.hpp index 7958fa1a0e..1f49d5973e 100644 --- a/src/slic3r/GUI/AMSSetting.hpp +++ b/src/slic3r/GUI/AMSSetting.hpp @@ -39,6 +39,7 @@ public: wxString append_title(wxString text); wxStaticText *append_text(wxString text); MachineObject *obj{nullptr}; + bool ams_support_remain{false}; int ams_id { 0 }; protected: @@ -72,6 +73,7 @@ protected: wxBoxSizer *m_sizer_starting_tip_inline; wxBoxSizer *m_sizer_remain_inline; wxBoxSizer *m_sizer_switch_filament_inline; + wxBoxSizer *m_sizer_remain_block; }; }} // namespace Slic3r::GUI diff --git a/src/slic3r/GUI/Auxiliary.cpp b/src/slic3r/GUI/Auxiliary.cpp index e3d9f5560d..823322f642 100644 --- a/src/slic3r/GUI/Auxiliary.cpp +++ b/src/slic3r/GUI/Auxiliary.cpp @@ -456,7 +456,9 @@ void AuFile::on_set_cover() { if (wxGetApp().plater()->model().model_info == nullptr) { wxGetApp().plater()->model().model_info = std::make_shared(); } - wxGetApp().plater()->model().model_info->cover_file = m_file_name.ToStdString(); + fs::path path(into_path(m_file_name)); + wxGetApp().plater()->model().model_info->cover_file = path.string(); + //wxGetApp().plater()->model().model_info->cover_file = m_file_name.ToStdString(); auto full_path = m_file_path.branch_path(); auto full_root_path = full_path.branch_path(); @@ -696,7 +698,8 @@ void AuFolderPanel::update_cover() if (wxGetApp().plater()->model().model_info != nullptr) { for (auto i = 0; i < m_aufiles_list.GetCount(); i++) { AuFiles *aufile = m_aufiles_list[i]; - if (wxGetApp().plater()->model().model_info->cover_file == aufile->file->m_file_name) { + + if (wxString::FromUTF8(wxGetApp().plater()->model().model_info->cover_file) == aufile->file->m_file_name) { aufile->file->set_cover(true); } else { aufile->file->set_cover(false); diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 86c01705ba..42d582763b 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -271,6 +271,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con } double sparse_infill_density = config->option("sparse_infill_density")->value; + auto timelapse_type = config->opt_enum("timelapse_type"); if (config->opt_bool("spiral_mode") && ! (config->opt_int("wall_loops") == 1 && @@ -279,12 +280,12 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con ! config->opt_bool("enable_support") && config->opt_int("enforce_support_layers") == 0 && config->opt_bool("ensure_vertical_shell_thickness") && - ! config->opt_bool("detect_thin_wall"))) + ! config->opt_bool("detect_thin_wall") && + config->opt_enum("timelapse_type") == TimelapseType::tlTraditional)) { - wxString msg_text = _(L("Spiral mode only works when wall loops is 1, \n" - "support is disabled, top shell layers is 0 and sparse infill density is 0\n")); + wxString msg_text = _(L("Spiral mode only works when wall loops is 1, support is disabled, top shell layers is 0, sparse infill density is 0 and timelapse type is traditional")); if (is_global_config) - msg_text += "\n" + _(L("Change these settings automatically? \n" + msg_text += "\n\n" + _(L("Change these settings automatically? \n" "Yes - Change these settings and enable spiral mode automatically\n" "No - Give up using spiral mode this time")); MessageDialog dialog(m_msg_dlg_parent, msg_text, "", @@ -301,7 +302,9 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con new_conf.set_key_value("enforce_support_layers", new ConfigOptionInt(0)); new_conf.set_key_value("ensure_vertical_shell_thickness", new ConfigOptionBool(true)); new_conf.set_key_value("detect_thin_wall", new ConfigOptionBool(false)); + new_conf.set_key_value("timelapse_type", new ConfigOptionEnum(tlTraditional)); sparse_infill_density = 0; + timelapse_type = TimelapseType::tlTraditional; support = false; } else { @@ -310,6 +313,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con apply(config, &new_conf); if (cb_value_change) { cb_value_change("sparse_infill_density", sparse_infill_density); + cb_value_change("timelapse_type", timelapse_type); if (!support) cb_value_change("enable_support", false); } diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 05ff4e63e8..c7372a98e5 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -1259,6 +1259,29 @@ bool MachineObject::is_recording() return camera_recording; } +void MachineObject::parse_version_func() +{ + auto ota_version = module_vers.find("ota"); + if (printer_type == "BL-P001" || + printer_type == "BL-P002") { + if (ota_version != module_vers.end()) { + if (ota_version->second.sw_ver.compare("01.01.01.00") <= 0) { + ams_support_remain = false; + ams_support_auto_switch_filament_flag = false; + is_xcam_buildplate_supported = false; + xcam_support_recovery_step_loss = false; + is_support_send_to_sdcard = false; + } else { + ams_support_remain = true; + ams_support_auto_switch_filament_flag = true; + is_xcam_buildplate_supported = true; + xcam_support_recovery_step_loss = true; + is_support_send_to_sdcard = true; + } + } + } +} + int MachineObject::command_get_version(bool with_retry) { BOOST_LOG_TRIVIAL(info) << "command_get_version"; @@ -1990,9 +2013,15 @@ bool MachineObject::is_function_supported(PrinterFunction func) func_name = "FUNC_AI_MONITORING"; break; case FUNC_BUILDPLATE_MARKER_DETECT: + parse_version_func(); + if (!is_xcam_buildplate_supported) + return false; func_name = "FUNC_BUILDPLATE_MARKER_DETECT"; break; case FUNC_AUTO_RECOVERY_STEP_LOSS: + parse_version_func(); + if (!xcam_support_recovery_step_loss) + return false; func_name = "FUNC_AUTO_RECOVERY_STEP_LOSS"; break; case FUNC_FLOW_CALIBRATION: @@ -2026,9 +2055,15 @@ bool MachineObject::is_function_supported(PrinterFunction func) func_name = "FUNC_ALTER_RESOLUTION"; break; case FUNC_SEND_TO_SDCARD: + parse_version_func(); + if (!is_support_send_to_sdcard) + return false; func_name = "FUNC_SEND_TO_SDCARD"; break; case FUNC_AUTO_SWITCH_FILAMENT: + parse_version_func(); + if (!ams_support_auto_switch_filament_flag) + return false; func_name = "FUNC_AUTO_SWITCH_FILAMENT"; break; case FUNC_VIRTUAL_CAMERA: @@ -2615,6 +2650,9 @@ int MachineObject::parse_json(std::string payload) else { if (jj["xcam"].contains("buildplate_marker_detector")) { xcam_buildplate_marker_detector = jj["xcam"]["buildplate_marker_detector"].get(); + is_xcam_buildplate_supported = true; + } else { + is_xcam_buildplate_supported = false; } } } @@ -2874,6 +2912,8 @@ int MachineObject::parse_json(std::string payload) } if (tray_it->contains("remain")) { curr_tray->remain = (*tray_it)["remain"].get(); + } else { + curr_tray->remain = -1; } try { if (!ams_id.empty() && !curr_tray->id.empty()) { @@ -3021,6 +3061,7 @@ int MachineObject::parse_json(std::string payload) ver_info.hw_ver = (*it)["hw_ver"].get(); module_vers.emplace(ver_info.name, ver_info); } + parse_version_func(); bool get_version_result = true; if (j["info"].contains("result")) if (j["info"]["result"].get() == "fail") diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index 2eb3095f80..9d778fe57a 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -423,8 +423,10 @@ public: bool ams_insert_flag { false }; bool ams_power_on_flag { false }; bool ams_calibrate_remain_flag { false }; + bool ams_support_auto_switch_filament_flag { true }; bool ams_auto_switch_filament_flag { false }; bool ams_support_use_ams { false }; + bool ams_support_remain { true }; int ams_humidity; int ams_user_setting_hold_count = 0; AmsStatusMain ams_status_main; @@ -579,8 +581,10 @@ public: bool xcam_ai_monitoring{ false }; int xcam_ai_monitoring_hold_count = 0; std::string xcam_ai_monitoring_sensitivity; + bool is_xcam_buildplate_supported { true }; bool xcam_buildplate_marker_detector{ false }; int xcam_buildplate_marker_hold_count = 0; + bool xcam_support_recovery_step_loss { true }; bool xcam_auto_recovery_step_loss{ false }; int xcam_auto_recovery_hold_count = 0; int ams_print_option_count = 0; @@ -588,6 +592,7 @@ public: /* sdcard */ MachineObject::SdcardState sdcard_state { NO_SDCARD }; MachineObject::SdcardState get_sdcard_state(); + bool is_support_send_to_sdcard { true }; /* HMS */ std::vector hms_list; @@ -622,6 +627,8 @@ public: MachineObject(NetworkAgent* agent, std::string name, std::string id, std::string ip); ~MachineObject(); + + void parse_version_func(); /* command commands */ int command_get_version(bool with_retry = true); int command_request_push_all(); diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index eb68894b76..71c427f04a 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1699,7 +1699,7 @@ void GUI_App::init_networking_callbacks() wxCommandEvent event(EVT_CONNECT_LAN_MODE_PRINT); if (obj) { - + if (obj->is_lan_mode_printer()) { if (state == ConnectStatus::ConnectStatusOk) { obj->command_request_push_all(); @@ -1892,6 +1892,9 @@ void GUI_App::init_app_config() if (! wxGetEnv(wxS("XDG_CONFIG_HOME"), &dir) || dir.empty() ) dir = wxFileName::GetHomeDir() + wxS("/.config"); set_data_dir((dir + "/" + GetAppName()).ToUTF8().data()); + boost::filesystem::path data_dir_path(data_dir()); + if (!boost::filesystem::exists(data_dir_path)) + boost::filesystem::create_directory(data_dir_path); #endif } else { m_datadir_redefined = true; @@ -2729,7 +2732,7 @@ void GUI_App::UpdateDarkUI(wxWindow* window, bool highlited/* = false*/, bool ju /*if (m_is_dark_mode != dark_mode() ) m_is_dark_mode = dark_mode();*/ - + if (m_is_dark_mode) { auto original_col = window->GetBackgroundColour(); diff --git a/src/slic3r/GUI/GUI_ObjectTable.cpp b/src/slic3r/GUI/GUI_ObjectTable.cpp index 7212a5534a..79628e2222 100644 --- a/src/slic3r/GUI/GUI_ObjectTable.cpp +++ b/src/slic3r/GUI/GUI_ObjectTable.cpp @@ -201,7 +201,7 @@ void GridCellFilamentsEditor::BeginEdit(int row, int col, wxGrid* grid) { // This event handler is needed to properly dismiss the editor when the popup is closed m_control->Bind(wxEVT_COMBOBOX_CLOSEUP, &GridCellFilamentsEditor::OnComboCloseUp, this); - evtHandler = wxDynamicCast(m_control->GetEventHandler(), wxGridCellEditorEvtHandler); + evtHandler = static_cast(m_control->GetEventHandler()); } // Don't immediately end if we get a kill focus event within BeginEdit @@ -403,7 +403,7 @@ void GridCellChoiceEditor::BeginEdit(int row, int col, wxGrid *grid) if (m_control) { // This event handler is needed to properly dismiss the editor when the popup is closed m_control->Bind(wxEVT_COMBOBOX_CLOSEUP, &GridCellChoiceEditor::OnComboCloseUp, this); - evtHandler = wxDynamicCast(m_control->GetEventHandler(), wxGridCellEditorEvtHandler); + evtHandler = static_cast(m_control->GetEventHandler()); } // Don't immediately end if we get a kill focus event within BeginEdit diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp index 342c1405da..8161632146 100644 --- a/src/slic3r/GUI/MediaPlayCtrl.cpp +++ b/src/slic3r/GUI/MediaPlayCtrl.cpp @@ -8,6 +8,7 @@ #include "MsgDialog.hpp" #include "DownloadProgressDialog.hpp" +#include #undef pid_t #include #ifdef __WIN32__ diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 062a1b0965..96bf83b819 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -1198,6 +1198,28 @@ std::vector PartPlate::get_extruders() const return plate_extruders; } +std::vector PartPlate::get_used_extruders() +{ + std::vector used_extruders; + // if gcode.3mf file + if (m_model->objects.empty()) { + for (int i = 0; i < slice_filaments_info.size(); i++) { + used_extruders.push_back(slice_filaments_info[i].id + 1); + } + return used_extruders; + } + + GCodeProcessorResult* result = get_slice_result(); + if (!result) + return used_extruders; + + PrintEstimatedStatistics& ps = result->print_statistics; + for (auto it = ps.volumes_per_extruder.begin(); it != ps.volumes_per_extruder.end(); it++) { + used_extruders.push_back(it->first + 1); + } + return used_extruders; +} + Vec3d PartPlate::estimate_wipe_tower_size(const double w, const double wipe_volume) const { Vec3d wipe_tower_size; diff --git a/src/slic3r/GUI/PartPlate.hpp b/src/slic3r/GUI/PartPlate.hpp index adafd842e1..f53b049b6a 100644 --- a/src/slic3r/GUI/PartPlate.hpp +++ b/src/slic3r/GUI/PartPlate.hpp @@ -259,6 +259,7 @@ public: Vec3d get_origin() { return m_origin; } Vec3d estimate_wipe_tower_size(const double w, const double wipe_volume) const; std::vector get_extruders() const; + std::vector get_used_extruders(); /* instance related operations*/ //judge whether instance is bound in plate or not diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index e336e60a24..37e6b47459 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -2930,7 +2930,7 @@ void SelectMachineDialog::set_default() } // material info - auto extruders = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_extruders(); + auto extruders = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_used_extruders(); BitmapCache bmcache; MaterialHash::iterator iter = m_materialList.begin(); diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index fa13ca0aeb..6f404bfbc7 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -2707,7 +2707,7 @@ void Selection::paste_objects_from_clipboard() auto start_offset = in_current ? src_object->instances.front()->get_offset() : plate->get_build_volume().center(); auto point_offset = start_offset - start_point; auto empty_cell = wxGetApp().plater()->canvas3D()->get_nearest_empty_cell({start_point(0), start_point(1)}, {bbox.size()(0)+1, bbox.size()(1)+1}); - displacement = {empty_cell.x() + point_offset.x(), empty_cell.y() + point_offset.y(), start_point(2)}; + displacement = {empty_cell.x() + point_offset.x(), empty_cell.y() + point_offset.y(), start_offset(2)}; } for (ModelInstance* inst : dst_object->instances) diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index aa76bc129e..93eb1cf8ae 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -1807,6 +1807,7 @@ void StatusPanel::update_ams(MachineObject *obj) // update obj in sub dlg if (m_ams_setting_dlg) { m_ams_setting_dlg->obj = obj; + if (obj && m_ams_setting_dlg->IsShown()) { m_ams_setting_dlg->update_insert_material_read_mode(obj->ams_insert_flag); m_ams_setting_dlg->update_starting_read_mode(obj->ams_power_on_flag); @@ -2445,6 +2446,7 @@ void StatusPanel::on_ams_setting_click(SimpleEvent &event) try { int ams_id_int = atoi(ams_id.c_str()); m_ams_setting_dlg->ams_id = ams_id_int; + m_ams_setting_dlg->ams_support_remain = obj->ams_support_remain; m_ams_setting_dlg->Show(); } catch (...) { ; diff --git a/src/slic3r/GUI/Widgets/WebView.cpp b/src/slic3r/GUI/Widgets/WebView.cpp index f60f7bdb84..e0cf7cf872 100644 --- a/src/slic3r/GUI/Widgets/WebView.cpp +++ b/src/slic3r/GUI/Widgets/WebView.cpp @@ -4,9 +4,13 @@ #include #include +#if wxUSE_WEBVIEW_EDGE #include +#endif #include +#if defined(__WIN32__) || defined(__WXMAC__) #include "wx/private/jsscriptwrapper.h" +#endif #ifdef __WIN32__ #include "../WebView2.h" diff --git a/src/slic3r/GUI/fts_fuzzy_match.h b/src/slic3r/GUI/fts_fuzzy_match.h index 379fd9c74e..c20960e372 100644 --- a/src/slic3r/GUI/fts_fuzzy_match.h +++ b/src/slic3r/GUI/fts_fuzzy_match.h @@ -33,6 +33,7 @@ #include // uint8_t #include // ::tolower, ::toupper +#include // ::towlower #include // memcpy #include diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index 8399fb2936..2f69533952 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/version.inc b/version.inc index 00dbf11f7e..b8cc08c9a9 100644 --- a/version.inc +++ b/version.inc @@ -10,5 +10,5 @@ endif() if(NOT DEFINED BBL_INTERNAL_TESTING) set(BBL_INTERNAL_TESTING "1") endif() -set(SoftFever_VERSION "1.4.0") -set(SLIC3R_VERSION "01.04.00.17") +set(SLIC3R_VERSION "01.04.00.18") +set(SoftFever_VERSION "1.4.0") \ No newline at end of file