mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 17:21:10 +00:00
Merge remote-tracking branch 'upstream/main' into feedback
This commit is contained in:
@@ -11,6 +11,15 @@ body:
|
||||
For this, please use the [Feature request](https://github.com/OrcaSlicer/OrcaSlicer/issues/new?assignees=&labels=&projects=&template=feature_request.yml) issue type or you can discuss your idea on our [Discord server](https://discord.gg/P4VE9UY9gJ) with others.
|
||||
|
||||
Before filing, please check if the issue already exists (either open or closed) by using the search bar on the issues page. If it does, comment there. Even if it's closed, we can reopen it based on your comment.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is this issue reproducible in the latest nightly build?
|
||||
description: >
|
||||
Please verify this issue still happens in the latest nightly build first. It may already be fixed there:
|
||||
[Nightly builds](https://github.com/OrcaSlicer/OrcaSlicer/releases/tag/nightly-builds).
|
||||
options:
|
||||
- label: I have checked the latest nightly build and the issue is still reproducible
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this problem?
|
||||
|
||||
@@ -19,3 +19,9 @@
|
||||
<!--
|
||||
> Please describe the tests that you have conducted to verify the changes made in this PR.
|
||||
-->
|
||||
|
||||
<!--
|
||||
> A guide for users on how to download the artifacts from this PR.
|
||||
-->
|
||||
|
||||
[How to Download Pull Requests Artifacts for Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
|
||||
|
||||
@@ -286,9 +286,10 @@ jobs:
|
||||
- name: Build slicer Win
|
||||
if: runner.os == 'Windows'
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
|
||||
WindowsSDKVersion: '10.0.26100.0\'
|
||||
# Orca: Removed Netfabb STL fixing service support in favor of CGAL.
|
||||
# env:
|
||||
# WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\'
|
||||
# WindowsSDKVersion: '10.0.26100.0\'
|
||||
run: .\build_release_vs.bat slicer
|
||||
|
||||
- name: Create installer Win
|
||||
|
||||
+38
-37
@@ -323,43 +323,44 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# WIN10SDK_PATH is used to point CMake to the WIN10 SDK installation directory.
|
||||
# We pick it from environment if it is not defined in another way
|
||||
if(WIN32)
|
||||
if(NOT DEFINED WIN10SDK_PATH)
|
||||
if(DEFINED ENV{WIN10SDK_PATH})
|
||||
set(WIN10SDK_PATH "$ENV{WIN10SDK_PATH}")
|
||||
endif()
|
||||
endif()
|
||||
if(DEFINED WIN10SDK_PATH)
|
||||
#BBS: modify win10sdk_path
|
||||
if (EXISTS "${WIN10SDK_PATH}/winrt/windows.graphics.printing3d.h")
|
||||
set(WIN10SDK_INCLUDE_PATH "${WIN10SDK_PATH}")
|
||||
else()
|
||||
message("WIN10SDK_PATH is invalid: ${WIN10SDK_PATH}")
|
||||
message("${WIN10SDK_PATH}/winrt/windows.graphics.printing3d.h was not found")
|
||||
message("STL fixing by the Netfabb service will not be compiled")
|
||||
unset(WIN10SDK_PATH)
|
||||
endif()
|
||||
else()
|
||||
# Try to use the default Windows 10 SDK path.
|
||||
if (DEFINED ENV{WindowsSdkDir} AND DEFINED ENV{WindowsSDKVersion})
|
||||
set(WIN10SDK_INCLUDE_PATH "$ENV{WindowsSdkDir}/Include/$ENV{WindowsSDKVersion}")
|
||||
else ()
|
||||
set(WIN10SDK_INCLUDE_PATH "C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0")
|
||||
endif ()
|
||||
if (NOT EXISTS "${WIN10SDK_INCLUDE_PATH}/winrt/windows.graphics.printing3d.h")
|
||||
message("${WIN10SDK_INCLUDE_PATH}/winrt/windows.graphics.printing3d.h was not found")
|
||||
message("STL fixing by the Netfabb service will not be compiled")
|
||||
unset(WIN10SDK_INCLUDE_PATH)
|
||||
endif()
|
||||
endif()
|
||||
if(WIN10SDK_INCLUDE_PATH)
|
||||
message("Building with Win10 Netfabb STL fixing service support")
|
||||
add_definitions(-DHAS_WIN10SDK)
|
||||
include_directories(SYSTEM "${WIN10SDK_INCLUDE_PATH}")
|
||||
else()
|
||||
message("Building without Win10 Netfabb STL fixing service support")
|
||||
endif()
|
||||
endif()
|
||||
# ORCA: Removed Netfabb STL fixing service support in favor of CGAL.
|
||||
# if(WIN32)
|
||||
# if(NOT DEFINED WIN10SDK_PATH)
|
||||
# if(DEFINED ENV{WIN10SDK_PATH})
|
||||
# set(WIN10SDK_PATH "$ENV{WIN10SDK_PATH}")
|
||||
# endif()
|
||||
# endif()
|
||||
# if(DEFINED WIN10SDK_PATH)
|
||||
# #BBS: modify win10sdk_path
|
||||
# if (EXISTS "${WIN10SDK_PATH}/winrt/windows.graphics.printing3d.h")
|
||||
# set(WIN10SDK_INCLUDE_PATH "${WIN10SDK_PATH}")
|
||||
# else()
|
||||
# message("WIN10SDK_PATH is invalid: ${WIN10SDK_PATH}")
|
||||
# message("${WIN10SDK_PATH}/winrt/windows.graphics.printing3d.h was not found")
|
||||
# message("STL fixing by the Netfabb service will not be compiled")
|
||||
# unset(WIN10SDK_PATH)
|
||||
# endif()
|
||||
# else()
|
||||
# # Try to use the default Windows 10 SDK path.
|
||||
# if (DEFINED ENV{WindowsSdkDir} AND DEFINED ENV{WindowsSDKVersion})
|
||||
# set(WIN10SDK_INCLUDE_PATH "$ENV{WindowsSdkDir}/Include/$ENV{WindowsSDKVersion}")
|
||||
# else ()
|
||||
# set(WIN10SDK_INCLUDE_PATH "C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0")
|
||||
# endif ()
|
||||
# if (NOT EXISTS "${WIN10SDK_INCLUDE_PATH}/winrt/windows.graphics.printing3d.h")
|
||||
# message("${WIN10SDK_INCLUDE_PATH}/winrt/windows.graphics.printing3d.h was not found")
|
||||
# message("STL fixing by the Netfabb service will not be compiled")
|
||||
# unset(WIN10SDK_INCLUDE_PATH)
|
||||
# endif()
|
||||
# endif()
|
||||
# if(WIN10SDK_INCLUDE_PATH)
|
||||
# message("Building with Win10 Netfabb STL fixing service support")
|
||||
# add_definitions(-DHAS_WIN10SDK)
|
||||
# include_directories(SYSTEM "${WIN10SDK_INCLUDE_PATH}")
|
||||
# else()
|
||||
# message("Building without Win10 Netfabb STL fixing service support")
|
||||
# endif()
|
||||
# endif()
|
||||
|
||||
if (APPLE)
|
||||
message("OS X SDK Path: ${CMAKE_OSX_SYSROOT}")
|
||||
|
||||
@@ -12999,6 +12999,18 @@ msgstr ""
|
||||
msgid "Travel speed of the first layer."
|
||||
msgstr ""
|
||||
|
||||
msgid "First layer travel acceleration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Travel acceleration of first layer."
|
||||
msgstr ""
|
||||
|
||||
msgid "First layer travel jerk"
|
||||
msgstr ""
|
||||
|
||||
msgid "Travel jerk of first layer."
|
||||
msgstr ""
|
||||
|
||||
msgid "Number of slow layers"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -15193,6 +15193,18 @@ msgstr "Bewegung"
|
||||
msgid "Travel speed of the first layer."
|
||||
msgstr "Bewegungsgeschwindigkeit der ersten Schicht"
|
||||
|
||||
msgid "First layer travel acceleration"
|
||||
msgstr "Eilgang Beschleunigung"
|
||||
|
||||
msgid "Travel acceleration of first layer."
|
||||
msgstr "Eilgang Beschleunigung der ersten Schicht."
|
||||
|
||||
msgid "First layer travel jerk"
|
||||
msgstr "Eilgang Ruck"
|
||||
|
||||
msgid "Travel jerk of first layer."
|
||||
msgstr "Eilgang Ruck der ersten Schicht."
|
||||
|
||||
msgid "Number of slow layers"
|
||||
msgstr "Anzahl der langsamen Schichten"
|
||||
|
||||
|
||||
@@ -2614,7 +2614,7 @@ msgid "Brim"
|
||||
msgstr ""
|
||||
|
||||
msgid "Object/Part Setting"
|
||||
msgstr "Object/part setting"
|
||||
msgstr "Object/part settings"
|
||||
|
||||
msgid "Reset parameter"
|
||||
msgstr ""
|
||||
@@ -13280,6 +13280,18 @@ msgstr ""
|
||||
msgid "Travel speed of the first layer."
|
||||
msgstr ""
|
||||
|
||||
msgid "First layer travel acceleration"
|
||||
msgstr ""
|
||||
|
||||
msgid "Travel acceleration of first layer."
|
||||
msgstr ""
|
||||
|
||||
msgid "First layer travel jerk"
|
||||
msgstr ""
|
||||
|
||||
msgid "Travel jerk of first layer."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "Number of slow layers"
|
||||
msgstr "This is the number of top interface layers."
|
||||
|
||||
@@ -14963,7 +14963,19 @@ msgid "First layer travel speed"
|
||||
msgstr "Első réteg mozgási sebessége"
|
||||
|
||||
msgid "Travel speed of the first layer."
|
||||
msgstr "Az első réteg utazási sebessége."
|
||||
msgstr "Az első réteg mozgási sebessége."
|
||||
|
||||
msgid "First layer travel acceleration"
|
||||
msgstr "Első réteg mozgási gyorsulása"
|
||||
|
||||
msgid "Travel acceleration of first layer."
|
||||
msgstr "Az első réteg mozgási gyorsulása."
|
||||
|
||||
msgid "First layer travel jerk"
|
||||
msgstr "Első réteg mozgási jerkje"
|
||||
|
||||
msgid "Travel jerk of first layer."
|
||||
msgstr "Az első réteg mozgási jerkje."
|
||||
|
||||
msgid "Number of slow layers"
|
||||
msgstr "Lassú rétegek száma"
|
||||
@@ -22662,7 +22674,7 @@ msgstr ""
|
||||
"Mikor nyomtass nyitott ajtóval\n"
|
||||
"Tudtad, hogy a nyomtató ajtajának kinyitásával csökkentheted az extruder/"
|
||||
"fejegység eltömődésének valószínűségét, ha alacsonyabb hőmérsékletű "
|
||||
"filamentet nyomtatsz? További információ a Wikiben olvashatsz erről."
|
||||
"filamentet nyomtatsz? További információ erről a Wikiben található."
|
||||
|
||||
#: resources/data/hints.ini: [hint:Avoid warping]
|
||||
msgid ""
|
||||
@@ -22738,5 +22750,3 @@ msgstr ""
|
||||
#~ "maximális áramlás közül a kisebbik korlátozza. Kikapcsolva csak a "
|
||||
#~ "felhasználó által megadott maximális áramlás érvényesül."
|
||||
|
||||
#~ msgid "Travel speed of First layer."
|
||||
#~ msgstr "Az első réteg mozgási sebessége."
|
||||
|
||||
@@ -4331,7 +4331,7 @@ msgstr ""
|
||||
"seam_slope_start_height precisa ser menor que layer_height.\n"
|
||||
"Redefinir para 0."
|
||||
|
||||
#, fuzzy, c-format, boost-format
|
||||
#, no-c-format, no-boost-format
|
||||
msgid ""
|
||||
"Lock depth should smaller than skin depth.\n"
|
||||
"Reset to 50% of skin depth."
|
||||
|
||||
@@ -1764,7 +1764,7 @@ msgid "Choose one file (GCODE/3MF):"
|
||||
msgstr "选择一个文件(GCODE/3MF):"
|
||||
|
||||
msgid "Ext"
|
||||
msgstr "分机"
|
||||
msgstr "Ext"
|
||||
|
||||
msgid "Some presets are modified."
|
||||
msgstr "预设已被修改。"
|
||||
@@ -5726,13 +5726,13 @@ msgid "Pass 1"
|
||||
msgstr "粗调"
|
||||
|
||||
msgid "Flow ratio test - Pass 1"
|
||||
msgstr "流量比例测试 - 通过 1"
|
||||
msgstr "流量比例测试 - 粗调"
|
||||
|
||||
msgid "Pass 2"
|
||||
msgstr "细调"
|
||||
msgstr "微调"
|
||||
|
||||
msgid "Flow ratio test - Pass 2"
|
||||
msgstr "流量比例测试 - 通过 2"
|
||||
msgstr "流量比例测试 - 微调"
|
||||
|
||||
msgid "YOLO (Recommended)"
|
||||
msgstr "YOLO(推荐)"
|
||||
@@ -5871,7 +5871,7 @@ msgid "The project is no longer available."
|
||||
msgstr "此项目不可用。"
|
||||
|
||||
msgid "Filament Settings"
|
||||
msgstr "打印丝设置"
|
||||
msgstr "材料设置"
|
||||
|
||||
msgid ""
|
||||
"Do you want to synchronize your personal data from Bambu Cloud?\n"
|
||||
@@ -5880,7 +5880,7 @@ msgid ""
|
||||
"2. The Filament presets\n"
|
||||
"3. The Printer presets"
|
||||
msgstr ""
|
||||
"想从Bambu 云同步你的个人数据吗?\n"
|
||||
"想从 Bambu 云同步你的个人数据吗?\n"
|
||||
"包含如下信息:\n"
|
||||
"1. 工艺预设\n"
|
||||
"2. 打印丝预设\n"
|
||||
@@ -5923,7 +5923,7 @@ msgid "Initializing..."
|
||||
msgstr "正在初始化……"
|
||||
|
||||
msgid "Connection Failed. Please check the network and try again"
|
||||
msgstr "链接失败。请检查网络后重试"
|
||||
msgstr "连接失败。请检查网络后重试"
|
||||
|
||||
msgid ""
|
||||
"Please check the network and try again. You can restart or update the "
|
||||
@@ -6349,7 +6349,7 @@ msgid "Debug Info"
|
||||
msgstr "调试信息"
|
||||
|
||||
msgid "Filament loading..."
|
||||
msgstr "耗材丝进料..."
|
||||
msgstr "耗材丝进料中..."
|
||||
|
||||
msgid "No Storage"
|
||||
msgstr "无存储"
|
||||
@@ -7304,8 +7304,8 @@ msgid ""
|
||||
"The object from file %s is too small, and maybe in meters or inches.\n"
|
||||
" Do you want to scale to millimeters?"
|
||||
msgstr ""
|
||||
"文件 %s 中对象的尺寸似乎是以米或者英寸为单位定义的。\n"
|
||||
"逆戟鲸切片器的内部单位为毫米。是否要转换成毫米?"
|
||||
"文件 %s 中对象的尺寸过小,似乎是以米(m)或者英寸(inch)为单位定义的。\n"
|
||||
"OrcaSlicer的内部单位为毫米(mm)。是否要转换成毫米(mm)?"
|
||||
|
||||
msgid "Object too small"
|
||||
msgstr "对象尺寸过小"
|
||||
@@ -7547,7 +7547,7 @@ msgid ""
|
||||
msgstr "未提供校准加速度。使用默认加速度值"
|
||||
|
||||
msgid "mm/s²"
|
||||
msgstr "毫米/秒²"
|
||||
msgstr "mm/s²"
|
||||
|
||||
msgid "No speeds provided for calibration. Use default optimal speed "
|
||||
msgstr "未提供校准速度。使用默认最佳速度"
|
||||
@@ -7609,10 +7609,10 @@ msgid "The current project has unsaved changes, save it before continue?"
|
||||
msgstr "当前项目包含未保存的修改,是否先保存?"
|
||||
|
||||
msgid "Number of copies:"
|
||||
msgstr "克隆数量:"
|
||||
msgstr "复制数量:"
|
||||
|
||||
msgid "Copies of the selected object"
|
||||
msgstr "所选对象的克隆数量"
|
||||
msgstr "所选对象的复制数量"
|
||||
|
||||
msgid "Save G-code file as:"
|
||||
msgstr "G-code文件另存为:"
|
||||
@@ -7752,19 +7752,19 @@ msgstr "对象名字:%1%\n"
|
||||
|
||||
#, boost-format
|
||||
msgid "Size: %1% x %2% x %3% in\n"
|
||||
msgstr "大小:%1% x %2% x %3% 英寸\n"
|
||||
msgstr "大小:%1% x %2% x %3% in\n"
|
||||
|
||||
#, boost-format
|
||||
msgid "Size: %1% x %2% x %3% mm\n"
|
||||
msgstr "大小: %1% x %2% x %3% 毫米\n"
|
||||
msgstr "大小: %1% x %2% x %3% mm\n"
|
||||
|
||||
#, boost-format
|
||||
msgid "Volume: %1% in³\n"
|
||||
msgstr "体积: %1% 英寸³\n"
|
||||
msgstr "体积: %1% in³\n"
|
||||
|
||||
#, boost-format
|
||||
msgid "Volume: %1% mm³\n"
|
||||
msgstr "体积: %1% 毫米³\n"
|
||||
msgstr "体积: %1% mm³\n"
|
||||
|
||||
#, boost-format
|
||||
msgid "Triangles: %1%\n"
|
||||
@@ -7813,7 +7813,7 @@ msgid "rear"
|
||||
msgstr "后部"
|
||||
|
||||
msgid "Switching the language requires application restart.\n"
|
||||
msgstr "切换语言要求重启应用程序。\n"
|
||||
msgstr "切换语言需要重启应用程序。\n"
|
||||
|
||||
msgid "Do you want to continue?"
|
||||
msgstr "是否继续?"
|
||||
@@ -7852,7 +7852,7 @@ msgid "The period of backup in seconds."
|
||||
msgstr "备份的周期"
|
||||
|
||||
msgid "Bed Temperature Difference Warning"
|
||||
msgstr "床温差警告"
|
||||
msgstr "热床温度不同警告"
|
||||
|
||||
msgid ""
|
||||
"Using filaments with significantly different temperatures may cause:\n"
|
||||
@@ -7895,10 +7895,10 @@ msgid "General"
|
||||
msgstr "常规"
|
||||
|
||||
msgid "Metric"
|
||||
msgstr "公制"
|
||||
msgstr "公制(Metric)"
|
||||
|
||||
msgid "Imperial"
|
||||
msgstr "英制"
|
||||
msgstr "英制(Imperial)"
|
||||
|
||||
msgid "Units"
|
||||
msgstr "单位"
|
||||
@@ -8027,7 +8027,7 @@ msgid "Optimizes filament area maximum height by chosen filament count."
|
||||
msgstr "根据选定的耗材丝数量优化耗材区域最大高度"
|
||||
|
||||
msgid "Features"
|
||||
msgstr "特征"
|
||||
msgstr "特性"
|
||||
|
||||
msgid "Multi device management"
|
||||
msgstr "多设备管理"
|
||||
@@ -10226,7 +10226,7 @@ msgid ""
|
||||
msgstr "仅同步耗材丝类型和颜色,不包括插槽信息。"
|
||||
|
||||
msgid "Ext spool"
|
||||
msgstr "外线轴"
|
||||
msgstr "外置耗材盘"
|
||||
|
||||
msgid ""
|
||||
"Please check whether the nozzle type of the device is the same as the preset "
|
||||
@@ -10300,16 +10300,16 @@ msgid "For constant flow rate, hold %1% while dragging."
|
||||
msgstr "为保持恒定流量,拖动时按住%1%"
|
||||
|
||||
msgid "ms"
|
||||
msgstr "多发性硬化症"
|
||||
msgstr "ms"
|
||||
|
||||
msgid "Total ramming"
|
||||
msgstr "总顶压"
|
||||
msgstr "总冲刷量"
|
||||
|
||||
msgid "Volume"
|
||||
msgstr "体积"
|
||||
|
||||
msgid "Ramming line"
|
||||
msgstr "顶压线"
|
||||
msgstr "预冲刷线"
|
||||
|
||||
msgid ""
|
||||
"Orca would re-calculate your flushing volumes everytime the filaments color "
|
||||
@@ -11968,7 +11968,7 @@ msgstr ""
|
||||
"以及对象的流量比(如果已设置)来计算的。"
|
||||
|
||||
msgid "Support flow ratio"
|
||||
msgstr "支持流量比"
|
||||
msgstr "支撑流量比"
|
||||
|
||||
msgid ""
|
||||
"This factor affects the amount of material for support.\n"
|
||||
@@ -11980,7 +11980,7 @@ msgstr ""
|
||||
"象的流量比(如果已设置)来计算的。"
|
||||
|
||||
msgid "Support interface flow ratio"
|
||||
msgstr "支持接口流量比例"
|
||||
msgstr "支撑面流量比例"
|
||||
|
||||
msgid ""
|
||||
"This factor affects the amount of material for the support interface.\n"
|
||||
@@ -13049,10 +13049,10 @@ msgid ""
|
||||
msgstr "打印此材料的所需的最小喷嘴硬度。零值表示不检查喷嘴硬度。"
|
||||
|
||||
msgid "Filament map to extruder"
|
||||
msgstr "耗材图至挤出机"
|
||||
msgstr "耗材映射到挤出机"
|
||||
|
||||
msgid "Filament map to extruder."
|
||||
msgstr "耗材图到挤出机。"
|
||||
msgstr "耗材映射到挤出机。"
|
||||
|
||||
msgid "Auto For Flush"
|
||||
msgstr "自动冲洗"
|
||||
@@ -15768,7 +15768,7 @@ msgstr ""
|
||||
"不使用该值。"
|
||||
|
||||
msgid "∆℃"
|
||||
msgstr "℃"
|
||||
msgstr "∆℃"
|
||||
|
||||
msgid "Preheat time"
|
||||
msgstr "预热时间"
|
||||
@@ -15860,7 +15860,7 @@ msgid "Enable filament ramming"
|
||||
msgstr "启用耗材尖端成型"
|
||||
|
||||
msgid "No sparse layers (beta)"
|
||||
msgstr "无稀疏层 (实验)"
|
||||
msgstr "无稀疏层 (实验功能)"
|
||||
|
||||
msgid ""
|
||||
"If enabled, the wipe tower will not be printed on layers with no tool "
|
||||
@@ -19170,7 +19170,7 @@ msgid ""
|
||||
"Note: If the only preset under this filament is deleted, the filament will "
|
||||
"be deleted after exiting the dialog."
|
||||
msgstr ""
|
||||
"注意:如果在该耗材下仅有的预设被删除,那么在退出对话框后,该耗材将被删除。"
|
||||
"注意:如果在该耗材下仅有的预设被删除,在关闭对话框后,该耗材将被删除。"
|
||||
|
||||
msgid "Presets inherited by other presets cannot be deleted"
|
||||
msgstr "附属于其他预设的预设不能被删除。"
|
||||
@@ -19341,7 +19341,7 @@ msgid "Success!"
|
||||
msgstr "成功!"
|
||||
|
||||
msgid "Are you sure to log out?"
|
||||
msgstr "您确定要注销吗?"
|
||||
msgstr "您确定要登出吗?"
|
||||
|
||||
msgid "View print host webui in Device tab"
|
||||
msgstr "在 设备 标签页中查看打印机主机的网页界面"
|
||||
@@ -19760,7 +19760,7 @@ msgid ""
|
||||
"set the outer wall speed to be 40 to 60 mm/s when slicing."
|
||||
msgstr ""
|
||||
"为了使打印件获得更高的光泽度,请在使用前将耗材干燥,并在切片时将外壁速度设置"
|
||||
"为 40 至 60 毫米/秒。"
|
||||
"为 40 至 60 mm/s。"
|
||||
|
||||
msgid ""
|
||||
"This filament is only used to print models with a low density usually, and "
|
||||
@@ -19793,7 +19793,7 @@ msgid ""
|
||||
"the AMS. Printing it is of many requirements, and to get better printing "
|
||||
"quality, please refer to this wiki: TPU printing guide."
|
||||
msgstr ""
|
||||
"该耗材具有足够高的硬度(约 67 D)并且与 AMS 兼容。打印此类耗材需要满足较多条"
|
||||
"该耗材具有足够高的硬度(约 67D)并且与 AMS 兼容。打印此类耗材需要满足较多条"
|
||||
"件,为了获得更好的打印质量,请参考这个英文wiki:TPU printing guide(“TPU打印"
|
||||
"指南”)"
|
||||
|
||||
@@ -19884,7 +19884,7 @@ msgid "The number of printers in use simultaneously cannot be equal to 0."
|
||||
msgstr "同时使用的打印机数量不能等于0。"
|
||||
|
||||
msgid "Use External Spool"
|
||||
msgstr "使用外置线卷"
|
||||
msgstr "使用外置耗材盘"
|
||||
|
||||
msgid "Select Printers"
|
||||
msgstr "选择打印机"
|
||||
@@ -20642,7 +20642,7 @@ msgid ""
|
||||
"Did you know that you can save wasted filament by flushing it into support/"
|
||||
"objects/infill during filament change?"
|
||||
msgstr ""
|
||||
"冲刷到支持/对象/填充中\n"
|
||||
"冲刷到支撑/对象/填充中\n"
|
||||
"你知道吗?你可以在换料时将它们冲入支撑/对象/填充,以节省浪费的料丝。"
|
||||
|
||||
#: resources/data/hints.ini: [hint:Improve strength]
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"machine_max_speed_y": [
|
||||
"800"
|
||||
],
|
||||
"machine_start_gcode": "INIT_MAPPING_VALUE\n;===== PRINT_PHASE_INIT =====\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nSET_PRINT_MAIN_STATUS MAIN_STATUS=print_start\nM220 S100\nM221 S100\nSET_INPUT_SHAPER SHAPER_TYPE_X=mzv\nSET_INPUT_SHAPER SHAPER_TYPE_Y=mzv\nDISABLE_ALL_SENSOR\nM1002 R1\nM107\nCLEAR_PAUSE\nM140 S[bed_temperature_initial_layer_single]\nM141 S[chamber_temperature]\nG29.0\nG28\n\n;===== BOX_PREPAR =====\nBOX_PRINT_START EXTRUDER=[initial_no_support_extruder] HOTENDTEMP={nozzle_temperature_range_high[initial_tool]}\nM400\nEXTRUSION_AND_FLUSH HOTEND=[nozzle_temperature_initial_layer]\n\n;===== CLEAR_NOZZLE =====\nG1 Z20 F480\nMOVE_TO_TRASH\nG1 Y403.5 F2000\n{if chamber_temperature[0] == 0}\nM106 P3 S[during_print_exhaust_fan_speed]\n{else}\nM106 P3 S0\n{endif}\nM1004\nM106 S0\nM109 S[nozzle_temperature_initial_layer]\nG92 E0\nM83\nG1 E5 F80\nG1 E250 F300\nM400\nM106 S255\nG1 E-3 F1000\nM104 S140\nM109.1 S{nozzle_temperature_initial_layer[0]-30}\nM204 S10000\nG1 Y403 F2000\nG1 X163 F8000\nG1 X145 F5000\nG1 X163 F8000\nG1 X145 F5000\nG1 X175 F6000\nG1 X163\nG1 X175\nG1 X163\nG1 X175\nG1 X163\nG1 X180 F10000\nG1 Y395 F6000\nG1 X188\nG1 Z-0.2 F480\nM106 S255\nM109.1 S150\nG91\nG1 X15 F200\nG1 Y2\nG1 X-15\nG1 Y-2\nG1 X15\nG90\nG2 I0.5 J0.5 F480\nG2 I0.5 J0.5\nG2 I0.5 J0.5\nG1 Z10\nG1 Y383 F12000\nG1 X116\nG1 Y403\nG1 X163 F8000\nG1 X145 F5000\nG1 X163 F8000\nG1 X145 F5000\nG1 X175 F6000\nG1 X163\nG1 X175\nG1 X163\nG1 X175\nG1 X163\nG1 X180 F10000\nG1 X195 Y195\nM106 S0\nM190 S[bed_temperature_initial_layer_single]\nM191 S[chamber_temperature]\nM400\nSET_OPERATING_CURRENT STEPPER=x VALUE=1500\nG4 P400\nSET_OPERATING_CURRENT STEPPER=y VALUE=1500\nG4 P400\nG1 Y0 F15000\nG1 X15\nG1 X3 F5000\nG4 P1000\nG1 X4 F1000\nG1 X3 F5000\nG4 P1000\nG1 E-4 F1800\nG1 X15 F3000\n\nM400\nSET_OPERATING_CURRENT STEPPER=x VALUE=1200\nG4 P400\nSET_OPERATING_CURRENT STEPPER=y VALUE=1200\nG4 P2000\nG1 X20 Y20 F15000\nZ_TILT_ADJUST\nG29\nM1002 A1\nG1 X195 Y195 Z10 F20000\nG92_ Z{10 - ((nozzle_temperature_initial_layer[initial_tool] - 130) / 14 - 5.0) / 100}\nG0 Y1\nM109 S[nozzle_temperature_initial_layer]\nENABLE_ALL_SENSOR\n\n;===== PRINT_START =====\n; LAYER_HEIGHT: 0.2\nT[initial_tool]\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nM141 S[chamber_temperature]\nG4 P3000\nprobe samples=1\nG91\nG0 Z0.6 F480\nG90\nG1 X175 Y1 F20000\nG1 E5 F{filament_max_volumetric_speed[initial_no_support_extruder]/2/2.4053*60}\nG1 X215 E20 F{filament_max_volumetric_speed[initial_no_support_extruder]/2/2.4053*60}\nG1 Z1 F480\nSET_PRINT_MAIN_STATUS MAIN_STATUS=printing",
|
||||
"machine_start_gcode": ";===== PRINT_PHASE_INIT =====\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nSET_PRINT_MAIN_STATUS MAIN_STATUS=print_start\nM220 S100\nM221 S100\nSET_INPUT_SHAPER SHAPER_TYPE_X=mzv\nSET_INPUT_SHAPER SHAPER_TYPE_Y=mzv\nDISABLE_ALL_SENSOR\nM1002 R1\nM107\nCLEAR_PAUSE\nM140 S[bed_temperature_initial_layer_single]\nM141 S[chamber_temperature]\nG29.0\nSET_PRINT_SUB_STATUS SUB_STATUS=tool_head_reset\nG28\n\n;===== BOX_PREPAR =====\nSET_PRINT_SUB_STATUS SUB_STATUS=change_filament\nBOX_PRINT_START EXTRUDER=[initial_no_support_extruder] HOTENDTEMP={nozzle_temperature_range_high[initial_tool]}\nM400\nEXTRUSION_AND_FLUSH HOTEND=[nozzle_temperature_initial_layer]\n\n;===== CLEAR_NOZZLE =====\nSET_PRINT_SUB_STATUS SUB_STATUS=flush_filament\nG1 Z20 F480\nMOVE_TO_TRASH\nG1 Y403.5 F2000\n{if chamber_temperature[0] == 0}\nM106 P3 S[during_print_exhaust_fan_speed]\n{else}\nM106 P3 S0\n{endif}\nM1004\nM106 S0\nM109 S[nozzle_temperature_initial_layer]\nG92 E0\nM83\nG1 E5 F80\nG1 E250 F300\nM400\nM106 S255\nG1 E-3 F1000\nM104 S140\nSET_PRINT_SUB_STATUS SUB_STATUS=clear_nozzle\nM109.1 S{nozzle_temperature_initial_layer[0]-30}\nM204 S10000\nG1 Y403 F2000\nG1 X163 F8000\nG1 X145 F5000\nG1 X163 F8000\nG1 X145 F5000\nG1 X175 F6000\nG1 X163\nG1 X175\nG1 X163\nG1 X175\nG1 X163\nG1 X180 F10000\nG1 Y395 F6000\nG1 X188\nG1 Z-0.2 F480\nM106 S255\nM109.1 S150\nG91\nG1 X15 F200\nG1 Y2\nG1 X-15\nG1 Y-2\nG1 X15\nG90\nG2 I0.5 J0.5 F480\nG2 I0.5 J0.5\nG2 I0.5 J0.5\nG1 Z10\nG1 Y383 F12000\nG1 X116\nG1 Y403\nG1 X163 F8000\nG1 X145 F5000\nG1 X163 F8000\nG1 X145 F5000\nG1 X175 F6000\nG1 X163\nG1 X175\nG1 X163\nG1 X175\nG1 X163\nG1 X180 F10000\nG1 X195 Y195\nM106 S0\nSET_PRINT_SUB_STATUS SUB_STATUS=wait_bed_temp\nM190 S[bed_temperature_initial_layer_single]\nSET_PRINT_SUB_STATUS SUB_STATUS=wait_chamber_temp\nM191 S[chamber_temperature]\nG1 Y0 F15000\nG1 X15\nG1 X3 F5000\nG4 P1000\nG1 X4 F1000\nG1 X3 F5000\nG4 P1000\nG1 E-4 F1800\nG1 X15 F3000\nG1 X20 Y20 F15000\nSET_PRINT_SUB_STATUS SUB_STATUS=z_tilt_adjust\nZ_TILT_ADJUST\nSET_PRINT_SUB_STATUS SUB_STATUS=auto_bed_adjust\nG29\nM1002 A1\nG1 X195 Y195 Z10 F20000\nG92_ Z{10 - ((nozzle_temperature_initial_layer[initial_tool] - 130) / 14 - 5.0) / 100}\nG0 Y1\nM109 S[nozzle_temperature_initial_layer]\nENABLE_ALL_SENSOR\n\n;===== PRINT_START =====\n; LAYER_HEIGHT: 0.2\nT[initial_tool]\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nM141 S[chamber_temperature]\nG4 P3000\nprobe samples=1\nG91\nG0 Z0.6 F480\nG90\nG1 X175 Y1 F20000\nG1 E5 F{filament_max_volumetric_speed[initial_no_support_extruder]/2/2.4053*60}\nG1 X215 E20 F{filament_max_volumetric_speed[initial_no_support_extruder]/2/2.4053*60}\nG1 Z1 F480\nSET_PRINT_MAIN_STATUS MAIN_STATUS=printing",
|
||||
"nozzle_diameter": [
|
||||
"0.4"
|
||||
],
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"ironing_flow": "15%",
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"inner_wall_line_width": "0.45",
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
"print_settings_id": "",
|
||||
"raft_layers": "0",
|
||||
"reduce_crossing_wall": "0",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"resolution": "0.012",
|
||||
"seam_position": "aligned",
|
||||
"seam_placement_away_from_overhangs": "0",
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"ironing_spacing": "0.1",
|
||||
"ironing_speed": "15",
|
||||
"ironing_type": "no ironing",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[initial_tool]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
"ironing_speed": "30",
|
||||
"ironing_type": "no ironing",
|
||||
"layer_height": "0.2",
|
||||
"reduce_infill_retraction": "1",
|
||||
"reduce_infill_retraction": "0",
|
||||
"filename_format": "{input_filename_base}_{filament_type[0]}_{print_time}.gcode",
|
||||
"detect_overhang_wall": "1",
|
||||
"overhang_1_4_speed": "0",
|
||||
|
||||
@@ -523,6 +523,11 @@ void AppConfig::set_defaults()
|
||||
set_bool("installed_networking", false);
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
if (get("window_buttons_on_left").empty())
|
||||
set_bool("window_buttons_on_left", false);
|
||||
#endif
|
||||
|
||||
// Remove legacy window positions/sizes
|
||||
erase("app", "main_frame_maximized");
|
||||
erase("app", "main_frame_pos");
|
||||
|
||||
@@ -2559,6 +2559,21 @@ void priv::create_face_types(FaceTypeMap &map,
|
||||
bool priv::clip_cut(SurfacePatch &cut, CutMesh clipper)
|
||||
{
|
||||
CutMesh& tm = cut.mesh;
|
||||
auto is_mesh_usable_for_clip = [](const CutMesh &mesh) {
|
||||
return !mesh.is_empty() &&
|
||||
mesh.number_of_vertices() >= 3 &&
|
||||
mesh.number_of_faces() > 0 &&
|
||||
mesh.is_valid(false);
|
||||
};
|
||||
|
||||
if (!is_mesh_usable_for_clip(tm) || !is_mesh_usable_for_clip(clipper))
|
||||
return false;
|
||||
|
||||
// Hard-stop pathological inputs before entering corefinement internals.
|
||||
if (CGAL::Polygon_mesh_processing::does_self_intersect(tm) ||
|
||||
CGAL::Polygon_mesh_processing::does_self_intersect(clipper))
|
||||
return false;
|
||||
|
||||
// create backup for case that there is no intersection
|
||||
CutMesh backup_copy = tm;
|
||||
|
||||
|
||||
@@ -808,8 +808,10 @@ void split_solid_surface(size_t layer_id, const SurfaceFill &fill, ExPolygons &n
|
||||
return;
|
||||
}
|
||||
|
||||
// Expand the normal infills a little bit to avoid gaps between normal and narrow infills
|
||||
normal_infill = intersection_ex(offset_ex(normal_fill_areas_ex, scaled_spacing * 0.1), fill.expolygons);
|
||||
// Expand the normal infills to avoid gaps between normal and narrow infills.
|
||||
// The inner_area was shrunk by scaled_spacing * 0.5, so we need to expand
|
||||
// by at least that amount to ensure proper coverage and avoid gaps.
|
||||
normal_infill = intersection_ex(offset_ex(normal_fill_areas_ex, scaled_spacing * 0.5), fill.expolygons);
|
||||
narrow_infill = narrow_fill_areas;
|
||||
|
||||
#ifdef DEBUG_SURFACE_SPLIT
|
||||
|
||||
@@ -173,7 +173,10 @@ const std::string BBL_LICENSE_TAG = "License";
|
||||
const std::string BBL_REGION_TAG = "Region";
|
||||
const std::string BBL_MODIFICATION_TAG = "ModificationDate";
|
||||
const std::string BBL_CREATION_DATE_TAG = "CreationDate";
|
||||
// Orca: BBL current version
|
||||
const std::string BBL_APPLICATION_TAG = "Application";
|
||||
// OrcaSlicer version tag
|
||||
const std::string ORCASLICER_TAG = "OrcaSlicer";
|
||||
const std::string BBL_MAKERLAB_TAG = "MakerLab";
|
||||
const std::string BBL_MAKERLAB_VERSION_TAG = "MakerLabVersion";
|
||||
|
||||
@@ -1034,6 +1037,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
std::string m_origin_file;
|
||||
// Semantic version of Orca Slicer, that generated this 3MF.
|
||||
boost::optional<Semver> m_bambuslicer_generator_version;
|
||||
// Semantic version from the OrcaSlicer metadata tag (if present).
|
||||
boost::optional<Semver> m_orca_slicer_version;
|
||||
unsigned int m_fdm_supports_painting_version = 0;
|
||||
unsigned int m_seam_painting_version = 0;
|
||||
unsigned int m_mm_painting_version = 0;
|
||||
@@ -1105,7 +1110,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
//BBS: add plate data related logic
|
||||
// add backup & restore logic
|
||||
bool load_model_from_file(const std::string& filename, Model& model, PlateDataPtrs& plate_data_list, std::vector<Preset*>& project_presets, DynamicPrintConfig& config,
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool* is_bbl_3mf, Semver& file_version, Import3mfProgressFn proFn = nullptr, BBLProject *project = nullptr, int plate_id = 0);
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool* is_bbl_3mf, bool* is_orca_3mf, Semver& file_version, Import3mfProgressFn proFn = nullptr, BBLProject *project = nullptr, int plate_id = 0);
|
||||
bool get_thumbnail(const std::string &filename, std::string &data);
|
||||
bool load_gcode_3mf_from_stream(std::istream & data, Model& model, PlateDataPtrs& plate_data_list, DynamicPrintConfig& config, Semver& file_version);
|
||||
unsigned int version() const { return m_version; }
|
||||
@@ -1313,7 +1318,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
//BBS: add plate data related logic
|
||||
// add backup & restore logic
|
||||
bool _BBS_3MF_Importer::load_model_from_file(const std::string& filename, Model& model, PlateDataPtrs& plate_data_list, std::vector<Preset*>& project_presets, DynamicPrintConfig& config,
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool* is_bbl_3mf, Semver& file_version, Import3mfProgressFn proFn, BBLProject *project, int plate_id)
|
||||
ConfigSubstitutionContext& config_substitutions, LoadStrategy strategy, bool* is_bbl_3mf, bool* is_orca_3mf, Semver& file_version, Import3mfProgressFn proFn, BBLProject *project, int plate_id)
|
||||
{
|
||||
m_version = 0;
|
||||
m_fdm_supports_painting_version = 0;
|
||||
@@ -1369,8 +1374,18 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
if (is_bbl_3mf) {
|
||||
*is_bbl_3mf = m_is_bbl_3mf;
|
||||
}
|
||||
if (m_bambuslicer_generator_version)
|
||||
file_version = *m_bambuslicer_generator_version;
|
||||
// If the OrcaSlicer tag is present, use it as file_version (ignoring the Bambu Application version).
|
||||
// Otherwise fall back to the version parsed from the Application tag.
|
||||
if (m_orca_slicer_version) {
|
||||
file_version = *m_orca_slicer_version;
|
||||
if (is_orca_3mf)
|
||||
*is_orca_3mf = true;
|
||||
} else {
|
||||
if (m_bambuslicer_generator_version)
|
||||
file_version = *m_bambuslicer_generator_version;
|
||||
if (is_orca_3mf)
|
||||
*is_orca_3mf = false;
|
||||
}
|
||||
// save for restore
|
||||
if (result && m_load_aux && !m_load_restore) {
|
||||
save_string_file(model.get_backup_path() + "/origin.txt", filename);
|
||||
@@ -3821,6 +3836,12 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
m_is_bbl_3mf = true;
|
||||
m_bambuslicer_generator_version = Semver::parse(m_curr_characters.substr(11));
|
||||
}
|
||||
} else if (m_curr_metadata_name == ORCASLICER_TAG) {
|
||||
// OrcaSlicer version tag (written from OrcaSlicer 2.3.2 onwards)
|
||||
m_orca_slicer_version = Semver::parse(m_curr_characters);
|
||||
if (m_orca_slicer_version) {
|
||||
m_is_bbl_3mf = true;
|
||||
}
|
||||
//TODO: currently use version 0, no need to load&&save this string
|
||||
/*} else if (m_curr_metadata_name == BBS_FDM_SUPPORTS_PAINTING_VERSION) {
|
||||
m_fdm_supports_painting_version = (unsigned int) atoi(m_curr_characters.c_str());
|
||||
@@ -6667,8 +6688,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
// Orca: PRIVACY: do not store creation & modification date in 3mf
|
||||
metadata_item_map[BBL_CREATION_DATE_TAG] = "";
|
||||
metadata_item_map[BBL_MODIFICATION_TAG] = "";
|
||||
//SoftFever: write BambuStudio tag to keep it compatible
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % "BambuStudio" % SoftFever_VERSION).str();
|
||||
// Orca: Write the BambuStudio compatibility version string using SLIC3R_VERSION
|
||||
metadata_item_map[BBL_APPLICATION_TAG] = (boost::format("%1%-%2%") % "BambuStudio" % SLIC3R_VERSION).str();
|
||||
}
|
||||
metadata_item_map[BBS_3MF_VERSION] = std::to_string(VERSION_BBS_3MF);
|
||||
|
||||
@@ -6693,6 +6714,10 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
BOOST_LOG_TRIVIAL(info) << "bbs_3mf: save key= " << item.first << ", value = " << item.second;
|
||||
stream << " <" << METADATA_TAG << " name=\"" << item.first << "\">"
|
||||
<< xml_escape(item.second) << "</" << METADATA_TAG << ">\n";
|
||||
if (item.first == BBL_APPLICATION_TAG) {
|
||||
stream << " <" << METADATA_TAG << " name=\"" << ORCASLICER_TAG << "\">"
|
||||
<< xml_escape(SoftFever_VERSION) << "</" << METADATA_TAG << ">\n";
|
||||
}
|
||||
}
|
||||
|
||||
stream << " <" << RESOURCES_TAG << ">\n";
|
||||
@@ -7552,7 +7577,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
{
|
||||
const std::string& temp_path = model.get_backup_path();
|
||||
std::string temp_file = temp_path + std::string("/") + "_temp_1.config";
|
||||
config.save_to_json(temp_file, std::string("project_settings"), std::string("project"), std::string(SoftFever_VERSION));
|
||||
config.save_to_json(temp_file, std::string("project_settings"), std::string("project"), std::string(SLIC3R_VERSION));
|
||||
return _add_file_to_archive(archive, BBS_PROJECT_CONFIG_FILE, temp_file);
|
||||
}
|
||||
|
||||
@@ -7958,7 +7983,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
// save slice header for debug
|
||||
stream << " <" << SLICE_HEADER_TAG << ">\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Type" << "\" " << VALUE_ATTR << "=\"" << "slicer" << "\"/>\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Version" << "\" " << VALUE_ATTR << "=\"" << convert_to_full_version(SoftFever_VERSION) << "\"/>\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "X-BBL-Client-Version" << "\" " << VALUE_ATTR << "=\"" << convert_to_full_version(SLIC3R_VERSION) << "\"/>\n";
|
||||
stream << " <" << SLICE_HEADER_ITEM_TAG << " " << KEY_ATTR << "=\"" << "OrcaSlicer-Version" << "\" " << VALUE_ATTR << "=\"" << SoftFever_VERSION << "\"/>\n";
|
||||
stream << " </" << SLICE_HEADER_TAG << ">\n";
|
||||
|
||||
for (unsigned int i = 0; i < (unsigned int)plate_data_list.size(); ++i)
|
||||
@@ -8654,7 +8680,7 @@ private:
|
||||
|
||||
//BBS: add plate data list related logic
|
||||
bool load_bbs_3mf(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, PlateDataPtrs* plate_data_list, std::vector<Preset*>* project_presets,
|
||||
bool* is_bbl_3mf, Semver* file_version, Import3mfProgressFn proFn, LoadStrategy strategy, BBLProject *project, int plate_id)
|
||||
bool* is_bbl_3mf, bool* is_orca_3mf, Semver* file_version, Import3mfProgressFn proFn, LoadStrategy strategy, BBLProject *project, int plate_id)
|
||||
{
|
||||
if (path == nullptr || config == nullptr || model == nullptr)
|
||||
return false;
|
||||
@@ -8662,7 +8688,7 @@ bool load_bbs_3mf(const char* path, DynamicPrintConfig* config, ConfigSubstituti
|
||||
// All import should use "C" locales for number formatting.
|
||||
CNumericLocalesSetter locales_setter;
|
||||
_BBS_3MF_Importer importer;
|
||||
bool res = importer.load_model_from_file(path, *model, *plate_data_list, *project_presets, *config, *config_substitutions, strategy, is_bbl_3mf, *file_version, proFn, project, plate_id);
|
||||
bool res = importer.load_model_from_file(path, *model, *plate_data_list, *project_presets, *config, *config_substitutions, strategy, is_bbl_3mf, is_orca_3mf, *file_version, proFn, project, plate_id);
|
||||
importer.log_errors();
|
||||
//BBS: remove legacy project logic currently
|
||||
//handle_legacy_project_loaded(importer.version(), *config);
|
||||
|
||||
@@ -248,7 +248,7 @@ struct StoreParams
|
||||
// add restore logic
|
||||
// Load the content of a 3mf file into the given model and preset bundle.
|
||||
extern bool load_bbs_3mf(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, PlateDataPtrs* plate_data_list, std::vector<Preset*>* project_presets,
|
||||
bool* is_bbl_3mf, Semver* file_version, Import3mfProgressFn proFn = nullptr, LoadStrategy strategy = LoadStrategy::Default, BBLProject *project = nullptr, int plate_id = 0);
|
||||
bool* is_bbl_3mf, bool* is_orca_3mf, Semver* file_version, Import3mfProgressFn proFn = nullptr, LoadStrategy strategy = LoadStrategy::Default, BBLProject *project = nullptr, int plate_id = 0);
|
||||
|
||||
extern std::string bbs_3mf_get_thumbnail(const char * path);
|
||||
|
||||
|
||||
+90
-35
@@ -1948,6 +1948,7 @@ namespace DoExport {
|
||||
//if (ret.size() < MAX_TAGS_COUNT) check(_(L("Color Change G-code")), config.color_change_gcode.value);
|
||||
//Orca
|
||||
if (ret.size() < MAX_TAGS_COUNT) check(_(L("Change extrusion role G-code")), config.change_extrusion_role_gcode.value);
|
||||
if (ret.size() < MAX_TAGS_COUNT) check(_(L("Process change extrusion role G-code")), config.process_change_extrusion_role_gcode.value);
|
||||
if (ret.size() < MAX_TAGS_COUNT) check(_(L("Pause G-code")), config.machine_pause_gcode.value);
|
||||
if (ret.size() < MAX_TAGS_COUNT) check(_(L("Template Custom G-code")), config.template_custom_gcode.value);
|
||||
if (ret.size() < MAX_TAGS_COUNT) {
|
||||
@@ -1964,6 +1965,13 @@ namespace DoExport {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ret.size() < MAX_TAGS_COUNT) {
|
||||
for (const std::string& value : config.filament_change_extrusion_role_gcode.values) {
|
||||
check(_(L("Filament change extrusion role G-code")), value);
|
||||
if (ret.size() == MAX_TAGS_COUNT)
|
||||
break;
|
||||
}
|
||||
}
|
||||
//BBS: no custom_gcode_per_print_z, don't need to check
|
||||
//if (ret.size() < MAX_TAGS_COUNT) {
|
||||
// const CustomGCode::Info& custom_gcode_per_print_z = print.model().custom_gcode_per_print_z;
|
||||
@@ -2513,7 +2521,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
} else
|
||||
m_enable_extrusion_role_markers = false;
|
||||
|
||||
if (!print.config().small_area_infill_flow_compensation_model.empty())
|
||||
if (m_config.small_area_infill_flow_compensation.value && !m_config.small_area_infill_flow_compensation_model.empty())
|
||||
m_small_area_infill_flow_compensator = make_unique<SmallAreaInfillFlowCompensator>(print.config());
|
||||
|
||||
// Process file_start_gcode - written at the very top of the file, before any header
|
||||
@@ -3188,15 +3196,16 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
this->_print_first_layer_extruder_temperatures(file, print, machine_start_gcode, initial_extruder_id, true);
|
||||
}
|
||||
// Orca: when activate_air_filtration is set on any extruder, find and set the highest during_print_exhaust_fan_speed
|
||||
bool activate_air_filtration = false;
|
||||
bool activate_air_filtration_during_print = false;
|
||||
int during_print_exhaust_fan_speed = 0;
|
||||
for (const auto &extruder : m_writer.extruders()) {
|
||||
activate_air_filtration |= m_config.activate_air_filtration.get_at(extruder.id());
|
||||
if (m_config.activate_air_filtration.get_at(extruder.id()))
|
||||
if (m_config.activate_air_filtration.get_at(extruder.id()) && m_config.activate_air_filtration_during_print.get_at(extruder.id())) {
|
||||
activate_air_filtration_during_print = true;
|
||||
during_print_exhaust_fan_speed = std::max(during_print_exhaust_fan_speed,
|
||||
m_config.during_print_exhaust_fan_speed.get_at(extruder.id()));
|
||||
}
|
||||
}
|
||||
if (activate_air_filtration)
|
||||
if (activate_air_filtration_during_print)
|
||||
file.write(m_writer.set_exhaust_fan(during_print_exhaust_fan_speed, true));
|
||||
|
||||
print.throw_if_canceled();
|
||||
@@ -3519,13 +3528,16 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
if (activate_chamber_temp_control && max_chamber_temp > 0)
|
||||
file.write(m_writer.set_chamber_temperature(0, false)); //close chamber_temperature
|
||||
|
||||
if (activate_air_filtration) {
|
||||
int complete_print_exhaust_fan_speed = 0;
|
||||
for (const auto& extruder : m_writer.extruders())
|
||||
if (m_config.activate_air_filtration.get_at(extruder.id()))
|
||||
complete_print_exhaust_fan_speed = std::max(complete_print_exhaust_fan_speed, m_config.complete_print_exhaust_fan_speed.get_at(extruder.id()));
|
||||
file.write(m_writer.set_exhaust_fan(complete_print_exhaust_fan_speed, true));
|
||||
bool activate_air_filtration_on_completion = false;
|
||||
int complete_print_exhaust_fan_speed = 0;
|
||||
for (const auto& extruder : m_writer.extruders()) {
|
||||
if (m_config.activate_air_filtration.get_at(extruder.id()) && m_config.activate_air_filtration_on_completion.get_at(extruder.id())) {
|
||||
activate_air_filtration_on_completion = true;
|
||||
complete_print_exhaust_fan_speed = std::max(complete_print_exhaust_fan_speed, m_config.complete_print_exhaust_fan_speed.get_at(extruder.id()));
|
||||
}
|
||||
}
|
||||
if (activate_air_filtration_on_completion)
|
||||
file.write(m_writer.set_exhaust_fan(complete_print_exhaust_fan_speed, true));
|
||||
// adds tags for time estimators
|
||||
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Last_Line_M73_Placeholder).c_str());
|
||||
file.write_format("; EXECUTABLE_BLOCK_END\n\n");
|
||||
@@ -5560,6 +5572,7 @@ void GCode::apply_print_config(const PrintConfig &print_config)
|
||||
&m_config.time_lapse_gcode,
|
||||
&m_config.change_filament_gcode,
|
||||
&m_config.change_extrusion_role_gcode,
|
||||
&m_config.process_change_extrusion_role_gcode,
|
||||
&m_config.printing_by_object_gcode,
|
||||
&m_config.machine_pause_gcode,
|
||||
&m_config.template_custom_gcode,
|
||||
@@ -5569,7 +5582,8 @@ void GCode::apply_print_config(const PrintConfig &print_config)
|
||||
}
|
||||
for (auto opt : std::initializer_list<ConfigOptionStrings*>{
|
||||
&m_config.filament_start_gcode,
|
||||
&m_config.filament_end_gcode
|
||||
&m_config.filament_end_gcode,
|
||||
&m_config.filament_change_extrusion_role_gcode
|
||||
}) {
|
||||
if (opt->empty())
|
||||
for (int i = 0; i < opt->size(); ++i)
|
||||
@@ -6336,11 +6350,13 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
"move to first " + description + " point",
|
||||
sloped == nullptr ? DBL_MAX : get_sloped_z(sloped->slope_begin.z_ratio)
|
||||
);
|
||||
m_need_change_layer_lift_z = false;
|
||||
// Orca: ensure Z matches planned layer height
|
||||
if (_last_pos_undefined && !slope_need_z_travel) {
|
||||
gcode += this->writer().travel_to_z(m_nominal_z, "ensure Z matches planned layer height", true);
|
||||
if (!slope_need_z_travel && (_last_pos_undefined || m_need_change_layer_lift_z)) {
|
||||
const std::string z_sync_comment = _last_pos_undefined ?
|
||||
"ensure Z matches planned layer height" : ""; // no comment for normal layer-Z lift
|
||||
gcode += this->writer().travel_to_z(m_nominal_z, z_sync_comment, true);
|
||||
}
|
||||
m_need_change_layer_lift_z = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -6420,6 +6436,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
_mm3_per_mm *= m_config.bottom_solid_infill_flow_ratio;
|
||||
} else if (path.role() == erInternalBridgeInfill) {
|
||||
_mm3_per_mm *= m_config.internal_bridge_flow;
|
||||
} else if (path.role() == erBrim) {
|
||||
_mm3_per_mm *= m_config.brim_flow_ratio;
|
||||
} else if (sloped) {
|
||||
_mm3_per_mm *= m_config.scarf_joint_flow_ratio;
|
||||
}
|
||||
@@ -6502,14 +6520,17 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
|
||||
if (speed == 0)
|
||||
speed = filament_max_volumetric_speed / _mm3_per_mm;
|
||||
if (this->on_first_layer()) {
|
||||
|
||||
const auto _layer = layer_id();
|
||||
if (this->on_first_layer() || object_layer_over_raft()) {
|
||||
//BBS: for solid infill of first layer, speed can be higher as long as
|
||||
//wall lines have be attached
|
||||
if (path.role() != erBottomSurface)
|
||||
speed = m_config.get_abs_value("initial_layer_speed");
|
||||
}
|
||||
else if(m_config.slow_down_layers > 1){
|
||||
const auto _layer = layer_id();
|
||||
if (path.role() != erBottomSurface) {
|
||||
speed = is_perimeter(path.role()) ? m_config.get_abs_value("initial_layer_speed") :
|
||||
m_config.get_abs_value("initial_layer_infill_speed");
|
||||
}
|
||||
} else if (m_config.slow_down_layers > 1 && !m_config.raft_layers > 0) {
|
||||
|
||||
if (_layer > 0 && _layer < m_config.slow_down_layers) {
|
||||
const auto first_layer_speed =
|
||||
is_perimeter(path.role())
|
||||
@@ -6519,7 +6540,18 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
speed = std::min(
|
||||
speed,
|
||||
Slic3r::lerp(first_layer_speed, speed,
|
||||
(double)_layer / m_config.slow_down_layers));
|
||||
(double) (_layer) / m_config.slow_down_layers));
|
||||
}
|
||||
}
|
||||
} else if (m_config.slow_down_layers > 1 && m_config.raft_layers > 0 ) {
|
||||
|
||||
if (_layer > m_config.raft_layers && (_layer - m_config.raft_layers) < m_config.slow_down_layers) {
|
||||
const auto first_layer_speed
|
||||
= is_perimeter(path.role()) ? m_config.get_abs_value("initial_layer_speed") :
|
||||
m_config.get_abs_value("initial_layer_infill_speed");
|
||||
if (first_layer_speed < speed) {
|
||||
speed = std::min(speed, Slic3r::lerp(first_layer_speed, speed,
|
||||
(double) (_layer - m_config.raft_layers) / m_config.slow_down_layers));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6582,7 +6614,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
bool variable_speed = false;
|
||||
std::vector<ProcessedPoint> new_points {};
|
||||
|
||||
if (m_config.enable_overhang_speed && !this->on_first_layer() &&
|
||||
if (m_config.enable_overhang_speed && !this->on_first_layer() && !object_layer_over_raft() &&
|
||||
(is_bridge(path.role()) || is_perimeter(path.role()))) {
|
||||
bool is_external = is_external_perimeter(path.role());
|
||||
double ref_speed = is_external ? m_config.get_abs_value("outer_wall_speed") : m_config.get_abs_value("inner_wall_speed");
|
||||
@@ -6670,15 +6702,29 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
// Orca: End of dynamic PA trigger flag segment
|
||||
|
||||
//Orca: process custom gcode for extrusion role change
|
||||
if (path.role() != m_last_extrusion_role && !m_config.change_extrusion_role_gcode.value.empty()) {
|
||||
if (path.role() != m_last_extrusion_role) {
|
||||
const auto current_filament_id = m_writer.filament()->id();
|
||||
const std::string& machine_role_change_gcode = m_config.change_extrusion_role_gcode.value;
|
||||
const std::string& filament_role_change_gcode = m_config.filament_change_extrusion_role_gcode.get_at(current_filament_id);
|
||||
const std::string& process_role_change_gcode = m_config.process_change_extrusion_role_gcode.value;
|
||||
|
||||
if (!machine_role_change_gcode.empty() || !filament_role_change_gcode.empty() || !process_role_change_gcode.empty()) {
|
||||
DynamicConfig config;
|
||||
config.set_key_value("extrusion_role", new ConfigOptionString(extrusion_role_to_string_for_parser(path.role())));
|
||||
config.set_key_value("last_extrusion_role", new ConfigOptionString(extrusion_role_to_string_for_parser(m_last_extrusion_role)));
|
||||
config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index + 1));
|
||||
config.set_key_value("layer_z", new ConfigOptionFloat(m_layer == nullptr ? m_last_height : m_layer->print_z));
|
||||
gcode += this->placeholder_parser_process("change_extrusion_role_gcode",
|
||||
m_config.change_extrusion_role_gcode.value, m_writer.filament()->id(), &config)
|
||||
+ "\n";
|
||||
|
||||
const auto append_role_gcode = [this, current_filament_id, &config, &gcode](const std::string& key, const std::string& templ) {
|
||||
if (templ.empty())
|
||||
return;
|
||||
gcode += this->placeholder_parser_process(key, templ, current_filament_id, &config) + "\n";
|
||||
};
|
||||
|
||||
append_role_gcode("change_extrusion_role_gcode", machine_role_change_gcode);
|
||||
append_role_gcode("filament_change_extrusion_role_gcode", filament_role_change_gcode);
|
||||
append_role_gcode("process_change_extrusion_role_gcode", process_role_change_gcode);
|
||||
}
|
||||
}
|
||||
|
||||
// extrude arc or line
|
||||
@@ -7225,16 +7271,25 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
||||
unsigned int acceleration_to_set = 0;
|
||||
|
||||
if (this->on_first_layer()) {
|
||||
if (m_config.default_acceleration.value > 0 && m_config.initial_layer_acceleration.value > 0) {
|
||||
acceleration_to_set = (unsigned int) floor(m_config.initial_layer_acceleration.value + 0.5);
|
||||
unsigned int initial_layer_travel_acceleration = m_config.get_abs_value("initial_layer_travel_acceleration");
|
||||
double initial_layer_travel_jerk = m_config.get_abs_value("initial_layer_travel_jerk");
|
||||
|
||||
if (m_config.default_acceleration.value > 0 && initial_layer_travel_acceleration > 0) {
|
||||
acceleration_to_set = (unsigned int) floor(initial_layer_travel_acceleration + 0.5);
|
||||
}
|
||||
|
||||
if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0) {
|
||||
jerk_to_set = m_config.initial_layer_jerk.value;
|
||||
if (m_config.default_jerk.value > 0 && initial_layer_travel_jerk > 0) {
|
||||
jerk_to_set = initial_layer_travel_jerk;
|
||||
}
|
||||
} else {
|
||||
} else { // ORCA: Handle short-travel acceleration and jerk for outer perimeters (if applicable)
|
||||
const bool is_short_travel = travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel));
|
||||
|
||||
if (m_config.default_acceleration.value > 0) {
|
||||
if (role == erExternalPerimeter && travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel))) {
|
||||
if (role == erOverhangPerimeter && is_short_travel) {
|
||||
const double bridge_acceleration = m_config.get_abs_value("bridge_acceleration");
|
||||
|
||||
if (bridge_acceleration > 0)
|
||||
acceleration_to_set = (unsigned int) floor(bridge_acceleration + 0.5);
|
||||
} else if (role == erExternalPerimeter && is_short_travel) {
|
||||
if (m_config.outer_wall_acceleration.value > 0)
|
||||
acceleration_to_set = (unsigned int) floor(m_config.outer_wall_acceleration.value + 0.5);
|
||||
} else {
|
||||
@@ -7244,7 +7299,7 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
||||
}
|
||||
|
||||
if (m_config.default_jerk.value > 0) {
|
||||
if (role == erExternalPerimeter && travel.length() < scale_(EXTRUDER_CONFIG(retraction_minimum_travel))) {
|
||||
if ((role == erExternalPerimeter || role == erOverhangPerimeter) && is_short_travel) {
|
||||
if (m_config.outer_wall_jerk.value > 0)
|
||||
jerk_to_set = m_config.outer_wall_jerk.value;
|
||||
} else {
|
||||
|
||||
@@ -5480,6 +5480,37 @@ void GCodeProcessor::process_filament_change(int id)
|
||||
void GCodeProcessor::store_move_vertex(EMoveType type, EMovePathType path_type, bool internal_only)
|
||||
{
|
||||
int filament_id = get_filament_id();
|
||||
const auto normal_mode = PrintEstimatedStatistics::ETimeMode::Normal;
|
||||
const size_t normal_mode_id = static_cast<size_t>(normal_mode);
|
||||
const float delta_x = std::abs(m_end_position[X] - m_start_position[X]);
|
||||
const float delta_y = std::abs(m_end_position[Y] - m_start_position[Y]);
|
||||
const float delta_z = std::abs(m_end_position[Z] - m_start_position[Z]);
|
||||
const float delta_e = std::abs(m_end_position[E] - m_start_position[E]);
|
||||
const bool has_x = delta_x > 0.0f;
|
||||
const bool has_y = delta_y > 0.0f;
|
||||
const bool has_z = delta_z > 0.0f;
|
||||
const bool has_e = delta_e > 0.0f;
|
||||
const float move_acceleration =
|
||||
(type == EMoveType::Travel) ? get_travel_acceleration(normal_mode) :
|
||||
((type == EMoveType::Retract || type == EMoveType::Unretract) ? get_retract_acceleration(normal_mode) :
|
||||
get_acceleration(normal_mode));
|
||||
const float junction_deviation = get_option_value(m_time_processor.machine_limits.machine_max_junction_deviation, normal_mode_id);
|
||||
const bool use_jd_jerk = (m_flavor == gcfMarlinFirmware && junction_deviation > 0.0f);
|
||||
const auto axis_jerk_for_preview = [this, normal_mode, use_jd_jerk, move_acceleration](Axis axis) {
|
||||
return use_jd_jerk ? get_axis_max_jerk_with_jd(normal_mode, axis, move_acceleration) : get_axis_max_jerk(normal_mode, axis);
|
||||
};
|
||||
const float jerk_x = axis_jerk_for_preview(X);
|
||||
const float jerk_y = axis_jerk_for_preview(Y);
|
||||
const float jerk_z = axis_jerk_for_preview(Z);
|
||||
const float jerk_e = axis_jerk_for_preview(E);
|
||||
const float move_jerk =
|
||||
(has_e && !has_x && !has_y && !has_z) ? jerk_e :
|
||||
(has_z && !has_x && !has_y) ? jerk_z :
|
||||
(has_x && has_y) ? std::min(jerk_x, jerk_y) :
|
||||
has_x ? jerk_x :
|
||||
has_y ? jerk_y :
|
||||
has_z ? jerk_z :
|
||||
std::min(jerk_x, jerk_y);
|
||||
m_last_line_id = (type == EMoveType::Color_change || type == EMoveType::Pause_Print || type == EMoveType::Custom_GCode) ?
|
||||
m_line_id + 1 :
|
||||
((type == EMoveType::Seam) ? m_last_line_id : m_line_id);
|
||||
@@ -5503,6 +5534,10 @@ void GCodeProcessor::store_move_vertex(EMoveType type, EMovePathType path_type,
|
||||
m_extruder_temps[filament_id],
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
m_pressure_advance,
|
||||
// ORCA: Add Acceleration visualization support
|
||||
move_acceleration,
|
||||
// ORCA: Add Jerk visualization support
|
||||
move_jerk,
|
||||
{ 0.0f, 0.0f }, // time
|
||||
static_cast<float>(m_layer_id), //layer_duration: set later
|
||||
std::max<unsigned int>(1, m_layer_id) - 1,
|
||||
@@ -5578,7 +5613,7 @@ float GCodeProcessor::get_axis_max_acceleration(PrintEstimatedStatistics::ETimeM
|
||||
}
|
||||
}
|
||||
|
||||
float GCodeProcessor::get_axis_max_jerk_with_jd(PrintEstimatedStatistics::ETimeMode mode, Axis axis) const
|
||||
float GCodeProcessor::get_axis_max_jerk_with_jd(PrintEstimatedStatistics::ETimeMode mode, Axis axis, float acceleration) const
|
||||
{
|
||||
if (axis != X && axis != Y && axis != Z && axis != E)
|
||||
return 0.0f;
|
||||
@@ -5589,12 +5624,22 @@ float GCodeProcessor::get_axis_max_jerk_with_jd(PrintEstimatedStatistics::ETimeM
|
||||
return 0.0f;
|
||||
|
||||
const float axis_max_acc = get_axis_max_acceleration(mode, axis);
|
||||
const float generic_acc = get_acceleration(mode);
|
||||
const float effective_acc = axis_max_acc > 0.0f ? axis_max_acc : generic_acc;
|
||||
float effective_acc = acceleration;
|
||||
if (effective_acc <= 0.0f)
|
||||
effective_acc = get_acceleration(mode);
|
||||
if (axis_max_acc > 0.0f)
|
||||
effective_acc = effective_acc > 0.0f ? std::min(effective_acc, axis_max_acc) : axis_max_acc;
|
||||
if (effective_acc <= 0.0f)
|
||||
return 0.0f;
|
||||
|
||||
return std::sqrt(jd * effective_acc * 2.5f);
|
||||
}
|
||||
|
||||
float GCodeProcessor::get_axis_max_jerk_with_jd(PrintEstimatedStatistics::ETimeMode mode, Axis axis) const
|
||||
{
|
||||
return get_axis_max_jerk_with_jd(mode, axis, get_acceleration(mode));
|
||||
}
|
||||
|
||||
float GCodeProcessor::get_axis_max_jerk(PrintEstimatedStatistics::ETimeMode mode, Axis axis) const
|
||||
{
|
||||
const size_t id = static_cast<size_t>(mode);
|
||||
|
||||
@@ -186,6 +186,10 @@ class Print;
|
||||
float temperature{ 0.0f }; // Celsius degrees
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
float pressure_advance{ 0.0f };
|
||||
// ORCA: Add Acceleration visualization support
|
||||
float acceleration{ 0.0f }; // mm/s^2
|
||||
// ORCA: Add Jerk visualization support
|
||||
float jerk{ 0.0f }; // mm/s
|
||||
std::array<float, static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count)> time{ 0.0f, 0.0f }; // s
|
||||
float layer_duration{ 0.0f }; // s
|
||||
unsigned int layer_id{ 0 };
|
||||
@@ -1074,6 +1078,7 @@ class Print;
|
||||
// per-nozzle machine limits (filament_map_2 / get_config_idx_for_filament).
|
||||
float get_axis_max_feedrate(PrintEstimatedStatistics::ETimeMode mode, Axis axis) const;
|
||||
float get_axis_max_acceleration(PrintEstimatedStatistics::ETimeMode mode, Axis axis) const;
|
||||
float get_axis_max_jerk_with_jd(PrintEstimatedStatistics::ETimeMode mode, Axis axis, float acceleration) const;
|
||||
float get_axis_max_jerk_with_jd(PrintEstimatedStatistics::ETimeMode mode, Axis axis) const;
|
||||
float get_axis_max_jerk(PrintEstimatedStatistics::ETimeMode mode, Axis axis) const;
|
||||
Vec3f get_xyz_max_jerk(PrintEstimatedStatistics::ETimeMode mode) const;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
|
||||
#include <CGAL/Polygon_mesh_processing/repair.h>
|
||||
#include <CGAL/Polygon_mesh_processing/remesh.h>
|
||||
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
|
||||
#include <CGAL/Polygon_mesh_processing/repair_polygon_soup.h>
|
||||
#include <CGAL/Polygon_mesh_processing/orientation.h>
|
||||
// BBS: for segment
|
||||
#include <CGAL/mesh_segmentation.h>
|
||||
@@ -475,6 +475,92 @@ bool empty(const CGALMesh &mesh)
|
||||
return mesh.m.is_empty();
|
||||
}
|
||||
|
||||
bool repair(TriangleMesh& mesh, RepairedMeshErrors* repaired_errors, std::string* error)
|
||||
{
|
||||
using namespace CGAL;
|
||||
namespace PMP = CGAL::Polygon_mesh_processing;
|
||||
|
||||
if (mesh.empty())
|
||||
return true;
|
||||
|
||||
try {
|
||||
// 1) Convert to polygon soup
|
||||
std::vector<_EpicMesh::Point> points;
|
||||
std::vector<std::vector<std::size_t>> polygons;
|
||||
|
||||
points.reserve(mesh.its.vertices.size());
|
||||
polygons.reserve(mesh.its.indices.size());
|
||||
|
||||
for (const auto& v : mesh.its.vertices)
|
||||
points.emplace_back(v.x(), v.y(), v.z());
|
||||
|
||||
for (const auto& f : mesh.its.indices)
|
||||
polygons.push_back({size_t(f[0]), size_t(f[1]), size_t(f[2])});
|
||||
|
||||
// 2) Aggressive soup cleanup
|
||||
PMP::repair_polygon_soup(points, polygons);
|
||||
|
||||
// 3) Convert soup → mesh
|
||||
_EpicMesh cgal_mesh;
|
||||
PMP::polygon_soup_to_polygon_mesh(points, polygons, cgal_mesh);
|
||||
|
||||
// 4) Remove degenerate geometry
|
||||
PMP::remove_degenerate_faces(cgal_mesh);
|
||||
PMP::remove_isolated_vertices(cgal_mesh);
|
||||
|
||||
// 5) Fix remaining non-manifold vertices
|
||||
PMP::duplicate_non_manifold_vertices(cgal_mesh);
|
||||
|
||||
// 6) Boolean union (keeps only outer shell)
|
||||
_EpicMesh tmp;
|
||||
if (PMP::corefine_and_compute_union(cgal_mesh, cgal_mesh, tmp)) {
|
||||
cgal_mesh = std::move(tmp);
|
||||
}
|
||||
// If it fails, continue anyway with previous mesh
|
||||
|
||||
// 7) Fill holes
|
||||
if (!CGAL::is_closed(cgal_mesh)) {
|
||||
using halfedge_descriptor = boost::graph_traits<_EpicMesh>::halfedge_descriptor;
|
||||
|
||||
std::vector<halfedge_descriptor> borders;
|
||||
PMP::extract_boundary_cycles(cgal_mesh, std::back_inserter(borders));
|
||||
|
||||
for (halfedge_descriptor h : borders) {
|
||||
PMP::triangulate_and_refine_hole(cgal_mesh, h);
|
||||
}
|
||||
}
|
||||
|
||||
// 8) Final validity check
|
||||
if (!CGAL::is_closed(cgal_mesh)) {
|
||||
if (error)
|
||||
*error = "Repair failed: mesh still open after hole filling.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 9) Ensure outward orientation
|
||||
if (!PMP::does_bound_a_volume(cgal_mesh))
|
||||
PMP::orient_to_bound_a_volume(cgal_mesh);
|
||||
|
||||
// 10) Convert back
|
||||
indexed_triangle_set its = cgal_to_indexed_triangle_set(cgal_mesh);
|
||||
|
||||
RepairedMeshErrors errs{};
|
||||
errs.facets_removed = 0;
|
||||
errs.edges_fixed = 0;
|
||||
|
||||
mesh = TriangleMesh(std::move(its), errs);
|
||||
|
||||
if (repaired_errors)
|
||||
*repaired_errors = errs;
|
||||
|
||||
return true;
|
||||
} catch (const std::exception& e) {
|
||||
if (error)
|
||||
*error = e.what();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
CGALMeshPtr clone(const CGALMesh &m)
|
||||
{
|
||||
return CGALMeshPtr{new CGALMesh{m}};
|
||||
|
||||
@@ -70,6 +70,9 @@ TriangleMesh merge(std::vector<TriangleMesh> meshes);
|
||||
|
||||
bool does_bound_a_volume(const CGALMesh &mesh);
|
||||
bool empty(const CGALMesh &mesh);
|
||||
|
||||
// Repair a mesh using CGAL. Returns true on success. Optionally returns a summary of repairs and an error string.
|
||||
bool repair(TriangleMesh &mesh, RepairedMeshErrors *repaired_errors = nullptr, std::string *error = nullptr);
|
||||
}
|
||||
|
||||
namespace mcut {
|
||||
|
||||
@@ -323,7 +323,7 @@ Model Model::read_from_file(const std::string&
|
||||
// BBS: backup & restore
|
||||
//FIXME options & LoadStrategy::CheckVersion ?
|
||||
//BBS: is_xxx is used for is_bbs_3mf when load 3mf
|
||||
result = load_bbs_3mf(input_file.c_str(), config, config_substitutions, &model, plate_data, project_presets, is_xxx, file_version, proFn, options, project, plate_id);
|
||||
result = load_bbs_3mf(input_file.c_str(), config, config_substitutions, &model, plate_data, project_presets, is_xxx, nullptr, file_version, proFn, options, project, plate_id);
|
||||
#ifdef __APPLE__
|
||||
else if (boost::algorithm::iends_with(input_file, ".usd") || boost::algorithm::iends_with(input_file, ".usda") ||
|
||||
boost::algorithm::iends_with(input_file, ".usdc") || boost::algorithm::iends_with(input_file, ".usdz") ||
|
||||
@@ -382,7 +382,8 @@ Model Model::read_from_archive(const std::string& input_file, DynamicPrintConfig
|
||||
Model model;
|
||||
|
||||
bool result = false;
|
||||
bool is_bbl_3mf;
|
||||
bool is_bbl_3mf = false;
|
||||
bool is_orca_3mf = false;
|
||||
if (boost::algorithm::iends_with(input_file, ".3mf")) {
|
||||
PrusaFileParser prusa_file_parser;
|
||||
if (prusa_file_parser.check_3mf_from_prusa(input_file)) {
|
||||
@@ -392,7 +393,7 @@ Model Model::read_from_archive(const std::string& input_file, DynamicPrintConfig
|
||||
} else {
|
||||
// BBS: add part plate related logic
|
||||
// BBS: backup & restore
|
||||
result = load_bbs_3mf(input_file.c_str(), config, config_substitutions, &model, plate_data, project_presets, &is_bbl_3mf, file_version, proFn, options, project);
|
||||
result = load_bbs_3mf(input_file.c_str(), config, config_substitutions, &model, plate_data, project_presets, &is_bbl_3mf, &is_orca_3mf, file_version, proFn, options, project);
|
||||
}
|
||||
}
|
||||
else if (boost::algorithm::iends_with(input_file, ".zip.amf"))
|
||||
@@ -401,7 +402,10 @@ Model Model::read_from_archive(const std::string& input_file, DynamicPrintConfig
|
||||
throw Slic3r::RuntimeError(_L("Unknown file format. Input file must have .3mf or .zip.amf extension."));
|
||||
|
||||
if (out_file_type != En3mfType::From_Prusa) {
|
||||
out_file_type = is_bbl_3mf ? En3mfType::From_BBS : En3mfType::From_Other;
|
||||
if (is_orca_3mf)
|
||||
out_file_type = En3mfType::From_Orca;
|
||||
else
|
||||
out_file_type = is_bbl_3mf ? En3mfType::From_BBS : En3mfType::From_Other;
|
||||
}
|
||||
|
||||
if (!result)
|
||||
|
||||
@@ -719,6 +719,7 @@ enum class ConversionType : int {
|
||||
};
|
||||
|
||||
enum class En3mfType : int {
|
||||
From_Orca,
|
||||
From_BBS,
|
||||
From_Prusa,
|
||||
From_Other
|
||||
|
||||
@@ -1562,9 +1562,9 @@ void PerimeterGenerator::process_classic()
|
||||
} // for each loop of an island
|
||||
|
||||
// fill gaps
|
||||
if (! gaps.empty()) {
|
||||
// collapse
|
||||
double min = 0.2 * perimeter_width * (1 - INSET_OVERLAP_TOLERANCE);
|
||||
if (! gaps.empty()) { // collapse
|
||||
// ORCA: Use the smaller width as the lower bound to avoid overestimating safe overlap
|
||||
double min = 0.2 * std::min(perimeter_width, ext_perimeter_width) * (1 - INSET_OVERLAP_TOLERANCE);
|
||||
double max = 2. * perimeter_spacing;
|
||||
ExPolygons gaps_ex = diff_ex(
|
||||
//FIXME offset2 would be enough and cheaper.
|
||||
@@ -1870,6 +1870,20 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim
|
||||
bridges_temp = diff_ex(bridges_temp, unbridgeable);
|
||||
unsupported_filtered = offset_ex(bridges_temp, offset_to_do);
|
||||
unsupported_filtered = intersection_ex(unsupported_filtered, reference);
|
||||
|
||||
// Normalize anchor size for partial bridges:
|
||||
// derive the bridge core first, then add a fixed overlap into support.
|
||||
const coordf_t anchor_overlap = bridged_infill_margin;
|
||||
ExPolygons bridge_core = diff_ex(unsupported_filtered, support, ApplySafetyOffset::Yes);
|
||||
if (bridge_core.empty()) {
|
||||
bridge_core = unsupported_filtered;
|
||||
}
|
||||
ExPolygons anchor_overlap_area = intersection_ex(
|
||||
offset_ex(bridge_core, anchor_overlap),
|
||||
support,
|
||||
ApplySafetyOffset::Yes);
|
||||
unsupported_filtered = union_ex(bridge_core, anchor_overlap_area);
|
||||
unsupported_filtered = intersection_ex(unsupported_filtered, reference);
|
||||
// } else {
|
||||
// ExPolygons unbridgeable = intersection_ex(unsupported, diff_ex(unsupported_filtered, offset_ex(bridgeable_simplified, ext_perimeter_width / 2)));
|
||||
// unbridgeable = offset2_ex(unbridgeable, -ext_perimeter_width, ext_perimeter_width);
|
||||
|
||||
@@ -910,7 +910,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||
"top_surface_speed", "support_speed", "support_object_xy_distance", "support_object_first_layer_gap", "support_interface_speed",
|
||||
"bridge_speed", "internal_bridge_speed", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed",
|
||||
"outer_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle", "skirt_height","single_loop_draft_shield", "draft_shield",
|
||||
"brim_width", "brim_object_gap", "brim_use_efc_outline", "combine_brims", "brim_type", "brim_ears_max_angle", "brim_ears_detection_length", "enable_support", "support_type", "support_threshold_angle", "support_threshold_overlap","enforce_support_layers",
|
||||
"brim_width", "brim_object_gap", "brim_flow_ratio", "brim_use_efc_outline", "combine_brims", "brim_type", "brim_ears_max_angle", "brim_ears_detection_length", "enable_support", "support_type", "support_threshold_angle", "support_threshold_overlap","enforce_support_layers",
|
||||
"raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion",
|
||||
"support_base_pattern", "support_base_pattern_spacing", "support_expansion", "support_style",
|
||||
// BBS
|
||||
@@ -940,8 +940,8 @@ static std::vector<std::string> s_Preset_print_options {
|
||||
"support_bottom_interface_spacing", "enable_overhang_speed", "slowdown_for_curled_perimeters", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed",
|
||||
"initial_layer_infill_speed", "only_one_wall_top",
|
||||
"timelapse_type",
|
||||
"wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
||||
"wall_distribution_count", "min_feature_size", "min_bead_width", "post_process", "min_length_factor",
|
||||
"wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
||||
"wall_distribution_count", "min_feature_size", "min_bead_width", "post_process", "process_change_extrusion_role_gcode", "min_length_factor",
|
||||
"small_perimeter_speed", "small_perimeter_threshold","bridge_angle","internal_bridge_angle", "filter_out_gap_fill", "travel_acceleration","inner_wall_acceleration", "min_width_top_surface",
|
||||
"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk","default_junction_deviation",
|
||||
"top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer", "print_flow_ratio", "seam_gap",
|
||||
@@ -950,7 +950,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||
"bridge_density","internal_bridge_density", "precise_outer_wall", "bridge_acceleration",
|
||||
"sparse_infill_acceleration", "internal_solid_infill_acceleration", "tree_support_auto_brim",
|
||||
"tree_support_brim_width", "gcode_comments", "gcode_label_objects",
|
||||
"initial_layer_travel_speed", "exclude_object", "slow_down_layers", "infill_anchor", "infill_anchor_max","initial_layer_min_bead_width",
|
||||
"initial_layer_travel_speed", "initial_layer_travel_acceleration", "initial_layer_travel_jerk", "exclude_object", "slow_down_layers", "infill_anchor", "infill_anchor_max","initial_layer_min_bead_width",
|
||||
"make_overhang_printable", "make_overhang_printable_angle", "make_overhang_printable_hole_size" ,"notes",
|
||||
"wipe_tower_cone_angle", "wipe_tower_extra_spacing","wipe_tower_max_purge_speed",
|
||||
"wipe_tower_wall_type", "wipe_tower_extra_rib_length", "wipe_tower_rib_width", "wipe_tower_fillet_wall",
|
||||
@@ -979,9 +979,9 @@ static std::vector<std::string> s_Preset_filament_options {/*"filament_colour",
|
||||
//BBS:temperature_vitrification
|
||||
"temperature_vitrification", "reduce_fan_stop_start_freq","dont_slow_down_outer_wall", "slow_down_for_layer_cooling", "fan_min_speed",
|
||||
"fan_max_speed", "enable_overhang_bridge_fan", "overhang_fan_speed", "overhang_fan_threshold", "close_fan_the_first_x_layers", "full_fan_speed_layer", "fan_cooling_layer_time", "slow_down_layer_time", "slow_down_min_speed",
|
||||
"filament_start_gcode", "filament_end_gcode",
|
||||
"filament_start_gcode", "filament_end_gcode", "filament_change_extrusion_role_gcode",
|
||||
//exhaust fan control
|
||||
"activate_air_filtration","during_print_exhaust_fan_speed","complete_print_exhaust_fan_speed",
|
||||
"activate_air_filtration","activate_air_filtration_during_print","activate_air_filtration_on_completion","during_print_exhaust_fan_speed","complete_print_exhaust_fan_speed",
|
||||
// Retract overrides
|
||||
"filament_retraction_length", "filament_z_hop", "filament_z_hop_types", "filament_retract_lift_above", "filament_retract_lift_below", "filament_retract_lift_enforce", "filament_retraction_speed", "filament_deretraction_speed", "filament_retract_restart_extra", "filament_retraction_minimum_travel",
|
||||
"filament_retract_when_changing_layer", "filament_wipe", "filament_retract_before_wipe",
|
||||
|
||||
@@ -2205,16 +2205,32 @@ void PresetBundle::set_num_filaments(unsigned int n, std::vector<std::string> ne
|
||||
filament_presets.resize(n);
|
||||
}
|
||||
ConfigOptionStrings* filament_color = project_config.option<ConfigOptionStrings>("filament_colour");
|
||||
ConfigOptionStrings *filament_multi_color = project_config.option<ConfigOptionStrings>("filament_multi_colour");
|
||||
ConfigOptionStrings* filament_color_type = project_config.option<ConfigOptionStrings>("filament_colour_type");
|
||||
ConfigOptionInts* filament_map = project_config.option<ConfigOptionInts>("filament_map");
|
||||
|
||||
|
||||
filament_color->resize(n);
|
||||
// Sync filament multi colour
|
||||
filament_multi_color->values.resize(n);
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
filament_multi_color->values[i] = filament_color->values[i];
|
||||
}
|
||||
filament_color_type->resize(n);
|
||||
filament_map->values.resize(n, 1);
|
||||
ams_multi_color_filment.resize(n);
|
||||
|
||||
// BBS set new filament color to new_color
|
||||
if (old_filament_count < n) {
|
||||
if (!new_colors.empty()) {
|
||||
for (int i = old_filament_count; i < n; i++) {
|
||||
filament_color->values[i] = new_colors[i - old_filament_count];
|
||||
filament_multi_color->values[i] = new_colors[i - old_filament_count];
|
||||
filament_color_type->values[i] = "1"; // default color type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
update_multi_material_filament_presets();
|
||||
}
|
||||
void PresetBundle::set_num_filaments(unsigned int n, std::string new_color)
|
||||
|
||||
@@ -219,6 +219,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||
"ironing_fan_speed",
|
||||
"single_extruder_multi_material_priming",
|
||||
"activate_air_filtration",
|
||||
"activate_air_filtration_during_print",
|
||||
"activate_air_filtration_on_completion",
|
||||
"during_print_exhaust_fan_speed",
|
||||
"complete_print_exhaust_fan_speed",
|
||||
"activate_chamber_temp_control",
|
||||
@@ -343,6 +345,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||
|| opt_key == "travel_speed_z"
|
||||
|| opt_key == "initial_layer_speed"
|
||||
|| opt_key == "initial_layer_travel_speed"
|
||||
|| opt_key == "initial_layer_travel_acceleration"
|
||||
|| opt_key == "initial_layer_travel_jerk"
|
||||
|| opt_key == "slow_down_layers"
|
||||
|| opt_key == "idle_temperature"
|
||||
|| opt_key == "wipe_tower_cone_angle"
|
||||
|
||||
@@ -1584,6 +1584,17 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.));
|
||||
|
||||
def = this->add("brim_flow_ratio", coFloat);
|
||||
def->label = L("Brim flow ratio");
|
||||
def->category = L("Support");
|
||||
def->tooltip = L("This factor affects the amount of material for brims.\n\n"
|
||||
"The actual brim flow used is calculated by multiplying this value by the filament flow ratio, and if set, the object's flow ratio.\n\n"
|
||||
"Note: The resulting value will not be affected by the first-layer flow ratio.");
|
||||
def->min = 0;
|
||||
def->max = 2;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(1));
|
||||
|
||||
def = this->add("brim_use_efc_outline", coBool);
|
||||
def->label = L("Brim follows compensated outline");
|
||||
def->category = L("Support");
|
||||
@@ -1741,6 +1752,19 @@ void PrintConfigDef::init_fff_params()
|
||||
def->tooltip = L("Activate for better air filtration. G-code command: M106 P3 S(0-255)");
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionBools{false});
|
||||
|
||||
|
||||
def = this->add("activate_air_filtration_during_print", coBools);
|
||||
def->full_label = L("During print");
|
||||
def->tooltip=L("Enable this to override the fan speed set in custom G-code during print.");
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionBools{true});
|
||||
|
||||
def = this->add("activate_air_filtration_on_completion", coBools);
|
||||
def->full_label = L("On completion");
|
||||
def->tooltip=L("Enable this to override the fan speed set in custom G-code after print completion.");
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionBools{true});
|
||||
|
||||
def = this->add("during_print_exhaust_fan_speed", coInts);
|
||||
def->label = L("Fan speed");
|
||||
@@ -3032,6 +3056,15 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(300));
|
||||
|
||||
def = this->add("initial_layer_travel_acceleration", coFloatOrPercent);
|
||||
def->label = L("First layer travel");
|
||||
def->tooltip = L("Travel acceleration of first layer.\nThe percentage value is relative to Travel Acceleration.");
|
||||
def->sidetext = L("mm/s² or %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->ratio_over = "travel_acceleration";
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
|
||||
|
||||
def = this->add("accel_to_decel_enable", coBool);
|
||||
def->label = L("Enable accel_to_decel");
|
||||
def->category = L("Speed");
|
||||
@@ -3122,6 +3155,15 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(12));
|
||||
|
||||
def = this->add("initial_layer_travel_jerk", coFloatOrPercent);
|
||||
def->label = L("First layer travel");
|
||||
def->tooltip = L("Travel jerk of first layer.\nThe percentage value is relative to Travel Jerk.");
|
||||
def->sidetext = L("mm/s or %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->ratio_over = "travel_jerk";
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
|
||||
|
||||
def = this->add("initial_layer_line_width", coFloatOrPercent);
|
||||
def->label = L("First layer");
|
||||
def->category = L("Quality");
|
||||
@@ -4633,6 +4675,15 @@ void PrintConfigDef::init_fff_params()
|
||||
def->height = 6;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionStrings());
|
||||
|
||||
def = this->add("process_change_extrusion_role_gcode", coString);
|
||||
def->label = L("Change extrusion role G-code (process)");
|
||||
def->tooltip = L("This G-code is inserted when the extrusion role is changed. It runs after the machine and filament extrusion role G-code.");
|
||||
def->multiline = true;
|
||||
def->full_width = true;
|
||||
def->height = 5;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionString());
|
||||
|
||||
def = this->add("printer_model", coString);
|
||||
def->label = L("Printer type");
|
||||
@@ -6286,6 +6337,15 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionString());
|
||||
|
||||
def = this->add("filament_change_extrusion_role_gcode", coStrings);
|
||||
def->label = L("Change extrusion role G-code (filament)");
|
||||
def->tooltip = L("This G-code is inserted when the extrusion role is changed for the active filament.");
|
||||
def->multiline = true;
|
||||
def->full_width = true;
|
||||
def->height = 5;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionStrings{ "" });
|
||||
|
||||
def = this->add("top_surface_line_width", coFloatOrPercent);
|
||||
def->label = L("Top surface");
|
||||
def->category = L("Quality");
|
||||
@@ -7938,7 +7998,12 @@ std::set<std::string> filament_options_with_variant = {
|
||||
"filament_ironing_flow",
|
||||
"filament_ironing_spacing",
|
||||
"filament_ironing_inset",
|
||||
"filament_ironing_speed"
|
||||
"filament_ironing_speed",
|
||||
"activate_air_filtration",
|
||||
"activate_air_filtration_during_print",
|
||||
"activate_air_filtration_on_completion",
|
||||
"during_print_exhaust_fan_speed",
|
||||
"complete_print_exhaust_fan_speed"
|
||||
};
|
||||
|
||||
// Parameters that are the same as the number of extruders
|
||||
@@ -10773,6 +10838,8 @@ static std::map<t_custom_gcode_key, t_config_option_keys> s_CustomGcodeSpecificP
|
||||
"travel_point_1_x", "travel_point_1_y", "travel_point_2_x", "travel_point_2_y", "travel_point_3_x",
|
||||
"travel_point_3_y", "x_after_toolchange", "y_after_toolchange", "z_after_toolchange"}},
|
||||
{"change_extrusion_role_gcode", {"layer_num", "layer_z", "extrusion_role", "last_extrusion_role"}},
|
||||
{"filament_change_extrusion_role_gcode", {"layer_num", "layer_z", "extrusion_role", "last_extrusion_role"}},
|
||||
{"process_change_extrusion_role_gcode", {"layer_num", "layer_z", "extrusion_role", "last_extrusion_role"}},
|
||||
{"printing_by_object_gcode", {}},
|
||||
{"machine_pause_gcode", {}},
|
||||
{"template_custom_gcode", {}},
|
||||
|
||||
@@ -888,6 +888,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
PrintObjectConfig,
|
||||
|
||||
((ConfigOptionFloat, brim_object_gap))
|
||||
((ConfigOptionFloat, brim_flow_ratio))
|
||||
((ConfigOptionBool, brim_use_efc_outline))
|
||||
((ConfigOptionEnum<BrimType>, brim_type))
|
||||
((ConfigOptionFloat, brim_width))
|
||||
@@ -1351,6 +1352,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
((ConfigOptionBool, wipe_tower_no_sparse_layers))
|
||||
((ConfigOptionString, change_filament_gcode))
|
||||
((ConfigOptionString, change_extrusion_role_gcode))
|
||||
((ConfigOptionString, process_change_extrusion_role_gcode))
|
||||
((ConfigOptionStrings, filament_change_extrusion_role_gcode))
|
||||
((ConfigOptionFloat, travel_speed))
|
||||
((ConfigOptionFloat, travel_speed_z))
|
||||
((ConfigOptionBool, silent_mode))
|
||||
@@ -1377,6 +1380,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
((ConfigOptionBool, accel_to_decel_enable))
|
||||
((ConfigOptionPercent, accel_to_decel_factor))
|
||||
((ConfigOptionFloatOrPercent, initial_layer_travel_speed))
|
||||
((ConfigOptionFloatOrPercent, initial_layer_travel_acceleration))
|
||||
((ConfigOptionFloatOrPercent, initial_layer_travel_jerk))
|
||||
((ConfigOptionBool, bbl_calib_mark_logo))
|
||||
((ConfigOptionBool, disable_m73))
|
||||
|
||||
@@ -1471,6 +1476,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
|
||||
((ConfigOptionBools, dont_slow_down_outer_wall))
|
||||
((ConfigOptionFloats, fan_cooling_layer_time))
|
||||
((ConfigOptionBools, activate_air_filtration))
|
||||
((ConfigOptionBools, activate_air_filtration_during_print))
|
||||
((ConfigOptionBools, activate_air_filtration_on_completion))
|
||||
((ConfigOptionInts, during_print_exhaust_fan_speed))
|
||||
((ConfigOptionInts, complete_print_exhaust_fan_speed))
|
||||
((ConfigOptionFloatOrPercent, initial_layer_line_width))
|
||||
|
||||
@@ -1300,7 +1300,6 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||
|| opt_key == "scarf_angle_threshold"
|
||||
|| opt_key == "scarf_overhang_threshold"
|
||||
|| opt_key == "scarf_joint_speed"
|
||||
|| opt_key == "scarf_joint_flow_ratio"
|
||||
|| opt_key == "seam_slope_start_height"
|
||||
|| opt_key == "seam_slope_entire_loop"
|
||||
|| opt_key == "seam_slope_min_length"
|
||||
@@ -1324,7 +1323,24 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||
|| opt_key == "bed_mesh_min"
|
||||
|| opt_key == "bed_mesh_max"
|
||||
|| opt_key == "adaptive_bed_mesh_margin"
|
||||
|| opt_key == "bed_mesh_probe_distance") {
|
||||
|| opt_key == "bed_mesh_probe_distance"
|
||||
|| opt_key == "print_flow_ratio"
|
||||
|| opt_key == "first_layer_flow_ratio"
|
||||
|| opt_key == "top_solid_infill_flow_ratio"
|
||||
|| opt_key == "bottom_solid_infill_flow_ratio"
|
||||
|| opt_key == "outer_wall_flow_ratio"
|
||||
|| opt_key == "inner_wall_flow_ratio"
|
||||
|| opt_key == "overhang_flow_ratio"
|
||||
|| opt_key == "sparse_infill_flow_ratio"
|
||||
|| opt_key == "internal_solid_infill_flow_ratio"
|
||||
|| opt_key == "gap_fill_flow_ratio"
|
||||
|| opt_key == "support_flow_ratio"
|
||||
|| opt_key == "support_interface_flow_ratio"
|
||||
|| opt_key == "brim_flow_ratio"
|
||||
|| opt_key == "filament_flow_ratio"
|
||||
|| opt_key == "scarf_joint_flow_ratio"
|
||||
|| opt_key == "spiral_starting_flow_ratio"
|
||||
|| opt_key == "spiral_finishing_flow_ratio") {
|
||||
invalidated |= m_print->invalidate_step(psGCodeExport);
|
||||
} else if (
|
||||
opt_key == "flush_into_infill"
|
||||
|
||||
@@ -2882,8 +2882,9 @@ SupportGeneratorLayersPtr PrintObjectSupportMaterial::raft_and_intermediate_supp
|
||||
intermediate_layers.push_back(&layer_new);
|
||||
}
|
||||
} else {
|
||||
// Insert intermediate layers.
|
||||
size_t n_layers_extra = size_t(ceil(dist / m_slicing_params.max_suport_layer_height));
|
||||
// ORCA: Bias by EPSILON so a gap effectively equal to
|
||||
// max_suport_layer_height is not split by floating-point noise.
|
||||
size_t n_layers_extra = size_t(ceil((dist - EPSILON) / m_slicing_params.max_suport_layer_height));
|
||||
assert(n_layers_extra > 0);
|
||||
coordf_t step = dist / coordf_t(n_layers_extra);
|
||||
if (extr1 != nullptr && extr1->layer_type == SupporLayerType::TopContact &&
|
||||
@@ -2898,7 +2899,9 @@ SupportGeneratorLayersPtr PrintObjectSupportMaterial::raft_and_intermediate_supp
|
||||
layer_new.height = extr1->height;
|
||||
intermediate_layers.push_back(&layer_new);
|
||||
dist = extr2z - extr1z;
|
||||
n_layers_extra = size_t(ceil(dist / m_slicing_params.max_suport_layer_height));
|
||||
// ORCA: Recalculate with the same EPSILON bias after re-anchoring at the top
|
||||
// contact layer so near-equal gaps do not gain an extra split here either.
|
||||
n_layers_extra = size_t(ceil((dist - EPSILON) / m_slicing_params.max_suport_layer_height));
|
||||
if (n_layers_extra == 0)
|
||||
continue;
|
||||
// Continue printing the other layers up to extr2z.
|
||||
|
||||
@@ -1157,12 +1157,17 @@ void TreeSupport::create_tree_support_layers()
|
||||
|
||||
// Layers between the raft contacts and bottom of the object.
|
||||
double dist_to_go = m_slicing_params.object_print_z_min - raft_print_z;
|
||||
auto nsteps = int(ceil(dist_to_go / m_slicing_params.max_suport_layer_height));
|
||||
double height = dist_to_go / nsteps;
|
||||
for (int i = 0; i < nsteps; ++i) {
|
||||
raft_print_z += height;
|
||||
raft_slice_z = raft_print_z - height / 2;
|
||||
m_object->add_tree_support_layer(layer_id++, height, raft_print_z, raft_slice_z);
|
||||
// ORCA: Guard tiny residual raft-to-object gaps so the EPSILON-biased ceil()
|
||||
// below cannot turn them into zero steps after floating-point accumulation.
|
||||
if (dist_to_go > EPSILON) {
|
||||
// ORCA: Bias by EPSILON so near-equal gaps do not get an extra split from FP noise.
|
||||
auto nsteps = int(ceil((dist_to_go - EPSILON) / m_slicing_params.max_suport_layer_height));
|
||||
double height = dist_to_go / nsteps;
|
||||
for (int i = 0; i < nsteps; ++i) {
|
||||
raft_print_z += height;
|
||||
raft_slice_z = raft_print_z - height / 2;
|
||||
m_object->add_tree_support_layer(layer_id++, height, raft_print_z, raft_slice_z);
|
||||
}
|
||||
}
|
||||
m_raft_layers = layer_id;
|
||||
}
|
||||
|
||||
@@ -343,7 +343,8 @@ public:
|
||||
}
|
||||
if (double dist_to_go = slicing_params.object_print_z_min - z; dist_to_go > EPSILON) {
|
||||
// Layers between the raft contacts and bottom of the object.
|
||||
auto nsteps = int(ceil(dist_to_go / slicing_params.max_suport_layer_height));
|
||||
// ORCA: Bias by EPSILON so near-equal gaps do not get an extra split from FP noise.
|
||||
auto nsteps = int(ceil((dist_to_go - EPSILON) / slicing_params.max_suport_layer_height));
|
||||
double step = dist_to_go / nsteps;
|
||||
for (int i = 0; i < nsteps; ++ i) {
|
||||
z += step;
|
||||
@@ -754,4 +755,4 @@ enum class LineStatus
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif // slic3r_TreeSupportCommon_hpp
|
||||
#endif // slic3r_TreeSupportCommon_hpp
|
||||
|
||||
@@ -71,8 +71,8 @@ namespace Timing {
|
||||
static TimeLimitAlarm new_nanos(uint64_t time_limit_nanoseconds, std::string_view limit_exceeded_message) {
|
||||
return TimeLimitAlarm(time_limit_nanoseconds, limit_exceeded_message);
|
||||
}
|
||||
static TimeLimitAlarm new_milis(uint64_t time_limit_milis, std::string_view limit_exceeded_message) {
|
||||
return TimeLimitAlarm(uint64_t(time_limit_milis) * 1000000l, limit_exceeded_message);
|
||||
static TimeLimitAlarm new_millis(uint64_t time_limit_millis, std::string_view limit_exceeded_message) {
|
||||
return TimeLimitAlarm(uint64_t(time_limit_millis) * 1000000l, limit_exceeded_message);
|
||||
}
|
||||
static TimeLimitAlarm new_seconds(uint64_t time_limit_seconds, std::string_view limit_exceeded_message) {
|
||||
return TimeLimitAlarm(uint64_t(time_limit_seconds) * 1000000000l, limit_exceeded_message);
|
||||
|
||||
@@ -91,6 +91,16 @@ struct PathVertex
|
||||
// Pressure advance value
|
||||
//
|
||||
float pressure_advance{ 0.0f };
|
||||
//
|
||||
// ORCA: Add Acceleration visualization support
|
||||
// Acceleration value
|
||||
//
|
||||
float acceleration{ 0.0f };
|
||||
//
|
||||
// ORCA: Add Jerk visualization support
|
||||
// Jerk value
|
||||
//
|
||||
float jerk{ 0.0f };
|
||||
|
||||
//
|
||||
// Return true if the segment is an extrusion move
|
||||
|
||||
@@ -94,6 +94,10 @@ enum class EViewType : uint8_t
|
||||
Temperature,
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
PressureAdvance,
|
||||
// ORCA: Add Acceleration visualization support
|
||||
Acceleration,
|
||||
// ORCA: Add Jerk visualization support
|
||||
Jerk,
|
||||
Tool,
|
||||
COUNT
|
||||
};
|
||||
|
||||
@@ -171,6 +171,10 @@ public:
|
||||
// EViewType::Temperature
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
// EViewType::PressureAdvance
|
||||
// ORCA: Add Acceleration visualization support
|
||||
// EViewType::Acceleration
|
||||
// ORCA: Add Jerk visualization support
|
||||
// EViewType::Jerk
|
||||
// EViewType::VolumetricFlowRate
|
||||
// EViewType::ActualVolumetricFlowRate
|
||||
// EViewType::LayerTimeLinear
|
||||
@@ -189,6 +193,10 @@ public:
|
||||
// EViewType::Temperature
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
// EViewType::PressureAdvance
|
||||
// ORCA: Add Acceleration visualization support
|
||||
// EViewType::Acceleration
|
||||
// ORCA: Add Jerk visualization support
|
||||
// EViewType::Jerk
|
||||
// EViewType::VolumetricFlowRate
|
||||
// EViewType::ActualVolumetricFlowRate
|
||||
// EViewType::LayerTimeLinear
|
||||
|
||||
@@ -1469,7 +1469,7 @@ Color ViewerImpl::get_vertex_color(const PathVertex& v) const
|
||||
if (v.type == EMoveType::Noop)
|
||||
return DUMMY_COLOR;
|
||||
|
||||
if ((v.is_wipe() && (m_settings.view_type != EViewType::Speed && m_settings.view_type != EViewType::ActualSpeed)) || v.is_option())
|
||||
if ((v.is_wipe() && (m_settings.view_type != EViewType::Speed && m_settings.view_type != EViewType::ActualSpeed && m_settings.view_type != EViewType::Acceleration && m_settings.view_type != EViewType::Jerk)) || v.is_option())
|
||||
return get_option_color(move_type_to_option(v.type));
|
||||
|
||||
switch (m_settings.view_type)
|
||||
@@ -1507,6 +1507,16 @@ Color ViewerImpl::get_vertex_color(const PathVertex& v) const
|
||||
{
|
||||
return v.is_travel() ? get_option_color(move_type_to_option(v.type)) : m_pressure_advance_range.get_color_at(v.pressure_advance);
|
||||
}
|
||||
// ORCA: Add Acceleration visualization support
|
||||
case EViewType::Acceleration:
|
||||
{
|
||||
return m_acceleration_range.get_color_at(v.acceleration);
|
||||
}
|
||||
// ORCA: Add Jerk visualization support
|
||||
case EViewType::Jerk:
|
||||
{
|
||||
return m_jerk_range.get_color_at(v.jerk);
|
||||
}
|
||||
case EViewType::VolumetricFlowRate:
|
||||
{
|
||||
return v.is_travel() ? get_option_color(move_type_to_option(v.type)) : m_volumetric_rate_range.get_color_at(v.volumetric_rate());
|
||||
@@ -1598,6 +1608,10 @@ const ColorRange& ViewerImpl::get_color_range(EViewType type) const
|
||||
case EViewType::Temperature: { return m_temperature_range; }
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
case EViewType::PressureAdvance: { return m_pressure_advance_range; }
|
||||
// ORCA: Add Acceleration visualization support
|
||||
case EViewType::Acceleration: { return m_acceleration_range; }
|
||||
// ORCA: Add Jerk visualization support
|
||||
case EViewType::Jerk: { return m_jerk_range; }
|
||||
case EViewType::VolumetricFlowRate: { return m_volumetric_rate_range; }
|
||||
case EViewType::ActualVolumetricFlowRate: { return m_actual_volumetric_rate_range; }
|
||||
case EViewType::LayerTimeLinear: { return m_layer_time_range[0]; }
|
||||
@@ -1618,6 +1632,10 @@ void ViewerImpl::set_color_range_palette(EViewType type, const Palette& palette)
|
||||
case EViewType::Temperature: { m_temperature_range.set_palette(palette); break; }
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
case EViewType::PressureAdvance: { m_pressure_advance_range.set_palette(palette); break; }
|
||||
// ORCA: Add Acceleration visualization support
|
||||
case EViewType::Acceleration: { m_acceleration_range.set_palette(palette); break; }
|
||||
// ORCA: Add Jerk visualization support
|
||||
case EViewType::Jerk: { m_jerk_range.set_palette(palette); break; }
|
||||
case EViewType::VolumetricFlowRate: { m_volumetric_rate_range.set_palette(palette); break; }
|
||||
case EViewType::ActualVolumetricFlowRate: { m_actual_volumetric_rate_range.set_palette(palette); break; }
|
||||
case EViewType::LayerTimeLinear: { m_layer_time_range[0].set_palette(palette); break; }
|
||||
@@ -1657,6 +1675,10 @@ size_t ViewerImpl::get_used_cpu_memory() const
|
||||
ret += m_temperature_range.size_in_bytes_cpu();
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
ret += m_pressure_advance_range.size_in_bytes_cpu();
|
||||
// ORCA: Add Acceleration visualization support
|
||||
ret += m_acceleration_range.size_in_bytes_cpu();
|
||||
// ORCA: Add Jerk visualization support
|
||||
ret += m_jerk_range.size_in_bytes_cpu();
|
||||
ret += m_volumetric_rate_range.size_in_bytes_cpu();
|
||||
ret += m_actual_volumetric_rate_range.size_in_bytes_cpu();
|
||||
for (size_t i = 0; i < COLOR_RANGE_TYPES_COUNT; ++i) {
|
||||
@@ -1809,6 +1831,10 @@ void ViewerImpl::update_color_ranges()
|
||||
m_temperature_range.reset();
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
m_pressure_advance_range.reset();
|
||||
// ORCA: Add Acceleration visualization support
|
||||
m_acceleration_range.reset();
|
||||
// ORCA: Add Jerk visualization support
|
||||
m_jerk_range.reset();
|
||||
m_volumetric_rate_range.reset();
|
||||
m_actual_volumetric_rate_range.reset();
|
||||
m_layer_time_range[0].reset(); // ColorRange::EType::Linear
|
||||
@@ -1834,6 +1860,10 @@ void ViewerImpl::update_color_ranges()
|
||||
v.is_extrusion()) {
|
||||
m_speed_range.update(v.feedrate);
|
||||
m_actual_speed_range.update(v.actual_feedrate);
|
||||
// ORCA: Add Acceleration visualization support
|
||||
m_acceleration_range.update(v.acceleration);
|
||||
// ORCA: Add Jerk visualization support
|
||||
m_jerk_range.update(v.jerk);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -291,6 +291,10 @@ private:
|
||||
ColorRange m_temperature_range;
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
ColorRange m_pressure_advance_range;
|
||||
// ORCA: Add Acceleration visualization support
|
||||
ColorRange m_acceleration_range;
|
||||
// ORCA: Add Jerk visualization support
|
||||
ColorRange m_jerk_range;
|
||||
ColorRange m_volumetric_rate_range;
|
||||
ColorRange m_actual_volumetric_rate_range;
|
||||
std::array<ColorRange, COLOR_RANGE_TYPES_COUNT> m_layer_time_range{
|
||||
|
||||
@@ -170,6 +170,8 @@ set(SLIC3R_GUI_SOURCES
|
||||
GUI/Gizmos/GLGizmosManager.hpp
|
||||
GUI/Gizmos/GLGizmoSVG.cpp
|
||||
GUI/Gizmos/GLGizmoSVG.hpp
|
||||
GUI/Gizmos/GLGizmoUtils.cpp
|
||||
GUI/Gizmos/GLGizmoUtils.hpp
|
||||
#GUI/Gizmos/GLGizmoText.cpp
|
||||
#GUI/Gizmos/GLGizmoText.hpp
|
||||
GUI/GLCanvas3D.cpp
|
||||
@@ -580,8 +582,8 @@ set(SLIC3R_GUI_SOURCES
|
||||
Utils/ESP3D.hpp
|
||||
Utils/FileHelp.cpp
|
||||
Utils/FileHelp.hpp
|
||||
Utils/FixModelByWin10.cpp
|
||||
Utils/FixModelByWin10.hpp
|
||||
Utils/FixModelByCgal.cpp
|
||||
Utils/FixModelByCgal.hpp
|
||||
Utils/FlashAir.cpp
|
||||
Utils/FlashAir.hpp
|
||||
Utils/Flashforge.cpp
|
||||
|
||||
@@ -236,7 +236,37 @@ void BBLTopbar::Init(wxFrame* parent)
|
||||
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
this->AddSpacer(5);
|
||||
bool window_btns_on_left = false;
|
||||
|
||||
#ifdef __linux__
|
||||
window_btns_on_left = wxGetApp().app_config->get("window_buttons_on_left") == "true";
|
||||
|
||||
if(window_btns_on_left){
|
||||
wxBitmap close_bitmap = create_scaled_bitmap("topbar_close", nullptr, TOPBAR_ICON_SIZE);
|
||||
wxAuiToolBarItem* close_btn = this->AddTool(wxID_CLOSE_FRAME, "", close_bitmap);
|
||||
|
||||
this->AddSpacer(FromDIP(4));
|
||||
|
||||
maximize_bitmap = create_scaled_bitmap("topbar_max", nullptr, TOPBAR_ICON_SIZE);
|
||||
window_bitmap = create_scaled_bitmap("topbar_win", nullptr, TOPBAR_ICON_SIZE);
|
||||
if (m_frame->IsMaximized()) {
|
||||
maximize_btn = this->AddTool(wxID_MAXIMIZE_FRAME, "", window_bitmap);
|
||||
}
|
||||
else {
|
||||
maximize_btn = this->AddTool(wxID_MAXIMIZE_FRAME, "", maximize_bitmap);
|
||||
}
|
||||
|
||||
this->AddSpacer(FromDIP(4));
|
||||
|
||||
wxBitmap iconize_bitmap = create_scaled_bitmap("topbar_min", nullptr, TOPBAR_ICON_SIZE);
|
||||
wxAuiToolBarItem* iconize_btn = this->AddTool(wxID_ICONIZE_FRAME, "", iconize_bitmap);
|
||||
|
||||
this->AddSpacer(15);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!window_btns_on_left)
|
||||
this->AddSpacer(5);
|
||||
|
||||
/*wxBitmap logo_bitmap = create_scaled_bitmap("topbar_logo", nullptr, TOPBAR_ICON_SIZE);
|
||||
wxAuiToolBarItem* logo_item = this->AddTool(ID_LOGO, "", logo_bitmap);
|
||||
@@ -312,6 +342,7 @@ void BBLTopbar::Init(wxFrame* parent)
|
||||
//this->AddSeparator();
|
||||
//this->AddSpacer(FromDIP(4));
|
||||
|
||||
if(!window_btns_on_left){
|
||||
wxBitmap iconize_bitmap = create_scaled_bitmap("topbar_min", nullptr, TOPBAR_ICON_SIZE);
|
||||
wxAuiToolBarItem* iconize_btn = this->AddTool(wxID_ICONIZE_FRAME, "", iconize_bitmap);
|
||||
|
||||
@@ -330,6 +361,7 @@ void BBLTopbar::Init(wxFrame* parent)
|
||||
|
||||
wxBitmap close_bitmap = create_scaled_bitmap("topbar_close", nullptr, TOPBAR_ICON_SIZE);
|
||||
wxAuiToolBarItem* close_btn = this->AddTool(wxID_CLOSE_FRAME, "", close_bitmap);
|
||||
}
|
||||
|
||||
Realize();
|
||||
// m_toolbar_h = this->GetSize().GetHeight();
|
||||
|
||||
@@ -25,7 +25,7 @@ wxString get_calibration_type_name(CalibMode cali_mode)
|
||||
case CalibMode::Calib_PA_Line:
|
||||
return _L("Flow Dynamics");
|
||||
case CalibMode::Calib_Flow_Rate:
|
||||
return _L("Flow Rate");
|
||||
return _L("Flow ratio");
|
||||
case CalibMode::Calib_Vol_speed_Tower:
|
||||
return _L("Max Volumetric Speed");
|
||||
case CalibMode::Calib_Temp_Tower:
|
||||
|
||||
@@ -46,7 +46,7 @@ CloneDialog::CloneDialog(wxWindow *parent)
|
||||
m_progress->SetProgressForedColour(StateColor::darkModeColorFor(wxColour("#DFDFDF")));
|
||||
m_progress->SetDoubleBuffered(true);
|
||||
m_progress->Hide();
|
||||
bottom_sizer->Add(m_progress, 2, wxEXPAND | wxLEFT, FromDIP(10));
|
||||
bottom_sizer->Add(m_progress, 2, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(10));
|
||||
|
||||
auto dlg_btns = new DialogButtons(this, {"Fill", "OK", "Cancel"}, "", 1 /*left_aligned*/);
|
||||
|
||||
|
||||
@@ -513,6 +513,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
// layer_height shouldn't be equal to zero
|
||||
float skin_depth = config->opt_float("skin_infill_depth");
|
||||
if (config->opt_float("infill_lock_depth") > skin_depth) {
|
||||
// xgettext:no-c-format, no-boost-format
|
||||
const wxString msg_text = _(L("Lock depth should smaller than skin depth.\nReset to 50% of skin depth."));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
@@ -667,7 +668,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
||||
|
||||
bool have_default_acceleration = config->opt_float("default_acceleration") > 0;
|
||||
|
||||
for (auto el : {"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration",
|
||||
for (auto el : {"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", "initial_layer_travel_acceleration",
|
||||
"top_surface_acceleration", "travel_acceleration", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration"})
|
||||
toggle_field(el, have_default_acceleration);
|
||||
|
||||
@@ -681,13 +682,13 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
||||
if (machine_supports_junction_deviation) {
|
||||
toggle_field("default_junction_deviation", true);
|
||||
toggle_field("default_jerk", false);
|
||||
for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"})
|
||||
toggle_line(el, false);
|
||||
for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "initial_layer_travel_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"})
|
||||
toggle_line(el, false);
|
||||
} else {
|
||||
toggle_field("default_junction_deviation", false);
|
||||
toggle_field("default_jerk", true);
|
||||
bool have_default_jerk = config->has("default_jerk") && config->opt_float("default_jerk") > 0;
|
||||
for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"}) {
|
||||
for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "initial_layer_travel_jerk", "top_surface_jerk", "travel_jerk", "infill_jerk"}) {
|
||||
toggle_line(el, true);
|
||||
toggle_field(el, have_default_jerk);
|
||||
}
|
||||
@@ -706,6 +707,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
||||
bool have_brim_width = (config->opt_enum<BrimType>("brim_type") != btNoBrim) && config->opt_enum<BrimType>("brim_type") != btAutoBrim &&
|
||||
config->opt_enum<BrimType>("brim_type") != btPainted;
|
||||
toggle_field("brim_width", have_brim_width);
|
||||
toggle_field("brim_flow_ratio", have_brim);
|
||||
// wall_filament uses the same logic as in Print::extruders()
|
||||
toggle_field("wall_filament", have_perimeters || have_brim);
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ bool BitmapTextRenderer::GetValueFromEditorCtrl(wxWindow* ctrl, wxVariant& value
|
||||
|
||||
// The icon can't be edited so get its old value and reuse it.
|
||||
wxVariant valueOld;
|
||||
GetView()->GetModel()->GetValue(valueOld, m_item, /*colName*/0);
|
||||
GetView()->GetModel()->GetValue(valueOld, m_item, Slic3r::GUI::ColumnNumber::colName);
|
||||
|
||||
DataViewBitmapText bmpText;
|
||||
bmpText << valueOld;
|
||||
@@ -265,13 +265,10 @@ bool BitmapChoiceRenderer::GetValue(wxVariant& value) const
|
||||
|
||||
bool BitmapChoiceRenderer::Render(wxRect rect, wxDC* dc, int state)
|
||||
{
|
||||
// int xoffset = 0;
|
||||
|
||||
const wxBitmap& icon = m_value.GetBitmap();
|
||||
if (icon.IsOk())
|
||||
{
|
||||
dc->DrawBitmap(icon, rect.x, rect.y + (rect.height - icon.GetHeight()) / 2);
|
||||
// xoffset = icon.GetWidth() + 4;
|
||||
|
||||
if (rect.height == 0)
|
||||
rect.height = icon.GetHeight();
|
||||
@@ -299,7 +296,6 @@ wxSize BitmapChoiceRenderer::GetSize() const
|
||||
return sz;
|
||||
}
|
||||
|
||||
|
||||
wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelRect, const wxVariant& value)
|
||||
{
|
||||
if (can_create_editor_ctrl && !can_create_editor_ctrl())
|
||||
@@ -316,7 +312,7 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
|
||||
labelRect.GetTopLeft(), wxSize(labelRect.GetWidth(), -1),
|
||||
0, nullptr, wxCB_READONLY | CB_NO_DROP_ICON | CB_NO_TEXT);
|
||||
c_editor->GetDropDown().SetUseContentWidth(true);
|
||||
|
||||
|
||||
if (has_default_extruder && has_default_extruder())
|
||||
c_editor->Append(_L("default"), *get_default_extruder_color_icon());
|
||||
|
||||
@@ -328,18 +324,19 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
|
||||
else
|
||||
c_editor->SetSelection(atoi(data.GetText().c_str()) - 1);
|
||||
|
||||
#ifdef __linux__
|
||||
// Open the dropdown immediately when the editor is focused.
|
||||
c_editor->Bind(wxEVT_SET_FOCUS, [c_editor](wxFocusEvent& evt) {
|
||||
c_editor->ForceDropdownOpen();
|
||||
evt.Skip();
|
||||
});
|
||||
|
||||
// Close editor after selection is made
|
||||
c_editor->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent& evt) {
|
||||
// to avoid event propagation to other sidebar items
|
||||
evt.StopPropagation();
|
||||
evt.StopPropagation();
|
||||
// FinishEditing grabs new selection and triggers config update. We better call
|
||||
// it explicitly, automatic update on KILL_FOCUS didn't work on Linux.
|
||||
this->FinishEditing();
|
||||
});
|
||||
#else
|
||||
// to avoid event propagation to other sidebar items
|
||||
c_editor->Bind(wxEVT_COMBOBOX, [](wxCommandEvent& evt) { evt.StopPropagation(); });
|
||||
#endif
|
||||
|
||||
return c_editor;
|
||||
}
|
||||
|
||||
@@ -132,13 +132,9 @@ private:
|
||||
class BitmapChoiceRenderer : public wxDataViewCustomRenderer
|
||||
{
|
||||
public:
|
||||
BitmapChoiceRenderer(wxDataViewCellMode mode =
|
||||
//#ifdef __WXOSX__
|
||||
// wxDATAVIEW_CELL_INERT
|
||||
//#else
|
||||
wxDATAVIEW_CELL_EDITABLE
|
||||
//#endif
|
||||
, int align = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL
|
||||
BitmapChoiceRenderer(
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
||||
int align = wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL
|
||||
) : wxDataViewCustomRenderer(wxT("DataViewBitmapText"), mode, align) {}
|
||||
|
||||
bool SetValue(const wxVariant& value) override;
|
||||
|
||||
@@ -80,6 +80,10 @@ static std::string get_view_type_string(libvgcode::EViewType view_type)
|
||||
return _u8L("Speed");
|
||||
else if (view_type == libvgcode::EViewType::ActualSpeed)
|
||||
return _u8L("Actual Speed");
|
||||
else if (view_type == libvgcode::EViewType::Acceleration)
|
||||
return _u8L("Acceleration");
|
||||
else if (view_type == libvgcode::EViewType::Jerk)
|
||||
return _u8L("Jerk");
|
||||
else if (view_type == libvgcode::EViewType::FanSpeed)
|
||||
return _u8L("Fan Speed");
|
||||
else if (view_type == libvgcode::EViewType::Temperature)
|
||||
@@ -385,6 +389,16 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
|
||||
sprintf(buff, ("%.1f " + _u8L("mm/s")).c_str(), vertex.feedrate);
|
||||
const std::string text = std::string(buff);
|
||||
ImGuiWrapper::text(text);
|
||||
});
|
||||
append_table_row(_u8L("Acceleration"), [&vertex, &buff]() {
|
||||
sprintf(buff, ("%.0f " + _u8L("mm/s²")).c_str(), vertex.acceleration);
|
||||
const std::string text = std::string(buff);
|
||||
ImGuiWrapper::text(text);
|
||||
});
|
||||
append_table_row(_u8L("Jerk"), [&vertex, &buff]() {
|
||||
sprintf(buff, ("%.1f " + _u8L("mm/s")).c_str(), vertex.jerk);
|
||||
const std::string text = std::string(buff);
|
||||
ImGuiWrapper::text(text);
|
||||
});
|
||||
append_table_row(_u8L("Flow rate"), [&vertex, &buff, NA_TXT]() { // ORCA use "Flow rate" instead "Volumetric flow Rate" to make window more compact
|
||||
std::string text;
|
||||
@@ -620,6 +634,14 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
|
||||
sprintf(buf, "%s %s%.1f", buf, _u8L("Actual Speed: ").c_str(), vertex.actual_feedrate);
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::Acceleration: {
|
||||
sprintf(buf, "%s %s%.0f", buf, _u8L("Acceleration: ").c_str(), vertex.acceleration);
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::Jerk: {
|
||||
sprintf(buf, "%s %s%.1f", buf, _u8L("Jerk: ").c_str(), vertex.jerk);
|
||||
break;
|
||||
}
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
case libvgcode::EViewType::PressureAdvance: {
|
||||
sprintf(buf, "%s %s%.4f", buf, _u8L("PA: ").c_str(), vertex.pressure_advance);
|
||||
@@ -1038,6 +1060,8 @@ void GCodeViewer::update_by_mode(ConfigOptionMode mode)
|
||||
view_type_items.push_back(libvgcode::EViewType::ColorPrint);
|
||||
view_type_items.push_back(libvgcode::EViewType::Speed);
|
||||
view_type_items.push_back(libvgcode::EViewType::ActualSpeed);
|
||||
view_type_items.push_back(libvgcode::EViewType::Acceleration);
|
||||
view_type_items.push_back(libvgcode::EViewType::Jerk);
|
||||
view_type_items.push_back(libvgcode::EViewType::Height);
|
||||
view_type_items.push_back(libvgcode::EViewType::Width);
|
||||
view_type_items.push_back(libvgcode::EViewType::VolumetricFlowRate);
|
||||
@@ -2586,6 +2610,8 @@ void GCodeViewer::render_toolpaths()
|
||||
add_range_property_row("height range", m_viewer.get_color_range(libvgcode::EViewType::Height).get_range());
|
||||
add_range_property_row("width range", m_viewer.get_color_range(libvgcode::EViewType::Width).get_range());
|
||||
add_range_property_row("speed range", m_viewer.get_color_range(libvgcode::EViewType::Speed).get_range());
|
||||
add_range_property_row("acceleration range", m_viewer.get_color_range(libvgcode::EViewType::Acceleration).get_range());
|
||||
add_range_property_row("jerk range", m_viewer.get_color_range(libvgcode::EViewType::Jerk).get_range());
|
||||
add_range_property_row("fan speed range", m_viewer.get_color_range(libvgcode::EViewType::FanSpeed).get_range());
|
||||
add_range_property_row("temperature range", m_viewer.get_color_range(libvgcode::EViewType::Temperature).get_range());
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
@@ -3836,6 +3862,16 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
imgui.title(_u8L("Actual Speed (mm/s)"));
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::Acceleration:
|
||||
{
|
||||
imgui.title(_u8L("Acceleration (mm/s²)"));
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::Jerk:
|
||||
{
|
||||
imgui.title(_u8L("Jerk (mm/s)"));
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::FanSpeed: { imgui.title(_u8L("Fan Speed (%)")); break; }
|
||||
case libvgcode::EViewType::Temperature: { imgui.title(_u8L("Temperature (°C)")); break; }
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
@@ -4014,6 +4050,38 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
ImGui::PopStyleVar(1);
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::Acceleration: {
|
||||
append_range(m_viewer.get_color_range(libvgcode::EViewType::Acceleration), 0);
|
||||
ImGui::Spacing();
|
||||
ImGui::Dummy({ window_padding, window_padding });
|
||||
ImGui::SameLine();
|
||||
offsets = calculate_offsets({ { _u8L("Options"), { _u8L("Travel")}}, { _u8L("Display"), {""}} }, icon_size);
|
||||
append_headers({ {_u8L("Options"), offsets[0] }, { _u8L("Display"), offsets[1]} });
|
||||
const bool travel_visible = m_viewer.is_option_visible(libvgcode::EOptionType::Travels);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 3.0f));
|
||||
append_item(EItemType::None, libvgcode::convert(m_viewer.get_option_color(libvgcode::EOptionType::Travels)), { {_u8L("Travel"), offsets[0] }}, true, predictable_icon_pos/*ORCA checkbox_pos*/, travel_visible, [this, travel_visible]() {
|
||||
m_viewer.toggle_option_visibility(libvgcode::EOptionType::Travels);
|
||||
update_moves_slider();
|
||||
});
|
||||
ImGui::PopStyleVar(1);
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::Jerk: {
|
||||
append_range(m_viewer.get_color_range(libvgcode::EViewType::Jerk), 1);
|
||||
ImGui::Spacing();
|
||||
ImGui::Dummy({ window_padding, window_padding });
|
||||
ImGui::SameLine();
|
||||
offsets = calculate_offsets({ { _u8L("Options"), { _u8L("Travel")}}, { _u8L("Display"), {""}} }, icon_size);
|
||||
append_headers({ {_u8L("Options"), offsets[0] }, { _u8L("Display"), offsets[1]} });
|
||||
const bool travel_visible = m_viewer.is_option_visible(libvgcode::EOptionType::Travels);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 3.0f));
|
||||
append_item(EItemType::None, libvgcode::convert(m_viewer.get_option_color(libvgcode::EOptionType::Travels)), { {_u8L("Travel"), offsets[0] }}, true, predictable_icon_pos/*ORCA checkbox_pos*/, travel_visible, [this, travel_visible]() {
|
||||
m_viewer.toggle_option_visibility(libvgcode::EOptionType::Travels);
|
||||
update_moves_slider();
|
||||
});
|
||||
ImGui::PopStyleVar(1);
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::FanSpeed: { append_range(m_viewer.get_color_range(libvgcode::EViewType::FanSpeed), 0); break; }
|
||||
case libvgcode::EViewType::Temperature: { append_range(m_viewer.get_color_range(libvgcode::EViewType::Temperature), 0); break; }
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
@@ -4175,6 +4243,14 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
::sprintf(buf, "%d", m_print_statistics.total_filament_changes);
|
||||
imgui.text(buf);
|
||||
|
||||
//display tool change times
|
||||
ImGui::Dummy({window_padding, window_padding});
|
||||
ImGui::SameLine();
|
||||
imgui.text(_u8L("Tool changes") + ":");
|
||||
ImGui::SameLine();
|
||||
::sprintf(buf, "%d", m_print_statistics.total_extruder_changes);
|
||||
imgui.text(buf);
|
||||
|
||||
//BBS display cost
|
||||
ImGui::Dummy({ window_padding, window_padding });
|
||||
ImGui::SameLine();
|
||||
@@ -4370,6 +4446,8 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
{
|
||||
case libvgcode::EViewType::Speed:
|
||||
case libvgcode::EViewType::ActualSpeed:
|
||||
case libvgcode::EViewType::Acceleration:
|
||||
case libvgcode::EViewType::Jerk:
|
||||
case libvgcode::EViewType::Tool:
|
||||
case libvgcode::EViewType::ColorPrint: {
|
||||
break;
|
||||
|
||||
+50
-104
@@ -33,6 +33,7 @@
|
||||
#include "format.hpp"
|
||||
#include "DailyTips.hpp"
|
||||
#include "FilamentMapDialog.hpp"
|
||||
#include "Gizmos/GLGizmoUtils.hpp"
|
||||
|
||||
#include "slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp"
|
||||
#include "slic3r/Utils/UndoRedo.hpp"
|
||||
@@ -224,43 +225,6 @@ bool GLCanvas3D::LayersEditing::is_allowed() const
|
||||
|
||||
float GLCanvas3D::LayersEditing::s_overlay_window_width;
|
||||
|
||||
void GLCanvas3D::LayersEditing::show_tooltip_information(const GLCanvas3D& canvas, std::map<wxString, wxString> captions_texts, float x, float y)
|
||||
{
|
||||
ImTextureID normal_id = canvas.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP);
|
||||
ImTextureID hover_id = canvas.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP_HOVER);
|
||||
|
||||
ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
float caption_max = 0.f;
|
||||
for (auto caption_text : captions_texts) {
|
||||
caption_max = std::max(imgui.calc_text_size(caption_text.first).x, caption_max);
|
||||
}
|
||||
caption_max += GImGui->Style.WindowPadding.x + imgui.scaled(1);
|
||||
|
||||
float scale = canvas.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
ImGui::ImageButton3(normal_id, hover_id, button_size);
|
||||
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip2(ImVec2(x, y));
|
||||
auto draw_text_with_caption = [this, &caption_max, &imgui](const wxString& caption, const wxString& text) {
|
||||
imgui.text_colored(ImGuiWrapper::COL_ACTIVE, caption);
|
||||
ImGui::SameLine(caption_max);
|
||||
imgui.text_colored(ImGuiWrapper::COL_WINDOW_BG, text);
|
||||
};
|
||||
|
||||
for (const auto& caption_text : captions_texts) draw_text_with_caption(caption_text.first, caption_text.second);
|
||||
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::PopStyleVar(2);
|
||||
}
|
||||
|
||||
void GLCanvas3D::LayersEditing::render_variable_layer_height_dialog(const GLCanvas3D& canvas) {
|
||||
if (!m_enabled)
|
||||
return;
|
||||
@@ -358,15 +322,18 @@ void GLCanvas3D::LayersEditing::render_variable_layer_height_dialog(const GLCanv
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
float get_cur_y = ImGui::GetContentRegionMax().y + ImGui::GetFrameHeight() + canvas.m_main_toolbar.get_height();
|
||||
std::map<wxString, wxString> captions_texts = {
|
||||
{_L("Left mouse button") + ":" , _L("Add detail")},
|
||||
{_L("Right mouse button") + ":", _L("Remove detail")},
|
||||
{_L("Shift+") + _L("Left mouse button") + ":", _L("Reset to base")},
|
||||
{_L("Shift+") + _L("Right mouse button") + ":", _L("Smoothing")},
|
||||
{_L("Mouse wheel:"), _L("Increase/decrease edit area")}
|
||||
const wxString shift = GUI::shortkey_shift_prefix();
|
||||
std::vector<std::pair<wxString, wxString>> shortcuts = {
|
||||
{_L("Left mouse button"), _L("Add detail")},
|
||||
{_L("Right mouse button"), _L("Remove detail")},
|
||||
{shift + _L("Left mouse button"), _L("Reset to base")},
|
||||
{shift + _L("Right mouse button"), _L("Smoothing")},
|
||||
{_L("Mouse wheel"), _L("Increase/decrease edit area")}
|
||||
};
|
||||
show_tooltip_information(canvas, captions_texts, x, get_cur_y);
|
||||
|
||||
float y = canvas.m_main_toolbar.get_height();
|
||||
GLGizmoUtils::render_tooltip_button(&imgui, canvas, shortcuts, x, y);
|
||||
|
||||
ImGui::SameLine();
|
||||
if (imgui.button(_L("Reset")))
|
||||
wxPostEvent((wxEvtHandler*)canvas.get_wxglcanvas(), SimpleEvent(EVT_GLCANVAS_RESET_LAYER_HEIGHT_PROFILE));
|
||||
@@ -1222,13 +1189,13 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas, Bed3D &bed)
|
||||
|
||||
m_selection.set_volumes(&m_volumes.volumes);
|
||||
|
||||
m_assembly_view_desc["object_selection_caption"] = _L("Left mouse button");
|
||||
m_assembly_view_desc["object_selection"] = _L("Object selection");
|
||||
// FIXME: maybe should be using GUI::shortkey_alt_prefix() or equivalent?
|
||||
m_assembly_view_desc["part_selection_caption"] = _L("Alt+") + _L("Left mouse button");
|
||||
m_assembly_view_desc["part_selection"] = _L("Part selection");
|
||||
m_assembly_view_desc["number_key_caption"] = "1~16 " + _L("number keys");
|
||||
m_assembly_view_desc["number_key"] = _L("Number keys can quickly change the color of objects");
|
||||
const wxString alt = GUI::shortkey_alt_prefix();
|
||||
|
||||
m_shortcuts_assembly_view = {
|
||||
{_L("Left mouse button"), _L("Object Selection")},
|
||||
{alt + _L("Left mouse button"), _L("Part Selection")},
|
||||
{"1~16 " + _L("number keys"), _L("Number keys can quickly change the color of objects")},
|
||||
};
|
||||
}
|
||||
|
||||
GLCanvas3D::~GLCanvas3D()
|
||||
@@ -4001,14 +3968,14 @@ void GLCanvas3D::on_set_color_timer(wxTimerEvent& evt)
|
||||
}
|
||||
|
||||
|
||||
void GLCanvas3D::schedule_extra_frame(int miliseconds)
|
||||
void GLCanvas3D::schedule_extra_frame(int milliseconds)
|
||||
{
|
||||
// Schedule idle event right now
|
||||
if (miliseconds == 0)
|
||||
if (milliseconds == 0)
|
||||
{
|
||||
// We want to wakeup idle evnt but most likely this is call inside render cycle so we need to wait
|
||||
// We want to wakeup idle event but most likely this is call inside render cycle so we need to wait
|
||||
if (m_in_render)
|
||||
miliseconds = 33;
|
||||
milliseconds = 33;
|
||||
else {
|
||||
m_dirty = true;
|
||||
wxWakeUpIdle();
|
||||
@@ -4018,12 +3985,12 @@ void GLCanvas3D::schedule_extra_frame(int miliseconds)
|
||||
int remaining_time = m_render_timer.GetInterval();
|
||||
// Timer is not running
|
||||
if (!m_render_timer.IsRunning()) {
|
||||
m_render_timer.StartOnce(miliseconds);
|
||||
// Timer is running - restart only if new period is shorter than remaning period
|
||||
m_render_timer.StartOnce(milliseconds);
|
||||
// Timer is running - restart only if new period is shorter than remaining period
|
||||
} else {
|
||||
if (miliseconds + 20 < remaining_time) {
|
||||
if (milliseconds + 20 < remaining_time) {
|
||||
m_render_timer.Stop();
|
||||
m_render_timer.StartOnce(miliseconds);
|
||||
m_render_timer.StartOnce(milliseconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9108,45 +9075,32 @@ void GLCanvas3D::_render_paint_toolbar() const
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
float GLCanvas3D::_show_assembly_tooltip_information(float caption_max, float x, float y) const
|
||||
float GLCanvas3D::_render_assembly_tooltip_button(ImGuiWrapper* imgui_wrapper) const
|
||||
{
|
||||
ImGuiWrapper *imgui = wxGetApp().imgui();
|
||||
ImTextureID normal_id = m_gizmos.get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP);
|
||||
ImTextureID hover_id = m_gizmos.get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP_HOVER);
|
||||
const float text_height = imgui_wrapper->calc_text_size(_L("part selection")).y;
|
||||
ImVec2 windowPos = ImGui::GetWindowPos();
|
||||
float x = windowPos.x;
|
||||
float y = windowPos.y - ImGui::GetFrameHeight() - (5 * text_height);
|
||||
y -= ImGui::GetContentRegionMax().y + ImGui::GetFrameHeight(); // correct default ToolTipButton behaviour
|
||||
|
||||
caption_max += imgui->calc_text_size(": "sv).x + 35.f;
|
||||
GLGizmoUtils::render_tooltip_button(imgui_wrapper, *this, m_shortcuts_assembly_view, x, y);
|
||||
ImGui::SameLine();
|
||||
ImGui::Dummy(ImVec2(12.f, 0.f));
|
||||
|
||||
float scale = get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
float scale = get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, ImGui::GetStyle().FramePadding.y});
|
||||
ImGui::ImageButton3(normal_id, hover_id, button_size);
|
||||
float same_line_width = button_size.x * 1.8; // with an space size
|
||||
ImGui::SameLine(same_line_width);
|
||||
same_line_width = imgui_wrapper->calc_text_size("|"sv).x + same_line_width + imgui_wrapper->calc_text_size(" "sv).x;
|
||||
imgui_wrapper->text_colored(ImGuiWrapper::COL_ACTIVE, "|");
|
||||
ImGui::SameLine(same_line_width);
|
||||
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip2(ImVec2(x, y));
|
||||
auto draw_text_with_caption = [&imgui, & caption_max](const wxString &caption, const wxString &text) {
|
||||
imgui->text_colored(ImGuiWrapper::COL_ACTIVE, caption);
|
||||
ImGui::SameLine(caption_max);
|
||||
imgui->text_colored(ImGuiWrapper::COL_WINDOW_BG, text);
|
||||
};
|
||||
|
||||
for (const auto &t : std::array<std::string, 3>{"object_selection", "part_selection", "number_key"}) {
|
||||
draw_text_with_caption(m_assembly_view_desc.at(t + "_caption") + ": ", m_assembly_view_desc.at(t));
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::PopStyleVar(2);
|
||||
auto same_line_size = button_size.x * 1.8;//with an space size
|
||||
ImGui::SameLine(same_line_size);
|
||||
same_line_size = imgui->calc_text_size("|"sv).x + same_line_size + imgui->calc_text_size(" "sv).x;
|
||||
imgui->text_colored(ImGuiWrapper::COL_ACTIVE, "|");
|
||||
ImGui::SameLine(same_line_size);
|
||||
return same_line_size;
|
||||
return same_line_width; // return the width of the space taken by the tooltip button and the separator
|
||||
}
|
||||
|
||||
//BBS
|
||||
@@ -9180,19 +9134,11 @@ void GLCanvas3D::_render_assemble_control()
|
||||
imgui->begin(_L("Assemble Control"), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
float tip_icon_size;
|
||||
float tooltip_button_width;
|
||||
{
|
||||
float caption_max = 0.f;
|
||||
for (const auto &t : std::array<std::string, 3>{"object_selection", "part_selection", "number_key"}) {
|
||||
caption_max = std::max(caption_max, imgui->calc_text_size(m_assembly_view_desc.at(t + "_caption")).x);
|
||||
}
|
||||
const ImVec2 pos = ImGui::GetCursorScreenPos();
|
||||
const float text_y = imgui->calc_text_size(_L("Part selection")).y;
|
||||
float get_cur_x = pos.x;
|
||||
float get_cur_y = pos.y - ImGui::GetFrameHeight() - 4 * text_y;
|
||||
tip_icon_size =_show_assembly_tooltip_information(caption_max, get_cur_x, get_cur_y);
|
||||
tooltip_button_width = _render_assembly_tooltip_button(imgui);
|
||||
}
|
||||
float same_line_width = tip_icon_size;
|
||||
float same_line_width = tooltip_button_width;
|
||||
{
|
||||
float clp_dist = m_gizmos.m_assemble_view_data->model_objects_clipper()->get_position();
|
||||
if (clp_dist == 0.f) {
|
||||
|
||||
@@ -289,7 +289,6 @@ class GLCanvas3D
|
||||
bool is_enabled() const { return m_enabled; }
|
||||
void set_enabled(bool enabled) { m_enabled = is_allowed() && enabled; }
|
||||
|
||||
void show_tooltip_information(const GLCanvas3D& canvas, std::map<wxString, wxString> captions_texts, float x, float y);
|
||||
void render_variable_layer_height_dialog(const GLCanvas3D& canvas);
|
||||
void render_overlay(const GLCanvas3D& canvas);
|
||||
void render_volumes(const GLCanvas3D& canvas, const GLVolumeCollection& volumes);
|
||||
@@ -521,7 +520,8 @@ private:
|
||||
wxGLContext* m_context;
|
||||
SceneRaycaster m_scene_raycaster;
|
||||
Bed3D &m_bed;
|
||||
std::map<std::string, wxString> m_assembly_view_desc;
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts_assembly_view;
|
||||
#if ENABLE_RETINA_GL
|
||||
std::unique_ptr<RetinaHelper> m_retina_helper;
|
||||
#endif
|
||||
@@ -1119,7 +1119,7 @@ public:
|
||||
|
||||
void request_extra_frame() { m_extra_frame_requested = true; }
|
||||
|
||||
void schedule_extra_frame(int miliseconds);
|
||||
void schedule_extra_frame(int milliseconds);
|
||||
|
||||
int get_main_toolbar_item_id(const std::string& name) const { return m_main_toolbar.get_item_id(name); }
|
||||
void force_main_toolbar_left_action(int item_id) { m_main_toolbar.force_left_action(item_id, *this); }
|
||||
@@ -1273,7 +1273,7 @@ private:
|
||||
// BBS
|
||||
//void _render_view_toolbar() const;
|
||||
void _render_paint_toolbar() const;
|
||||
float _show_assembly_tooltip_information(float caption_max, float x, float y) const;
|
||||
float _render_assembly_tooltip_button(ImGuiWrapper* imgui_wrapper) const;
|
||||
void _render_assemble_control();
|
||||
void _render_assemble_info() const;
|
||||
#if ENABLE_SHOW_CAMERA_TARGET
|
||||
|
||||
@@ -78,6 +78,12 @@ void break_to_debugger()
|
||||
#endif /* _WIN32 */
|
||||
}
|
||||
|
||||
const std::string& shortkey_shift_prefix()
|
||||
{
|
||||
static const std::string str = _u8L("Shift+");
|
||||
return str;
|
||||
}
|
||||
|
||||
const std::string& shortkey_ctrl_prefix()
|
||||
{
|
||||
static const std::string str =
|
||||
|
||||
@@ -31,6 +31,7 @@ void break_to_debugger();
|
||||
// Platform specific Ctrl+/Alt+ (Windows, Linux) vs. ⌘/⌥ (OSX) prefixes
|
||||
extern const std::string& shortkey_ctrl_prefix();
|
||||
extern const std::string& shortkey_alt_prefix();
|
||||
extern const std::string& shortkey_shift_prefix(); // Shift is the same on all platforms, but we provide a function for consistency with Ctrl/Alt prefixes
|
||||
|
||||
extern AppConfig* get_app_config();
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "slic3r/GUI/Tab.hpp"
|
||||
#include "slic3r/Utils/FixModelByWin10.hpp"
|
||||
#include "ParamsPanel.hpp"
|
||||
#include "MsgDialog.hpp"
|
||||
#include "wx/utils.h"
|
||||
@@ -85,19 +84,18 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::OBJECT_C
|
||||
{"xy_hole_compensation", "",5}, {"xy_contour_compensation", "",6}, {"elefant_foot_compensation", "",7},
|
||||
{"make_overhang_printable_angle","", 8},{"make_overhang_printable_hole_size","",9}, {"wall_sequence","",10},
|
||||
{"precise_z_height", "",10}
|
||||
|
||||
}},
|
||||
{ L("Support"), {{"brim_type", "",1},{"brim_width", "",2},{"brim_object_gap", "",3},{"brim_use_efc_outline", "",4},
|
||||
{"enable_support", "",5},{"support_type", "",6},{"support_threshold_angle", "",7}, {"support_threshold_overlap", "",8}, {"support_on_build_plate_only", "",9},
|
||||
{"support_filament", "",10},{"support_interface_filament", "",11},{"support_expansion", "",12},{"support_style", "",13},
|
||||
{"tree_support_brim_width", "",14}, {"tree_support_branch_angle", "",15},{"tree_support_branch_angle_organic","",16}, {"tree_support_wall_count", "",17},{"tree_support_branch_diameter_angle", "",18},//tree support
|
||||
{"support_bottom_z_distance", "",19},{"support_top_z_distance", "",20},{"support_base_pattern", "",21},{"support_base_pattern_spacing", "",22},
|
||||
{"support_interface_top_layers", "",23},{"support_interface_bottom_layers", "",24},{"support_interface_spacing", "",25},{"support_bottom_interface_spacing", "",26},
|
||||
{"support_object_xy_distance", "",27}, {"bridge_no_support", "",28},{"max_bridge_length", "",29},{"support_critical_regions_only", "",30},{"support_remove_small_overhang","",31},
|
||||
{"support_object_first_layer_gap","",32}
|
||||
}},
|
||||
{ L("Support"), {{"brim_type", "",1},{"brim_width", "",2},{"brim_object_gap", "",3},{"brim_flow_ratio", "",4},{"brim_use_efc_outline", "",5},
|
||||
{"enable_support", "",6},{"support_type", "",7},{"support_threshold_angle", "",8}, {"support_threshold_overlap", "",9}, {"support_on_build_plate_only", "",10},
|
||||
{"support_filament", "",11},{"support_interface_filament", "",12},{"support_expansion", "",13},{"support_style", "",14},
|
||||
{"tree_support_brim_width", "",15}, {"tree_support_branch_angle", "",16},{"tree_support_branch_angle_organic","",17}, {"tree_support_wall_count", "",18},{"tree_support_branch_diameter_angle", "",19},//tree support
|
||||
{"support_bottom_z_distance", "",20},{"support_top_z_distance", "",21},{"support_base_pattern", "",22},{"support_base_pattern_spacing", "",23},
|
||||
{"support_interface_top_layers", "",24},{"support_interface_bottom_layers", "",25},{"support_interface_spacing", "",26},{"support_bottom_interface_spacing", "",27},
|
||||
{"support_object_xy_distance", "",28}, {"bridge_no_support", "",29},{"max_bridge_length", "",30},{"support_critical_regions_only", "",31},{"support_remove_small_overhang","",32},
|
||||
{"support_object_first_layer_gap","",33}
|
||||
}},
|
||||
{ L("Speed"), {{"support_speed", "",12}, {"support_interface_speed", "",13}
|
||||
}}
|
||||
}}
|
||||
};
|
||||
|
||||
std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::PART_CATEGORY_SETTINGS=
|
||||
@@ -109,7 +107,7 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::PART_CAT
|
||||
{"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"lateral_lattice_angle_1", "",1},{"lateral_lattice_angle_2", "",1},{"infill_overhang_angle", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1},
|
||||
{"align_infill_direction_to_model", "", 1},
|
||||
{"extra_solid_infills", "", 1},
|
||||
{"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"internal_bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
||||
{"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"internal_bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
||||
}},
|
||||
{ L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5},
|
||||
{"enable_overhang_speed", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10},
|
||||
@@ -880,14 +878,11 @@ void MenuFactory::append_menu_item_rename(wxMenu* menu)
|
||||
menu->AppendSeparator();
|
||||
}
|
||||
|
||||
wxMenuItem* MenuFactory::append_menu_item_fix_through_netfabb(wxMenu* menu)
|
||||
wxMenuItem* MenuFactory::append_menu_item_fix_through_cgal(wxMenu* menu)
|
||||
{
|
||||
if (!is_windows10())
|
||||
return nullptr;
|
||||
|
||||
wxMenuItem* menu_item = append_menu_item(menu, wxID_ANY, _L("Fix model"), "",
|
||||
[](wxCommandEvent&) { obj_list()->fix_through_netfabb(); }, "", menu,
|
||||
[]() {return plater()->can_fix_through_netfabb(); }, plater());
|
||||
[](wxCommandEvent&) { obj_list()->fix_through_cgal(); }, "", menu,
|
||||
[]() {return plater()->can_fix_through_cgal(); }, plater());
|
||||
|
||||
return menu_item;
|
||||
}
|
||||
@@ -1357,7 +1352,7 @@ void MenuFactory::create_common_object_menu(wxMenu* menu)
|
||||
// "Scale to print volume" makes a sense just for whole object
|
||||
append_menu_item_scale_selection_to_fit_print_volume(menu);
|
||||
|
||||
append_menu_item_fix_through_netfabb(menu);
|
||||
append_menu_item_fix_through_cgal(menu);
|
||||
append_menu_items_mirror(menu);
|
||||
}
|
||||
|
||||
@@ -1396,7 +1391,7 @@ void MenuFactory::create_extra_object_menu()
|
||||
// Object Clone
|
||||
append_menu_item_clone(&m_object_menu);
|
||||
// Object Repair
|
||||
append_menu_item_fix_through_netfabb(&m_object_menu);
|
||||
append_menu_item_fix_through_cgal(&m_object_menu);
|
||||
// Object Simplify
|
||||
append_menu_item_simplify(&m_object_menu);
|
||||
// Object Mesh Subdivision
|
||||
@@ -1453,7 +1448,7 @@ void MenuFactory::create_bbl_assemble_object_menu()
|
||||
// Delete
|
||||
append_menu_item_delete(&m_assemble_object_menu);
|
||||
// Object Repair
|
||||
append_menu_item_fix_through_netfabb(&m_assemble_object_menu);
|
||||
append_menu_item_fix_through_cgal(&m_assemble_object_menu);
|
||||
// Object Simplify
|
||||
append_menu_item_simplify(&m_assemble_object_menu);
|
||||
// Object Mesh Subdivision
|
||||
@@ -1483,7 +1478,7 @@ void MenuFactory::create_part_menu()
|
||||
append_menu_item_reload_from_disk(menu);
|
||||
append_menu_item_export_stl(menu);
|
||||
append_menu_item_export_drc(menu);
|
||||
append_menu_item_fix_through_netfabb(menu);
|
||||
append_menu_item_fix_through_cgal(menu);
|
||||
append_menu_items_mirror(menu);
|
||||
append_menu_item_merge_parts_to_single_part(menu);
|
||||
|
||||
@@ -1508,7 +1503,7 @@ void MenuFactory::create_text_part_menu()
|
||||
|
||||
append_menu_item_edit_text(menu);
|
||||
append_menu_item_delete(menu);
|
||||
append_menu_item_fix_through_netfabb(menu);
|
||||
append_menu_item_fix_through_cgal(menu);
|
||||
append_menu_item_simplify(menu);
|
||||
append_menu_item_center(menu);
|
||||
append_menu_items_mirror(menu);
|
||||
@@ -1524,7 +1519,7 @@ void MenuFactory::create_svg_part_menu()
|
||||
|
||||
append_menu_item_edit_svg(menu);
|
||||
append_menu_item_delete(menu);
|
||||
append_menu_item_fix_through_netfabb(menu);
|
||||
append_menu_item_fix_through_cgal(menu);
|
||||
append_menu_item_simplify(menu);
|
||||
append_menu_items_mirror(menu);
|
||||
menu->AppendSeparator();
|
||||
@@ -1539,7 +1534,7 @@ void MenuFactory::create_bbl_part_menu()
|
||||
|
||||
append_menu_item_delete(menu);
|
||||
append_menu_item_edit_text(menu);
|
||||
append_menu_item_fix_through_netfabb(menu);
|
||||
append_menu_item_fix_through_cgal(menu);
|
||||
append_menu_item_simplify(menu);
|
||||
append_menu_item_smooth_mesh(menu);
|
||||
append_menu_item_center(menu);
|
||||
@@ -1860,7 +1855,7 @@ wxMenu* MenuFactory::multi_selection_menu()
|
||||
}
|
||||
append_menu_item_center(menu);
|
||||
append_menu_item_drop(menu);
|
||||
append_menu_item_fix_through_netfabb(menu);
|
||||
append_menu_item_fix_through_cgal(menu);
|
||||
//append_menu_item_simplify(menu);
|
||||
append_menu_item_delete(menu);
|
||||
menu->AppendSeparator();
|
||||
@@ -1885,7 +1880,7 @@ wxMenu* MenuFactory::multi_selection_menu()
|
||||
else {
|
||||
append_menu_item_center(menu);
|
||||
append_menu_item_drop(menu);
|
||||
append_menu_item_fix_through_netfabb(menu);
|
||||
append_menu_item_fix_through_cgal(menu);
|
||||
//append_menu_item_simplify(menu);
|
||||
append_menu_item_delete(menu);
|
||||
append_menu_items_convert_unit(menu);
|
||||
@@ -1923,7 +1918,7 @@ wxMenu* MenuFactory::assemble_multi_selection_menu()
|
||||
|
||||
wxMenu* menu = new MenuWithSeparators();
|
||||
append_menu_item_set_visible(menu);
|
||||
//append_menu_item_fix_through_netfabb(menu);
|
||||
//append_menu_item_fix_through_cgal(menu);
|
||||
//append_menu_item_simplify(menu);
|
||||
append_menu_item_delete(menu);
|
||||
menu->AppendSeparator();
|
||||
@@ -1973,7 +1968,7 @@ wxMenu* MenuFactory::assemble_object_menu()
|
||||
// Delete
|
||||
append_menu_item_delete(menu);
|
||||
//// Object Repair
|
||||
//append_menu_item_fix_through_netfabb(menu);
|
||||
//append_menu_item_fix_through_cgal(menu);
|
||||
//// Object Simplify
|
||||
//append_menu_item_simplify(menu);
|
||||
menu->AppendSeparator();
|
||||
|
||||
@@ -139,7 +139,7 @@ private:
|
||||
wxMenuItem* append_menu_item_printable(wxMenu* menu);
|
||||
wxMenuItem* append_menu_item_auto_drop(wxMenu* menu);
|
||||
void append_menu_item_rename(wxMenu* menu);
|
||||
wxMenuItem* append_menu_item_fix_through_netfabb(wxMenu* menu);
|
||||
wxMenuItem* append_menu_item_fix_through_cgal(wxMenu* menu);
|
||||
//wxMenuItem* append_menu_item_simplify(wxMenu* menu);
|
||||
void append_menu_item_export_stl(wxMenu* menu, bool is_mulity_menu = false);
|
||||
void append_menu_item_export_drc(wxMenu* menu, bool is_mulity_menu = false);
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
#include <unordered_map>
|
||||
#include <functional>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/listbook.h>
|
||||
#include <wx/numformatter.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/headerctrl.h>
|
||||
|
||||
#include "slic3r/Utils/FixModelByWin10.hpp"
|
||||
#include "slic3r/Utils/FixModelByCgal.hpp"
|
||||
#include "libslic3r/Format/bbs_3mf.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
|
||||
@@ -459,6 +460,15 @@ void ObjectList::create_objects_ctrl()
|
||||
AppendBitmapColumn(" ", colEditing, wxOSX ? wxDATAVIEW_CELL_EDITABLE : wxDATAVIEW_CELL_INERT, m_columns_width[colEditing] * em,
|
||||
wxALIGN_CENTER_HORIZONTAL, 0);
|
||||
|
||||
|
||||
// Open filament editor faster
|
||||
this->Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, [this](wxDataViewEvent& event) {
|
||||
if (event.GetColumn() == colFilament) {
|
||||
// Trigger the editor opening manually
|
||||
this->EditItem(event.GetItem(), GetColumn(colFilament));
|
||||
}
|
||||
});
|
||||
|
||||
//for (int cn = colName; cn < colCount; cn++) {
|
||||
// GetColumn(cn)->SetResizeable(cn == colName);
|
||||
//}
|
||||
@@ -568,7 +578,7 @@ MeshErrorsInfo ObjectList::get_mesh_errors_info(const int obj_idx, const int vol
|
||||
if (non_manifold_edges)
|
||||
*non_manifold_edges = stats.open_edges;
|
||||
|
||||
if (is_windows10() && !sidebar_info)
|
||||
if (!sidebar_info)
|
||||
tooltip += "\n" + _L("Click the icon to repair model object");
|
||||
|
||||
return { tooltip, get_warning_icon_name(stats) };
|
||||
@@ -1540,9 +1550,9 @@ void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_me
|
||||
}
|
||||
else if (col_num == colName)
|
||||
{
|
||||
if (is_windows10() && m_objects_model->HasWarningIcon(item) &&
|
||||
if (m_objects_model->HasWarningIcon(item) &&
|
||||
mouse_pos.x > 2 * wxGetApp().em_unit() && mouse_pos.x < 4 * wxGetApp().em_unit())
|
||||
fix_through_netfabb();
|
||||
fix_through_cgal();
|
||||
else if (evt_context_menu)
|
||||
show_context_menu(evt_context_menu); // show context menu for "Name" column too
|
||||
}
|
||||
@@ -5377,6 +5387,11 @@ ModelVolume* ObjectList::get_selected_model_volume()
|
||||
return (*m_objects)[obj_idx]->volumes[vol_idx];
|
||||
}
|
||||
|
||||
// ORCA: kept as dead code (not called by any active path). Preserved in #if 0
|
||||
// form for traceability with upstream Bambu Studio -- removing outright would
|
||||
// produce merge conflicts on every BBL sync. The active "Change Type" UI goes
|
||||
// through the submenu in GUI_Factories.cpp -> ObjectList::set_volume_type().
|
||||
#if 0
|
||||
void ObjectList::change_part_type()
|
||||
{
|
||||
wxDataViewItemArray selections;
|
||||
@@ -5573,6 +5588,7 @@ void ObjectList::change_part_type()
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
ModelVolumeType ObjectList::get_selected_volume_type()
|
||||
{
|
||||
@@ -5646,6 +5662,26 @@ void ObjectList::set_volume_type(ModelVolumeType new_type)
|
||||
return;
|
||||
}
|
||||
|
||||
// Defense-in-depth safety net against issue #5070: SVG/text volumes carry emboss metadata
|
||||
// (text_configuration, emboss_shape) that only makes sense for Part / Negative Part / Modifier.
|
||||
// ModelVolume::set_type() does not clear that metadata, so converting such volumes to
|
||||
// Support Blocker / Support Enforcer leaves stale emboss state attached to a support volume
|
||||
// and historically crashed (originally fixed in the now-disabled change_part_type() by hiding
|
||||
// Support entries in the old choice dialog; the UI-side guard for the current submenu lives
|
||||
// in MenuFactory::append_menu_item_change_type, see #13120).
|
||||
// This block must never be reachable under a healthy UI; if it ever logs, the UI guard has
|
||||
// been bypassed (new entry point, refactor, plugin, etc.) and should be investigated.
|
||||
if (new_type == ModelVolumeType::SUPPORT_BLOCKER || new_type == ModelVolumeType::SUPPORT_ENFORCER) {
|
||||
const bool has_text_or_svg = std::any_of(volumes.begin(), volumes.end(),
|
||||
[](const VolumeSelection& sel) { return sel.volume->is_svg() || sel.volume->is_text(); });
|
||||
if (has_text_or_svg) {
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__
|
||||
<< ": blocked attempt to set SUPPORT_BLOCKER/ENFORCER on SVG/text volume; "
|
||||
<< "UI guard should have prevented this -- possible regression in the Change Type menu";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const bool any_diff = std::any_of(volumes.begin(), volumes.end(),
|
||||
[new_type](const VolumeSelection& sel) { return sel.volume->type() != new_type; });
|
||||
|
||||
@@ -5948,7 +5984,7 @@ void ObjectList::rename_item()
|
||||
update_name_in_model(item);
|
||||
}
|
||||
|
||||
void ObjectList::fix_through_netfabb()
|
||||
void ObjectList::fix_through_cgal()
|
||||
{
|
||||
// Do not fix anything when a gizmo is open. There might be issues with updates
|
||||
// and what is worse, the snapshot time would refer to the internal stack.
|
||||
@@ -5968,11 +6004,11 @@ void ObjectList::fix_through_netfabb()
|
||||
// clear selections from the non-broken models if any exists
|
||||
// and than fill names of models to repairing
|
||||
if (vol_idxs.empty()) {
|
||||
#if !FIX_THROUGH_NETFABB_ALWAYS
|
||||
#if !FIX_THROUGH_CGAL_ALWAYS
|
||||
for (int i = int(obj_idxs.size())-1; i >= 0; --i)
|
||||
if (object(obj_idxs[i])->get_repaired_errors_count() == 0)
|
||||
obj_idxs.erase(obj_idxs.begin()+i);
|
||||
#endif // FIX_THROUGH_NETFABB_ALWAYS
|
||||
#endif // FIX_THROUGH_CGAL_ALWAYS
|
||||
for (int obj_idx : obj_idxs)
|
||||
if (object(obj_idx))
|
||||
model_names.push_back(object(obj_idx)->name);
|
||||
@@ -5980,11 +6016,11 @@ void ObjectList::fix_through_netfabb()
|
||||
else {
|
||||
ModelObject* obj = object(obj_idxs.front());
|
||||
if (obj) {
|
||||
#if !FIX_THROUGH_NETFABB_ALWAYS
|
||||
#if !FIX_THROUGH_CGAL_ALWAYS
|
||||
for (int i = int(vol_idxs.size()) - 1; i >= 0; --i)
|
||||
if (obj->get_repaired_errors_count(vol_idxs[i]) == 0)
|
||||
vol_idxs.erase(vol_idxs.begin() + i);
|
||||
#endif // FIX_THROUGH_NETFABB_ALWAYS
|
||||
#endif // FIX_THROUGH_CGAL_ALWAYS
|
||||
for (int vol_idx : vol_idxs)
|
||||
model_names.push_back(obj->volumes[vol_idx]->name);
|
||||
}
|
||||
@@ -6013,13 +6049,18 @@ void ObjectList::fix_through_netfabb()
|
||||
}
|
||||
|
||||
plater->clear_before_change_mesh(obj_idx);
|
||||
const size_t volumes_before = object(obj_idx)->volumes.size();
|
||||
std::string res;
|
||||
if (!fix_model_by_win10_sdk_gui(*(object(obj_idx)), vol_idx, progress_dlg, msg, res))
|
||||
if (!fix_model_with_cgal_gui(*(object(obj_idx)), vol_idx, progress_dlg, msg, res))
|
||||
return false;
|
||||
//wxGetApp().plater()->changed_mesh(obj_idx);
|
||||
object(obj_idx)->ensure_on_bed();
|
||||
plater->changed_mesh(obj_idx);
|
||||
|
||||
const size_t volumes_after = object(obj_idx)->volumes.size();
|
||||
if (volumes_after != volumes_before)
|
||||
add_volumes_to_object_in_list(obj_idx);
|
||||
|
||||
plater->get_partplate_list().notify_instance_update(obj_idx, 0);
|
||||
plater->sidebar().obj_list()->update_plate_values_for_items();
|
||||
|
||||
@@ -6043,10 +6084,10 @@ void ObjectList::fix_through_netfabb()
|
||||
if (vol_idxs.empty()) {
|
||||
int vol_idx{ -1 };
|
||||
for (int obj_idx : obj_idxs) {
|
||||
#if !FIX_THROUGH_NETFABB_ALWAYS
|
||||
#if !FIX_THROUGH_CGAL_ALWAYS
|
||||
if (object(obj_idx)->get_repaired_errors_count(vol_idx) == 0)
|
||||
continue;
|
||||
#endif // FIX_THROUGH_NETFABB_ALWAYS
|
||||
#endif // FIX_THROUGH_CGAL_ALWAYS
|
||||
if (!fix_and_update_progress(obj_idx, vol_idx, model_idx, progress_dlg, succes_models, failed_models))
|
||||
break;
|
||||
model_idx++;
|
||||
@@ -6079,7 +6120,7 @@ void ObjectList::fix_through_netfabb()
|
||||
}
|
||||
if (msg.IsEmpty())
|
||||
msg = _L("Repairing was canceled");
|
||||
plater->get_notification_manager()->push_notification(NotificationType::NetfabbFinished, NotificationManager::NotificationLevel::PrintInfoShortNotificationLevel, into_u8(msg));
|
||||
plater->get_notification_manager()->push_notification(NotificationType::CgalFinished, NotificationManager::NotificationLevel::PrintInfoShortNotificationLevel, into_u8(msg));
|
||||
}
|
||||
|
||||
void ObjectList::simplify()
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef std::pair<coordf_t, coordf_t> t_layer_height_range;
|
||||
typedef std::map<t_layer_height_range, ModelConfig> t_layer_config_ranges;
|
||||
|
||||
// Manifold mesh may contain self-intersections, so we want to always allow fixing the mesh.
|
||||
#define FIX_THROUGH_NETFABB_ALWAYS 1
|
||||
#define FIX_THROUGH_CGAL_ALWAYS 1
|
||||
|
||||
namespace GUI {
|
||||
struct ObjectVolumeID {
|
||||
@@ -413,7 +413,9 @@ public:
|
||||
bool fix_cut_selection(wxDataViewItemArray &sels);
|
||||
|
||||
ModelVolume* get_selected_model_volume();
|
||||
#if 0 // ORCA: disabled alongside definition in GUI_ObjectList.cpp (see #if 0 block there)
|
||||
void change_part_type();
|
||||
#endif
|
||||
void set_volume_type(ModelVolumeType new_type);
|
||||
ModelVolumeType get_selected_volume_type();
|
||||
|
||||
@@ -428,7 +430,7 @@ public:
|
||||
void instances_to_separated_objects(const int obj_idx);
|
||||
void split_instances();
|
||||
void rename_item();
|
||||
void fix_through_netfabb();
|
||||
void fix_through_cgal();
|
||||
void simplify();
|
||||
void smooth_mesh();
|
||||
void update_item_error_icon(const int obj_idx, int vol_idx) const ;
|
||||
|
||||
@@ -3277,7 +3277,7 @@ void ObjectTablePanel::msw_rescale() {
|
||||
// ObjectTableDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
ObjectTableDialog::ObjectTableDialog(wxWindow* parent, Plater* platerObj, Model *modelObj, wxSize maxSize)
|
||||
: GUI::DPIDialog(parent, wxID_ANY, _L("Object/Part Setting"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
|
||||
: GUI::DPIDialog(parent, wxID_ANY, _L("Object/Part Settings"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
|
||||
,
|
||||
m_model(modelObj), m_plater(platerObj)
|
||||
{
|
||||
@@ -3410,7 +3410,9 @@ void ObjectTableDialog::OnClose(wxCloseEvent &evt)
|
||||
|
||||
void ObjectTableDialog::OnText(wxKeyEvent &evt)
|
||||
{
|
||||
if (evt.GetKeyCode() != WXK_ESCAPE) {
|
||||
if (evt.GetKeyCode() == WXK_ESCAPE) {
|
||||
Close();
|
||||
} else {
|
||||
evt.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -659,8 +659,7 @@ void GLGizmoAdvancedCut::perform_cut(const Selection& selection)
|
||||
cut_with_groove ? cut.perform_with_groove(m_groove, m_rotate_matrix) :
|
||||
cut.perform_with_plane();
|
||||
// fix_non_manifold_edges
|
||||
#ifdef HAS_WIN10SDK
|
||||
if (is_windows10()) {
|
||||
{
|
||||
bool is_showed_dialog = false;
|
||||
bool user_fix_model = false;
|
||||
for (size_t i = 0; i < new_objects.size(); i++) {
|
||||
@@ -687,7 +686,7 @@ void GLGizmoAdvancedCut::perform_cut(const Selection& selection)
|
||||
wxString msg = _L("Repairing model object");
|
||||
msg += ": " + from_u8(model_name) + "\n";
|
||||
std::string res;
|
||||
if (!fix_model_by_win10_sdk_gui(*model_object, vol_idx, progress_dlg, msg, res)) return false;
|
||||
if (!fix_model_with_cgal_gui(*model_object, vol_idx, progress_dlg, msg, res)) return false;
|
||||
return true;
|
||||
};
|
||||
ProgressDialog progress_dlg(_L("Repairing model object"), "", 100, find_toplevel_parent(plater), wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT, true);
|
||||
@@ -700,7 +699,6 @@ void GLGizmoAdvancedCut::perform_cut(const Selection& selection)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// set offset for new_objects
|
||||
|
||||
// save cut_id to post update synchronization
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "slic3r/GUI/Plater.hpp"
|
||||
#include "slic3r/GUI/Gizmos/GizmoObjectManipulation.hpp"
|
||||
#include "slic3r/Utils/UndoRedo.hpp"
|
||||
#include "GLGizmoUtils.hpp"
|
||||
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "libslic3r/MeasureUtils.hpp"
|
||||
@@ -43,6 +44,8 @@ std::string GLGizmoAssembly::on_get_name() const
|
||||
|
||||
bool GLGizmoAssembly::on_init()
|
||||
{
|
||||
GLGizmoMeasure::on_init();
|
||||
|
||||
m_shortcut_key = WXK_CONTROL_Y;
|
||||
return true;
|
||||
}
|
||||
@@ -108,14 +111,8 @@ void GLGizmoAssembly::on_render_input_window(float x, float y, float bottom_limi
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(6.0f, 10.0f));
|
||||
float get_cur_y = ImGui::GetContentRegionMax().y + ImGui::GetFrameHeight() + y;
|
||||
float caption_max = 0.f;
|
||||
float total_text_max = 0.f;
|
||||
for (const auto &t : std::array<std::string, 3>{"point_selection", "reset", "unselect"}) {
|
||||
caption_max = std::max(caption_max, m_imgui->calc_text_size(m_desc[t + "_caption"]).x);
|
||||
total_text_max = std::max(total_text_max, m_imgui->calc_text_size(m_desc[t]).x);
|
||||
}
|
||||
show_tooltip_information(caption_max, x, get_cur_y);
|
||||
|
||||
GLGizmoUtils::render_tooltip_button(m_imgui, m_parent, m_shortcuts, x, y);
|
||||
|
||||
float f_scale =m_parent.get_gizmos_manager().get_layout_scale();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 4.0f * f_scale));
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "slic3r/GUI/Plater.hpp"
|
||||
#include "libslic3r/ClipperUtils.hpp"
|
||||
#include "libslic3r/ExPolygon.hpp"
|
||||
#include "GLGizmoUtils.hpp"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
@@ -44,10 +45,8 @@ bool GLGizmoBrimEars::on_init()
|
||||
|
||||
m_shortcut_key = WXK_CONTROL_E;
|
||||
|
||||
// FIXME: maybe should be using GUI::shortkey_ctrl_prefix() or equivalent?
|
||||
const wxString ctrl = _L("Ctrl+");
|
||||
// FIXME: maybe should be using GUI::shortkey_alt_prefix() or equivalent?
|
||||
const wxString alt = _L("Alt+");
|
||||
const wxString ctrl = GUI::shortkey_ctrl_prefix();
|
||||
const wxString alt = GUI::shortkey_alt_prefix();
|
||||
|
||||
m_desc["head_diameter"] = _L("Head diameter");
|
||||
m_desc["max_angle"] = _L("Max angle");
|
||||
@@ -57,14 +56,12 @@ bool GLGizmoBrimEars::on_init()
|
||||
m_desc["auto_generate"] = _L("Auto-generate points");
|
||||
m_desc["section_view"] = _L("Section view");
|
||||
|
||||
m_desc["left_click_caption"] = _L("Left click");
|
||||
m_desc["left_click"] = _L("Add a brim ear");
|
||||
m_desc["right_click_caption"] = _L("Right click");
|
||||
m_desc["right_click"] = _L("Delete a brim ear");
|
||||
m_desc["ctrl_mouse_wheel_caption"] = ctrl + _L("Mouse wheel");
|
||||
m_desc["ctrl_mouse_wheel"] = _L("Adjust head diameter");
|
||||
m_desc["alt_mouse_wheel_caption"] = alt + _L("Mouse wheel");
|
||||
m_desc["alt_mouse_wheel"] = _L("Adjust section view");
|
||||
m_shortcuts = {
|
||||
{_L("Left mouse button"), _L("Add a brim ear")},
|
||||
{_L("Right mouse button"), _L("Delete a brim ear")},
|
||||
{ctrl + _L("Mouse wheel"), _L("Adjust head diameter")},
|
||||
{alt + _L("Mouse wheel"), _L("Adjust section view")},
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -737,7 +734,8 @@ void GLGizmoBrimEars::on_render_input_window(float x, float y, float bottom_limi
|
||||
ImGui::PopStyleVar(1);
|
||||
|
||||
float get_cur_y = ImGui::GetContentRegionMax().y + ImGui::GetFrameHeight() + y;
|
||||
show_tooltip_information(x, get_cur_y);
|
||||
|
||||
GLGizmoUtils::render_tooltip_button(m_imgui, m_parent, m_shortcuts, x, y);
|
||||
|
||||
if (glb_cfg.opt_enum<BrimType>("brim_type") != btPainted) {
|
||||
ImGui::SameLine();
|
||||
@@ -790,41 +788,6 @@ void GLGizmoBrimEars::on_render_input_window(float x, float y, float bottom_limi
|
||||
ImGuiWrapper::pop_toolbar_style();
|
||||
}
|
||||
|
||||
void GLGizmoBrimEars::show_tooltip_information(float x, float y)
|
||||
{
|
||||
std::array<std::string, 4> info_array = std::array<std::string, 4>{"left_click", "right_click", "ctrl_mouse_wheel", "alt_mouse_wheel"};
|
||||
float caption_max = 0.f;
|
||||
for (const auto &t : info_array) { caption_max = std::max(caption_max, m_imgui->calc_text_size(m_desc[t + "_caption"]).x); }
|
||||
|
||||
ImTextureID normal_id = m_parent.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP);
|
||||
ImTextureID hover_id = m_parent.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP_HOVER);
|
||||
|
||||
caption_max += m_imgui->calc_text_size(": "sv).x + 35.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
ImGui::ImageButton3(normal_id, hover_id, button_size);
|
||||
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip2(ImVec2(x, y));
|
||||
auto draw_text_with_caption = [this, &caption_max](const wxString &caption, const wxString &text) {
|
||||
m_imgui->text_colored(ImGuiWrapper::COL_ACTIVE, caption);
|
||||
ImGui::SameLine(caption_max);
|
||||
m_imgui->text_colored(ImGuiWrapper::COL_WINDOW_BG, text);
|
||||
};
|
||||
|
||||
for (const auto &t : info_array) draw_text_with_caption(m_desc.at(t + "_caption") + ": ", m_desc.at(t));
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::PopStyleVar(2);
|
||||
}
|
||||
|
||||
bool GLGizmoBrimEars::on_is_activable() const
|
||||
{
|
||||
const Selection &selection = m_parent.get_selection();
|
||||
|
||||
@@ -117,6 +117,9 @@ private:
|
||||
// This map holds all translated description texts, so they can be easily referenced during layout calculations
|
||||
// etc. When language changes, GUI is recreated and this class constructed again, so the change takes effect.
|
||||
std::map<std::string, wxString> m_desc;
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts;
|
||||
|
||||
|
||||
GLSelectionRectangle m_selection_rectangle;
|
||||
|
||||
@@ -159,7 +162,6 @@ protected:
|
||||
void on_start_dragging() override;
|
||||
void on_stop_dragging() override;
|
||||
void on_render_input_window(float x, float y, float bottom_limit) override;
|
||||
void show_tooltip_information(float x, float y);
|
||||
|
||||
std::string on_get_name() const override;
|
||||
bool on_is_activable() const override;
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
#include "slic3r/Utils/UndoRedo.hpp"
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
#include "libslic3r/TriangleMeshSlicer.hpp"
|
||||
#include "GLGizmoUtils.hpp"
|
||||
|
||||
#include "imgui/imgui_internal.h"
|
||||
#include "slic3r/GUI/Field.hpp"
|
||||
#include "slic3r/GUI/MsgDialog.hpp"
|
||||
#include "FixModelByWin10.hpp"
|
||||
#include "FixModelByCgal.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
@@ -1186,16 +1187,21 @@ bool GLGizmoCut3D::on_init()
|
||||
// initiate info shortcuts
|
||||
const wxString ctrl = GUI::shortkey_ctrl_prefix();
|
||||
const wxString alt = GUI::shortkey_alt_prefix();
|
||||
const wxString shift = _L("Shift+");
|
||||
const wxString shift = GUI::shortkey_shift_prefix();
|
||||
|
||||
m_shortcuts_cut.push_back(std::make_pair(shift + _L("Drag"), _L("Draw cut line")));
|
||||
m_shortcuts_cut = {
|
||||
{_L("Drag"), _L("Move cut line")},
|
||||
{shift + _L("Drag"), _L("Draw cut line")}
|
||||
};
|
||||
|
||||
m_shortcuts_connector.push_back(std::make_pair(_L("Left click"), _L("Add connector")));
|
||||
m_shortcuts_connector.push_back(std::make_pair(_L("Right click"), _L("Remove connector")));
|
||||
m_shortcuts_connector.push_back(std::make_pair(_L("Drag"), _L("Move connector")));
|
||||
m_shortcuts_connector.push_back(std::make_pair(shift + _L("Left click"), _L("Add connector to selection")));
|
||||
m_shortcuts_connector.push_back(std::make_pair(alt + _L("Left click"), _L("Remove connector from selection")));
|
||||
m_shortcuts_connector.push_back(std::make_pair(ctrl + "A", _L("Select all connectors")));
|
||||
m_shortcuts_connector = {
|
||||
{_L("Left mouse button"), _L("Add connector")},
|
||||
{_L("Right mouse button"), _L("Remove connector")},
|
||||
{_L("Drag"), _L("Move connector")},
|
||||
{shift + _L("Left mouse button"), _L("Add connector to selection")},
|
||||
{alt + _L("Left mouse button"), _L("Remove connector from selection")},
|
||||
{ctrl + "A", _L("Select all connectors")},
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2313,8 +2319,7 @@ void GLGizmoCut3D::render_connectors_input_window(CutConnectors &connectors, flo
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(6.0f, 10.0f));
|
||||
float get_cur_y = ImGui::GetContentRegionMax().y + ImGui::GetFrameHeight() + y;
|
||||
show_tooltip_information(x, get_cur_y);
|
||||
render_tooltip_button(x, y);
|
||||
|
||||
float f_scale = m_parent.get_gizmos_manager().get_layout_scale();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 4.0f * f_scale));
|
||||
@@ -2757,7 +2762,7 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors, floa
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(6.0f, 10.0f));
|
||||
float get_cur_y = ImGui::GetContentRegionMax().y + ImGui::GetFrameHeight() + y;
|
||||
show_tooltip_information(x, get_cur_y);
|
||||
render_tooltip_button(x, get_cur_y);
|
||||
|
||||
float f_scale = m_parent.get_gizmos_manager().get_layout_scale();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 4.0f * f_scale));
|
||||
@@ -2917,43 +2922,11 @@ void GLGizmoCut3D::on_render_input_window(float x, float y, float bottom_limit)
|
||||
render_debug_input_window(x);
|
||||
}
|
||||
|
||||
void GLGizmoCut3D::show_tooltip_information(float x, float y)
|
||||
void GLGizmoCut3D::render_tooltip_button(float x, float y)
|
||||
{
|
||||
auto &shortcuts = m_connectors_editing ? m_shortcuts_connector : m_shortcuts_cut;
|
||||
auto& shortcuts = m_connectors_editing ? m_shortcuts_connector : m_shortcuts_cut;
|
||||
|
||||
float caption_max = 0.f;
|
||||
for (const auto &short_cut : shortcuts) {
|
||||
caption_max = std::max(caption_max, m_imgui->calc_text_size(short_cut.first).x);
|
||||
}
|
||||
|
||||
ImTextureID normal_id = m_parent.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP);
|
||||
ImTextureID hover_id = m_parent.get_gizmos_manager().get_icon_texture_id(GLGizmosManager::MENU_ICON_NAME::IC_TOOLBAR_TOOLTIP_HOVER);
|
||||
|
||||
caption_max += m_imgui->calc_text_size(std::string_view{": "}).x + 35.f;
|
||||
|
||||
float scale = m_parent.get_scale();
|
||||
#ifdef WIN32
|
||||
int dpi = get_dpi_for_window(wxGetApp().GetTopWindow());
|
||||
scale *= (float) dpi / (float) DPI_DEFAULT;
|
||||
#endif // WIN32
|
||||
ImVec2 button_size = ImVec2(25 * scale, 25 * scale); // ORCA: Use exact resolution will prevent blur on icon
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0}); // ORCA: Dont add padding
|
||||
ImGui::ImageButton3(normal_id, hover_id, button_size);
|
||||
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip2(ImVec2(x, y));
|
||||
auto draw_text_with_caption = [this, &caption_max](const wxString &caption, const wxString &text) {
|
||||
m_imgui->text_colored(ImGuiWrapper::COL_ACTIVE, caption);
|
||||
ImGui::SameLine(caption_max);
|
||||
m_imgui->text_colored(ImGuiWrapper::COL_WINDOW_BG, text);
|
||||
};
|
||||
|
||||
for (const auto &short_cut : shortcuts)
|
||||
draw_text_with_caption(short_cut.first + ": ", short_cut.second);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::PopStyleVar(2);
|
||||
GLGizmoUtils::render_tooltip_button(m_imgui, m_parent, shortcuts, x, y);
|
||||
}
|
||||
|
||||
bool GLGizmoCut3D::is_outside_of_cut_contour(size_t idx, const CutConnectors& connectors, const Vec3d cur_pos)
|
||||
@@ -3367,8 +3340,7 @@ void GLGizmoCut3D::perform_cut(const Selection& selection)
|
||||
cut.perform_with_plane();
|
||||
|
||||
// fix_non_manifold_edges
|
||||
#ifdef HAS_WIN10SDK
|
||||
if (is_windows10()) {
|
||||
{
|
||||
bool is_showed_dialog = false;
|
||||
bool user_fix_model = false;
|
||||
for (size_t i = 0; i < new_objects.size(); i++) {
|
||||
@@ -3395,7 +3367,7 @@ void GLGizmoCut3D::perform_cut(const Selection& selection)
|
||||
wxString msg = _L("Repairing model object");
|
||||
msg += ": " + from_u8(model_name) + "\n";
|
||||
std::string res;
|
||||
if (!fix_model_by_win10_sdk_gui(*model_object, vol_idx, progress_dlg, msg, res)) return false;
|
||||
if (!fix_model_with_cgal_gui(*model_object, vol_idx, progress_dlg, msg, res)) return false;
|
||||
return true;
|
||||
};
|
||||
ProgressDialog progress_dlg(_L("Repairing model object"), "", 100, find_toplevel_parent(plater), wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT, true);
|
||||
@@ -3408,7 +3380,6 @@ void GLGizmoCut3D::perform_cut(const Selection& selection)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
check_objects_after_cut(new_objects);
|
||||
|
||||
// save cut_id to post update synchronization
|
||||
|
||||
@@ -200,7 +200,9 @@ class GLGizmoCut3D : public GLGizmoBase
|
||||
|
||||
PartSelection m_part_selection;
|
||||
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts_cut;
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts_connector;
|
||||
|
||||
enum class CutMode {
|
||||
@@ -321,7 +323,7 @@ protected:
|
||||
void update_plane_model();
|
||||
|
||||
void on_render_input_window(float x, float y, float bottom_limit) override;
|
||||
void show_tooltip_information(float x, float y);
|
||||
void render_tooltip_button(float x, float y);
|
||||
|
||||
bool wants_enter_leave_snapshots() const override { return true; }
|
||||
std::string get_gizmo_entering_text() const override { return _u8L("Entering Cut gizmo"); }
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "slic3r/GUI/Jobs/NotificationProgressIndicator.hpp"
|
||||
#include "slic3r/Utils/WxFontUtils.hpp"
|
||||
#include "slic3r/Utils/UndoRedo.hpp"
|
||||
#include "GLGizmoUtils.hpp"
|
||||
|
||||
#include "libslic3r/Geometry.hpp" // to range pi pi
|
||||
#include "libslic3r/Timer.hpp"
|
||||
@@ -725,6 +726,10 @@ bool GLGizmoEmboss::on_init()
|
||||
// NOTE: It has special handling in GLGizmosManager::handle_shortcut
|
||||
m_shortcut_key = WXK_CONTROL_T;
|
||||
|
||||
m_shortcuts = {
|
||||
{_L("Drag"), _L("Position on surface")}
|
||||
};
|
||||
|
||||
// initialize text styles
|
||||
m_style_manager.init(wxGetApp().app_config);
|
||||
|
||||
@@ -918,7 +923,7 @@ void GLGizmoEmboss::on_render_input_window(float x, float y, float bottom_limit)
|
||||
|
||||
GizmoImguiBegin(get_name(), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
|
||||
|
||||
draw_window();
|
||||
draw_window(x, y);
|
||||
|
||||
GizmoImguiEnd();
|
||||
|
||||
@@ -1341,7 +1346,7 @@ void GLGizmoEmboss::close()
|
||||
mng.open_gizmo(GLGizmosManager::Emboss);
|
||||
}
|
||||
|
||||
void GLGizmoEmboss::draw_window()
|
||||
void GLGizmoEmboss::draw_window(float x, float y)
|
||||
{
|
||||
#ifdef ALLOW_DEBUG_MODE
|
||||
if (ImGui::Button("re-process")) process();
|
||||
@@ -1357,21 +1362,30 @@ void GLGizmoEmboss::draw_window()
|
||||
|
||||
draw_text_input();
|
||||
|
||||
ImGui::Indent();
|
||||
// When unknown font is inside .3mf only font selection is allowed
|
||||
m_imgui->disabled_end(/*m_is_unknown_font*/);
|
||||
draw_font_list_line();
|
||||
m_imgui->disabled_begin(m_is_unknown_font);
|
||||
bool use_inch = wxGetApp().app_config->get_bool("use_inches");
|
||||
draw_height(use_inch);
|
||||
draw_depth(use_inch);
|
||||
ImGui::Unindent();
|
||||
// subtract 4.0f to counteract weird additional spacing/padding of the revert buttons
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(10.0f, 10.0f - 4.0f));
|
||||
ScopeGuard spacing_sc([](){ ImGui::PopStyleVar(/*ImGuiStyleVar_ItemSpacing*/); });
|
||||
|
||||
draw_style_list();
|
||||
|
||||
// When unknown font is inside .3mf only font selection is allowed
|
||||
m_imgui->disabled_end(/*m_is_unknown_font*/);
|
||||
draw_font_list_line();
|
||||
m_imgui->disabled_begin(m_is_unknown_font);
|
||||
|
||||
bool use_inch = wxGetApp().app_config->get_bool("use_inches");
|
||||
draw_height(use_inch);
|
||||
draw_depth(use_inch);
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
// close advanced style property when unknown font is selected
|
||||
if (m_is_unknown_font && m_is_advanced_edit_style)
|
||||
ImGui::SetNextTreeNodeOpen(false);
|
||||
|
||||
if (ImGui::TreeNode(_u8L("Advanced").c_str())) {
|
||||
// ImGui Bug: After switching to another window and switching back, clicking the text doesnt open/close the TreeNode anymore
|
||||
ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_FramePadding;
|
||||
if (ImGui::TreeNodeEx(_u8L("Advanced").c_str(), flags)) {
|
||||
if (!m_is_advanced_edit_style) {
|
||||
m_is_advanced_edit_style = true;
|
||||
m_imgui->set_requires_extra_frame();
|
||||
@@ -1384,15 +1398,17 @@ void GLGizmoEmboss::draw_window()
|
||||
m_imgui->set_requires_extra_frame();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
draw_style_list();
|
||||
ImGui::Spacing();
|
||||
|
||||
// Do not select volume type, when it is text object
|
||||
if (!m_volume->is_the_only_one_part()) {
|
||||
ImGui::Separator();
|
||||
draw_model_type();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
GLGizmoUtils::render_tooltip_button(m_imgui, m_parent, m_shortcuts, x, y);
|
||||
|
||||
#ifdef SHOW_WX_FONT_DESCRIPTOR
|
||||
if (is_selected_style)
|
||||
@@ -1671,21 +1687,29 @@ void GLGizmoEmboss::draw_font_list_line()
|
||||
}
|
||||
|
||||
EmbossStyle &style = m_style_manager.get_style();
|
||||
if (exist_change_in_font) {
|
||||
ImGui::SameLine(ImGui::GetStyle().WindowPadding.x);
|
||||
auto r_icon = get_icon(m_icons, IconType::undo, IconState::hovered);
|
||||
if (Slic3r::GUI::button(r_icon, r_icon, r_icon)) { // ORCA draw bottom with same orange color
|
||||
const EmbossStyle *stored_style = m_style_manager.get_stored_style();
|
||||
auto r_icon = get_icon(m_icons, IconType::undo, IconState::hovered);
|
||||
if (exist_change_in_font == false) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.0f);
|
||||
m_imgui->disabled_begin(true);
|
||||
}
|
||||
|
||||
style.path = stored_style->path;
|
||||
style.prop.boldness = stored_style->prop.boldness;
|
||||
style.prop.skew = stored_style->prop.skew;
|
||||
ImGui::SameLine();
|
||||
if (Slic3r::GUI::button(r_icon, r_icon, r_icon)) { // ORCA draw bottom with same orange color
|
||||
const EmbossStyle *stored_style = m_style_manager.get_stored_style();
|
||||
|
||||
wxFont new_wx_font = WxFontUtils::load_wxFont(style.path);
|
||||
if (new_wx_font.IsOk() && m_style_manager.set_wx_font(new_wx_font))
|
||||
exist_change = true;
|
||||
style.path = stored_style->path;
|
||||
style.prop.boldness = stored_style->prop.boldness;
|
||||
style.prop.skew = stored_style->prop.skew;
|
||||
|
||||
wxFont new_wx_font = WxFontUtils::load_wxFont(style.path);
|
||||
if (new_wx_font.IsOk() && m_style_manager.set_wx_font(new_wx_font))
|
||||
exist_change = true;
|
||||
} else if (ImGui::IsItemHovered())
|
||||
m_imgui->tooltip(_u8L("Revert font changes."), m_gui_cfg->max_tooltip_width);
|
||||
m_imgui->tooltip(_u8L("Revert font changes."), m_gui_cfg->max_tooltip_width);
|
||||
|
||||
if (exist_change_in_font == false) {
|
||||
ImGui::PopStyleVar();
|
||||
m_imgui->disabled_end();
|
||||
}
|
||||
|
||||
if (exist_change) {
|
||||
@@ -1741,6 +1765,7 @@ void GLGizmoEmboss::draw_font_list()
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 0);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.0f, 0.5f)); // vertically align label
|
||||
|
||||
for (int i = 0; i < show_items_count; i++) {
|
||||
int idx = is_filtered ? filtered_items_idx[i] : i;
|
||||
@@ -1774,7 +1799,7 @@ void GLGizmoEmboss::draw_font_list()
|
||||
::draw_font_preview(face, m_text, *m_face_names, *m_gui_cfg, ImGui::IsItemVisible());
|
||||
}
|
||||
|
||||
ImGui::PopStyleVar(3);
|
||||
ImGui::PopStyleVar(4); // ImGuiStyleVar_ItemSpacing, ImGuiStyleVar_ItemInnerSpacing, ImGuiStyleVar_FrameRounding, ImGuiStyleVar_SelectableTextAlign
|
||||
ImGui::EndListBox();
|
||||
ImGui::EndPopup();
|
||||
} else if (m_face_names->is_init) {
|
||||
@@ -1832,7 +1857,8 @@ void GLGizmoEmboss::draw_font_list()
|
||||
|
||||
void GLGizmoEmboss::draw_model_type()
|
||||
{
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Spacing();
|
||||
|
||||
bool is_last_solid_part = m_volume->is_the_only_one_part();
|
||||
std::string title = _u8L("Operation");
|
||||
if (is_last_solid_part) {
|
||||
@@ -1849,13 +1875,18 @@ void GLGizmoEmboss::draw_model_type()
|
||||
ModelVolumeType type = m_volume->type();
|
||||
|
||||
//TRN EmbossOperation
|
||||
float minimum_spacing_x = 8.0f;
|
||||
float minimum_offset_x = ImGui::GetCursorPosX() + minimum_spacing_x;
|
||||
float offset_x = std::max(m_gui_cfg->input_offset, minimum_offset_x);
|
||||
ImGui::SameLine(offset_x);
|
||||
|
||||
ImGuiWrapper::push_radio_style(m_parent.get_scale()); // ORCA
|
||||
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
||||
new_type = part;
|
||||
else if (ImGui::IsItemHovered())
|
||||
m_imgui->tooltip(_u8L("Click to change text into object part."), m_gui_cfg->max_tooltip_width);
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::SameLine();
|
||||
std::string last_solid_part_hint = _u8L("You can't change a type of the last solid part of the object.");
|
||||
if (ImGui::RadioButton(_CTX_utf8(L_CONTEXT("Cut", "EmbossOperation"), "EmbossOperation").c_str(), type == negative))
|
||||
new_type = negative;
|
||||
@@ -2172,13 +2203,17 @@ void GLGizmoEmboss::draw_style_list() {
|
||||
trunc_name = ImGuiWrapper::trunc(current_name, max_style_name_width);
|
||||
}
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
|
||||
std::string title = _u8L("Style");
|
||||
if (m_style_manager.exist_stored_style())
|
||||
ImGui::Text("%s", title.c_str());
|
||||
else
|
||||
ImGui::TextColored(ImGuiWrapper::COL_ORCA, "%s", title.c_str());
|
||||
|
||||
ImGui::SetNextItemWidth(m_gui_cfg->input_width);
|
||||
ImGui::SameLine(m_gui_cfg->input_offset);
|
||||
|
||||
ImGui::SetNextItemWidth(2 * m_gui_cfg->input_width);
|
||||
auto add_text_modify = [&is_modified](const std::string& name) {
|
||||
if (!is_modified) return name;
|
||||
return name + Preset::suffix_modified();
|
||||
@@ -2190,6 +2225,14 @@ void GLGizmoEmboss::draw_style_list() {
|
||||
m_style_manager.init_style_images(m_gui_cfg->max_style_image_size, m_text);
|
||||
m_style_manager.init_trunc_names(max_style_name_width);
|
||||
std::optional<std::pair<size_t,size_t>> swap_indexes;
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemInnerSpacing, ImVec2(0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 0);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.0f, 0.5f)); // vertically align label
|
||||
|
||||
const StyleManager::Styles &styles = m_style_manager.get_styles();
|
||||
for (const StyleManager::Style &style : styles) {
|
||||
size_t index = &style - &styles.front();
|
||||
@@ -2197,12 +2240,10 @@ void GLGizmoEmboss::draw_style_list() {
|
||||
ImGui::PushID(actual_style_name.c_str());
|
||||
bool is_selected = (index == m_style_manager.get_style_index());
|
||||
|
||||
float select_height = static_cast<float>(m_gui_cfg->max_style_image_size.y());
|
||||
ImVec2 select_size(0.f, select_height); // 0,0 --> calculate in draw
|
||||
const std::optional<StyleManager::StyleImage> &img = style.image;
|
||||
ImVec2 selectable_size(0, m_imgui->scaled(32.f / 15.f)); // 0.0f -> calculated during draw
|
||||
// allow click delete button
|
||||
ImGuiSelectableFlags_ flags = ImGuiSelectableFlags_AllowItemOverlap;
|
||||
if (ImGui::BBLSelectable(style.truncated_name.c_str(), is_selected, flags, select_size)) {
|
||||
if (ImGui::BBLSelectable(style.truncated_name.c_str(), is_selected, flags, selectable_size)) {
|
||||
selected_style_index = index;
|
||||
} else if (ImGui::IsItemHovered())
|
||||
tooltip = actual_style_name;
|
||||
@@ -2218,6 +2259,7 @@ void GLGizmoEmboss::draw_style_list() {
|
||||
ImGui::ResetMouseDragDelta();
|
||||
}
|
||||
|
||||
const std::optional<StyleManager::StyleImage> &img = style.image;
|
||||
// draw style name
|
||||
if (img.has_value()) {
|
||||
ImGui::SameLine(max_style_name_width);
|
||||
@@ -2230,6 +2272,10 @@ void GLGizmoEmboss::draw_style_list() {
|
||||
if (swap_indexes.has_value())
|
||||
m_style_manager.swap(swap_indexes->first,
|
||||
swap_indexes->second);
|
||||
|
||||
// ImGuiStyleVar_ItemSpacing, ImGuiStyleVar_ItemInnerSpacing, ImGuiStyleVar_FrameRounding,
|
||||
// ImGuiStyleVar_WindowPadding, ImGuiStyleVar_FramePadding, ImGuiStyleVar_SelectableTextAlign
|
||||
ImGui::PopStyleVar(6);
|
||||
ImGui::EndCombo();
|
||||
} else {
|
||||
// do not keep in memory style images when no combo box open
|
||||
@@ -2404,30 +2450,43 @@ bool GLGizmoEmboss::revertible(const std::string &name,
|
||||
Draw draw) const
|
||||
{
|
||||
ImGui::AlignTextToFramePadding();
|
||||
bool changed = exist_change(value, default_value);
|
||||
if (changed || default_value == nullptr)
|
||||
bool changed_from_default = exist_change(value, default_value);
|
||||
if (changed_from_default || default_value == nullptr)
|
||||
ImGuiWrapper::text_colored(ImGuiWrapper::COL_MODIFIED, name); // ORCA Match color
|
||||
else
|
||||
ImGuiWrapper::text(name);
|
||||
|
||||
// render revert changes button
|
||||
if (changed) {
|
||||
ImGuiWindow *window = ImGui::GetCurrentWindow();
|
||||
float prev_x = window->DC.CursorPosPrevLine.x;
|
||||
ImGui::SameLine(undo_offset); // change cursor postion
|
||||
auto r_icon = get_icon(m_icons, IconType::undo, IconState::hovered);
|
||||
if (Slic3r::GUI::button(r_icon, r_icon, r_icon)) { // ORCA draw bottom with same orange color
|
||||
value = *default_value;
|
||||
bool changed = draw();
|
||||
|
||||
// !! Fix to detect change of value after revert of float-slider
|
||||
m_imgui->get_last_slider_status().deactivated_after_edit = true;
|
||||
|
||||
return true;
|
||||
} else if (ImGui::IsItemHovered())
|
||||
m_imgui->tooltip(undo_tooltip, m_gui_cfg->max_tooltip_width);
|
||||
window->DC.CursorPosPrevLine.x = prev_x; // set back previous position
|
||||
if (changed_from_default == false) {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.0f);
|
||||
m_imgui->disabled_begin(true);
|
||||
}
|
||||
return draw();
|
||||
|
||||
// render revert changes button
|
||||
auto r_icon = get_icon(m_icons, IconType::undo, IconState::hovered);
|
||||
ImGuiWindow *window = ImGui::GetCurrentWindow();
|
||||
float prev_x = window->DC.CursorPosPrevLine.x;
|
||||
ImGui::SameLine(undo_offset); // change cursor postion
|
||||
if (Slic3r::GUI::button(r_icon, r_icon, r_icon)) { // ORCA draw bottom with same orange color
|
||||
value = *default_value;
|
||||
|
||||
// !! Fix to detect change of value after revert of float-slider
|
||||
m_imgui->get_last_slider_status().deactivated_after_edit = true;
|
||||
|
||||
return true;
|
||||
} else if (ImGui::IsItemHovered())
|
||||
m_imgui->tooltip(undo_tooltip, m_gui_cfg->max_tooltip_width);
|
||||
|
||||
if (undo_offset != 0.0f)
|
||||
window->DC.CursorPosPrevLine.x = prev_x; // set back previous position
|
||||
|
||||
if (changed_from_default == false) {
|
||||
ImGui::PopStyleVar();
|
||||
m_imgui->disabled_end();
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
// May be move to ImGuiWrapper
|
||||
template<typename T> bool imgui_input(const char *label, T *v, T step, T step_fast, const char *format, ImGuiInputTextFlags flags);
|
||||
@@ -2448,8 +2507,8 @@ bool GLGizmoEmboss::rev_input(const std::string &name, T &value, const T *defaul
|
||||
return imgui_input(("##" + name).c_str(),
|
||||
&value, step, step_fast, format, flags);
|
||||
};
|
||||
float undo_offset = ImGui::GetStyle().WindowPadding.x;
|
||||
return revertible(name, value, default_value, undo_tooltip, undo_offset, draw_offseted_input);
|
||||
return revertible(name, value, default_value, undo_tooltip,
|
||||
0.0f, draw_offseted_input);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -2500,9 +2559,8 @@ bool GLGizmoEmboss::rev_checkbox(const std::string &name,
|
||||
ImGui::SameLine(offset);
|
||||
return m_imgui->bbl_checkbox(wxString::FromUTF8("##" + name), value);
|
||||
};
|
||||
float undo_offset = ImGui::GetStyle().WindowPadding.x;
|
||||
return revertible(name, value, default_value, undo_tooltip,
|
||||
undo_offset, draw_offseted_input);
|
||||
0.0f, draw_offseted_input);
|
||||
}
|
||||
|
||||
bool GLGizmoEmboss::set_height() {
|
||||
@@ -2583,9 +2641,8 @@ bool GLGizmoEmboss::rev_slider(const std::string &name,
|
||||
return m_imgui->slider_optional_int( ("##" + name).c_str(), value,
|
||||
v_min, v_max, format.c_str(), 1.f, false, tooltip);
|
||||
};
|
||||
float undo_offset = ImGui::GetStyle().WindowPadding.x;
|
||||
return revertible(name, value, default_value,
|
||||
undo_tooltip, undo_offset, draw_slider_optional_int);
|
||||
undo_tooltip, 0.0f, draw_slider_optional_int);
|
||||
}
|
||||
|
||||
bool GLGizmoEmboss::rev_slider(const std::string &name,
|
||||
@@ -2605,9 +2662,8 @@ bool GLGizmoEmboss::rev_slider(const std::string &name,
|
||||
return m_imgui->slider_optional_float(("##" + name).c_str(), value,
|
||||
v_min, v_max, format.c_str(), 1.f, false, tooltip);
|
||||
};
|
||||
float undo_offset = ImGui::GetStyle().WindowPadding.x;
|
||||
return revertible(name, value, default_value,
|
||||
undo_tooltip, undo_offset, draw_slider_optional_float);
|
||||
undo_tooltip, 0.0f, draw_slider_optional_float);
|
||||
}
|
||||
|
||||
bool GLGizmoEmboss::rev_slider(const std::string &name,
|
||||
@@ -2627,9 +2683,8 @@ bool GLGizmoEmboss::rev_slider(const std::string &name,
|
||||
return m_imgui->slider_float("##" + name, &value, v_min, v_max,
|
||||
format.c_str(), 1.f, false, tooltip);
|
||||
};
|
||||
float undo_offset = ImGui::GetStyle().WindowPadding.x;
|
||||
return revertible(name, value, default_value,
|
||||
undo_tooltip, undo_offset, draw_slider_float);
|
||||
undo_tooltip, 0.0f, draw_slider_float);
|
||||
}
|
||||
|
||||
void GLGizmoEmboss::draw_advanced()
|
||||
@@ -2659,6 +2714,8 @@ void GLGizmoEmboss::draw_advanced()
|
||||
m_imgui->text_colored(ImGuiWrapper::COL_GREY_DARK, ff_property);
|
||||
#endif // SHOW_FONT_FILE_PROPERTY
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
auto &tr = m_gui_cfg->translations;
|
||||
|
||||
const StyleManager::Style *stored_style = nullptr;
|
||||
@@ -2735,8 +2792,7 @@ void GLGizmoEmboss::draw_advanced()
|
||||
return is_change;
|
||||
};
|
||||
const FontProp::Align * def_align = stored_style ? &stored_style->prop.align : nullptr;
|
||||
float undo_offset = ImGui::GetStyle().WindowPadding.x;
|
||||
if (revertible(tr.alignment, font_prop.align, def_align, _u8L("Revert alignment."), undo_offset, draw_align)) {
|
||||
if (revertible(tr.alignment, font_prop.align, def_align, _u8L("Revert alignment."), 0.0f, draw_align)) {
|
||||
if (font_prop.per_glyph)
|
||||
reinit_text_lines(m_text_lines.get_lines().size());
|
||||
// TODO: move with text in finalize to not change position
|
||||
@@ -3632,7 +3688,7 @@ GuiCfg create_gui_configuration()
|
||||
ImGui::CalcTextSize(tr.font.c_str()).x,
|
||||
ImGui::CalcTextSize(tr.height.c_str()).x,
|
||||
ImGui::CalcTextSize(tr.depth.c_str()).x});
|
||||
cfg.indent = static_cast<float>(cfg.icon_width);
|
||||
cfg.indent = 20.0f;
|
||||
cfg.input_offset = style.WindowPadding.x + cfg.indent + max_text_width + space;
|
||||
|
||||
// TRN - Input label. Be short as possible
|
||||
@@ -3699,8 +3755,7 @@ GuiCfg create_gui_configuration()
|
||||
cfg.height_of_volume_type_selector = separator_height + line_height_with_spacing + input_height;
|
||||
|
||||
int max_style_image_width = static_cast<int>(std::round(cfg.max_style_name_width - 2 * style.FramePadding.x));
|
||||
int max_style_image_height = static_cast<int>(std::round(input_height));
|
||||
cfg.max_style_image_size = Vec2i32(max_style_image_width, line_height);
|
||||
cfg.max_style_image_size = Vec2i32(max_style_image_width, line_height_with_spacing);
|
||||
cfg.face_name_size = Vec2i32(cfg.input_width, line_height_with_spacing);
|
||||
cfg.face_name_texture_offset_x = cfg.face_name_size.x() + style.WindowPadding.x + space;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ private:
|
||||
// create volume from text - main functionality
|
||||
bool process(bool make_snapshot = true);
|
||||
void close();
|
||||
void draw_window();
|
||||
void draw_window(float x, float y);
|
||||
void draw_text_input();
|
||||
void draw_model_type();
|
||||
void draw_style_list();
|
||||
@@ -229,6 +229,9 @@ private:
|
||||
|
||||
// only temporary solution
|
||||
static const std::string M_ICON_FILENAME;
|
||||
|
||||
// Contains all shortcuts in the format of {shortcut, description}, e.g. {alt + _L("Left mouse button"), _L("Part_selection")}
|
||||
std::vector<std::pair<wxString, wxString>> m_shortcuts;
|
||||
};
|
||||
|
||||
} // namespace Slic3r::GUI
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user