Merge branch 'main' into belt/baseChanges

This commit is contained in:
Joseph Robertson
2026-06-18 09:41:14 -05:00
committed by GitHub
210 changed files with 80490 additions and 187481 deletions
+2
View File
@@ -15,6 +15,7 @@ on:
- ".github/workflows/build_*.yml" - ".github/workflows/build_*.yml"
- 'scripts/flatpak/**' - 'scripts/flatpak/**'
- 'scripts/msix/**' - 'scripts/msix/**'
- 'tests/**'
pull_request: pull_request:
branches: branches:
@@ -32,6 +33,7 @@ on:
- 'build_release_macos.sh' - 'build_release_macos.sh'
- 'scripts/flatpak/**' - 'scripts/flatpak/**'
- 'scripts/msix/**' - 'scripts/msix/**'
- 'tests/**'
schedule: schedule:
+17 -6
View File
@@ -504,13 +504,24 @@ if [[ -n "${USE_LLD}" ]] ; then
fi fi
fi fi
# Auto-detect ccache for faster rebuilds
export CMAKE_CCACHE_ARGS=() export CMAKE_CCACHE_ARGS=()
if command -v ccache >/dev/null 2>&1 ; then CMAKE_CCACHE=${CMAKE_CCACHE:-}
echo "ccache found at $(command -v ccache), enabling compiler caching..." if [ -n "$CMAKE_CCACHE" ]; then
export CMAKE_CCACHE_ARGS=(-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache) echo "Checking ${CMAKE_CCACHE} environment variable for compiler cache program..."
CMAKE_CCACHE=$(command -v "${CMAKE_CCACHE}") || {
echo "CMAKE_CCACHE environment variable is set to '${CMAKE_CCACHE}' but it was not found in PATH."
CMAKE_CCACHE=""
}
elif command -v sccache >/dev/null 2>&1 ; then
CMAKE_CCACHE=$(command -v sccache)
elif command -v ccache >/dev/null 2>&1 ; then
CMAKE_CCACHE=$(command -v ccache)
fi
if [ -n "${CMAKE_CCACHE}" ] ; then
echo "${CMAKE_CCACHE} found, enabling compiler caching..."
export CMAKE_CCACHE_ARGS=(-DCMAKE_C_COMPILER_LAUNCHER="${CMAKE_CCACHE}" -DCMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CCACHE}")
else else
echo "Note: ccache not found. Install ccache for faster rebuilds." echo "Note: ccache or sccache are not found. Install either of them for faster rebuilds."
fi fi
if [[ -n "${BUILD_DEPS}" ]] ; then if [[ -n "${BUILD_DEPS}" ]] ; then
@@ -525,7 +536,7 @@ if [[ -n "${BUILD_DEPS}" ]] ; then
BUILD_ARGS+=(-DCMAKE_BUILD_TYPE="${BUILD_CONFIG}") BUILD_ARGS+=(-DCMAKE_BUILD_TYPE="${BUILD_CONFIG}")
fi fi
print_and_run cmake -S deps -B deps/$BUILD_DIR "${CMAKE_C_CXX_COMPILER_CLANG[@]}" "${CMAKE_LLD_LINKER_ARGS[@]}" -G Ninja "${COLORED_OUTPUT}" "${BUILD_ARGS[@]}" print_and_run cmake -S deps -B deps/$BUILD_DIR "${CMAKE_C_CXX_COMPILER_CLANG[@]}" "${CMAKE_LLD_LINKER_ARGS[@]}" "${CMAKE_CCACHE_ARGS[@]}" -G Ninja "${COLORED_OUTPUT}" "${BUILD_ARGS[@]}"
print_and_run cmake --build deps/$BUILD_DIR -j1 print_and_run cmake --build deps/$BUILD_DIR -j1
fi fi
+4
View File
@@ -196,6 +196,8 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE)
-DCMAKE_DEBUG_POSTFIX:STRING=d -DCMAKE_DEBUG_POSTFIX:STRING=d
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
-DCMAKE_C_COMPILER_LAUNCHER:STRING=${CMAKE_C_COMPILER_LAUNCHER}
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=${CMAKE_CXX_COMPILER_LAUNCHER}
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE} -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS} -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
@@ -241,6 +243,8 @@ else()
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR} -DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}
-DCMAKE_PREFIX_PATH:STRING=${DESTDIR} -DCMAKE_PREFIX_PATH:STRING=${DESTDIR}
-DCMAKE_IGNORE_PREFIX_PATH:STRING=${CMAKE_IGNORE_PREFIX_PATH} -DCMAKE_IGNORE_PREFIX_PATH:STRING=${CMAKE_IGNORE_PREFIX_PATH}
-DCMAKE_C_COMPILER_LAUNCHER:STRING=${CMAKE_C_COMPILER_LAUNCHER}
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=${CMAKE_CXX_COMPILER_LAUNCHER}
-DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
${_cmake_osx_arch} ${_cmake_osx_arch}
"${_configs_line}" "${_configs_line}"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -146,16 +146,16 @@ text = Fine-tuning for flow rate\nDid you know that flow rate can be fine-tuned
text = Split your prints into plates\nDid you know that you can split a model that has a lot of parts into individual plates ready to print? This will simplify the process of keeping track of all the parts. text = Split your prints into plates\nDid you know that you can split a model that has a lot of parts into individual plates ready to print? This will simplify the process of keeping track of all the parts.
[hint:Speed up your print with Adaptive Layer Height] [hint:Speed up your print with Adaptive Layer Height]
text = Speed up your print with Adaptive Layer Height\nDid you know that you can print a model even faster, by using the Adaptive Layer Height option? Check it out! text = Speed up your print with Adaptive Layer Height\nDid you know that you can print a model even faster by using the Adaptive Layer Height option? Check it out!
[hint:Support painting] [hint:Support painting]
text = Support painting\nDid you know that you can paint the location of your supports? This feature makes it easy to place the support material only on the sections of the model that actually need it. text = Support painting\nDid you know that you can paint the location of your supports? This feature makes it easy to place the support material only on the sections of the model that actually need it.
[hint:Different types of supports] [hint:Different types of supports]
text = Different types of supports\nDid you know that you can choose from multiple types of supports? Tree supports work great for organic models, while saving filament and improving print speed. Check them out! text = Different types of supports\nDid you know that you can choose from multiple types of supports? Tree supports work great for organic models while saving filament and improving print speed. Check them out!
[hint:Printing Silk Filament] [hint:Printing Silk Filament]
text = Printing Silk Filament\nDid you know that Silk filament needs special consideration to print it successfully? Higher temperature and lower speed are always recommended for the best results. text = Printing Silk Filament\nDid you know that Silk filament needs special consideration to print successfully? A higher temperature and lower speed are always recommended for the best results.
[hint:Brim for better adhesion] [hint:Brim for better adhesion]
text = Brim for better adhesion\nDid you know that when printed models have a small contact interface with the printing surface, it's recommended to use a brim? text = Brim for better adhesion\nDid you know that when printed models have a small contact interface with the printing surface, it's recommended to use a brim?
@@ -167,13 +167,13 @@ text = Set parameters for multiple objects\nDid you know that you can set slicin
text = Stack objects\nDid you know that you can stack objects as a whole one? text = Stack objects\nDid you know that you can stack objects as a whole one?
[hint:Flush into support/objects/infill] [hint:Flush into support/objects/infill]
text = Flush into support/objects/infill\nDid you know that you can reduce wasted filament by flushing it into support/objects/infill during filament change? text = Flush into support/objects/infill\nDid you know that you can reduce wasted filament by flushing it into support/objects/infill during filament changes?
[hint:Improve strength] [hint:Improve strength]
text = Improve strength\nDid you know that you can use more wall loops and higher sparse infill density to improve the strength of the model? text = Improve strength\nDid you know that you can use more wall loops and higher sparse infill density to improve the strength of the model?
[hint:When do you need to print with the printer door opened] [hint:When do you need to print with the printer door opened]
text = When do you need to print with the printer door opened?\nDid you know that opening the printer door can reduce the probability of extruder/hotend clogging when printing lower temperature filament with a higher enclosure temperature? More info about this in the Wiki. text = When do you need to print with the printer door opened?\nDid you know that opening the printer door can reduce the probability of extruder/hotend clogging when printing lower temperature filament with a higher enclosure temperature? There is more info about this in the Wiki.
[hint:Avoid warping] [hint:Avoid warping]
text = Avoid warping\nDid you know that when printing materials that are prone to warping such as ABS, appropriately increasing the heatbed temperature can reduce the probability of warping? text = Avoid warping\nDid you know that when printing materials that are prone to warping such as ABS, appropriately increasing the heatbed temperature can reduce the probability of warping?
@@ -45,7 +45,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "10"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "12"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -51,7 +51,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "12"
], ],
"filament_retraction_length": [ "filament_retraction_length": [
"0.8" "0.8"
@@ -48,7 +48,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "12"
], ],
"filament_retraction_length": [ "filament_retraction_length": [
"0.8" "0.8"
@@ -48,7 +48,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "12"
], ],
"filament_type": [ "filament_type": [
"PETG" "PETG"
@@ -39,7 +39,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "16"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -45,7 +45,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "16"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -45,7 +45,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "16"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -48,7 +48,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "12"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "12"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -48,7 +48,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "12"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1.8" "12"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -48,7 +48,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "16"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -45,7 +45,7 @@
"1" "1"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"3" "6"
], ],
"filament_retract_before_wipe": [ "filament_retract_before_wipe": [
"100%" "100%"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"4" "10"
], ],
"filament_retract_before_wipe": [ "filament_retract_before_wipe": [
"100%" "100%"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"4" "10"
], ],
"filament_retract_before_wipe": [ "filament_retract_before_wipe": [
"100%" "100%"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"4" "10"
], ],
"filament_retract_before_wipe": [ "filament_retract_before_wipe": [
"100%" "100%"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"4" "10"
], ],
"filament_retract_before_wipe": [ "filament_retract_before_wipe": [
"100%" "100%"
@@ -48,7 +48,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "16"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -48,7 +48,7 @@
"1" "1"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"3" "6"
], ],
"filament_retract_before_wipe": [ "filament_retract_before_wipe": [
"100" "100"
@@ -57,7 +57,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"1" "10"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -51,7 +51,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "23"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -54,7 +54,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "18"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -51,7 +51,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "18"
], ],
"filament_retract_before_wipe": [ "filament_retract_before_wipe": [
"100" "100"
@@ -39,7 +39,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "21"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -45,7 +45,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "21"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
@@ -51,7 +51,7 @@
"0" "0"
], ],
"filament_max_volumetric_speed": [ "filament_max_volumetric_speed": [
"2" "21"
], ],
"filament_minimal_purge_on_wipe_tower": [ "filament_minimal_purge_on_wipe_tower": [
"15" "15"
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "Flashforge", "name": "Flashforge",
"url": "", "url": "",
"version": "02.04.00.01", "version": "02.04.00.02",
"force_update": "0", "force_update": "0",
"description": "Flashforge configurations", "description": "Flashforge configurations",
"machine_model_list": [ "machine_model_list": [
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": "", "layer_change_gcode": "",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": "", "layer_change_gcode": "",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": "", "layer_change_gcode": "",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -49,6 +49,7 @@
"head_wrap_detect_zone": [], "head_wrap_detect_zone": [],
"high_current_on_filament_swap": "0", "high_current_on_filament_swap": "0",
"host_type": "octoprint", "host_type": "octoprint",
"use_3mf": "1",
"layer_change_gcode": "", "layer_change_gcode": "",
"long_retractions_when_cut": [ "long_retractions_when_cut": [
"0" "0"
@@ -118,5 +118,6 @@
], ],
"extruder_clearance_height_to_lid": [ "extruder_clearance_height_to_lid": [
"150" "150"
] ],
"use_3mf": "1"
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "Qidi", "name": "Qidi",
"version": "02.04.00.02", "version": "02.04.00.03",
"force_update": "0", "force_update": "0",
"description": "Qidi configurations", "description": "Qidi configurations",
"machine_model_list": [ "machine_model_list": [
@@ -48,7 +48,7 @@
"20" "20"
], ],
"machine_pause_gcode": "PAUSE", "machine_pause_gcode": "PAUSE",
"machine_start_gcode": "INIT_MAPPING_VALUE\nPRINT_START BED=[bed_temperature_initial_layer_single] HOTEND=[nozzle_temperature_initial_layer] CHAMBER=[chamber_temperature] EXTRUDER=[initial_no_support_extruder]\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nM83\nT[initial_tool]\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nM141 S[chamber_temperature]\nG4 P3000\nG1 X108 Y1 F30000\nG0 Z[initial_layer_print_height] F600\nG0 X128 E8 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG1 X154 Z-0.1\nG1 X158\nG1 Z1 F600\nG1 X108 Y2.5 F30000\nG0 Z[initial_layer_print_height] F600\nG0 X128 E10 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG1 X154 Z-0.1\nG1 X158\nG1 Z1 F600", "machine_start_gcode": "PRINT_START BED=[bed_temperature_initial_layer_single] HOTEND=[nozzle_temperature_initial_layer] CHAMBER=[chamber_temperature] EXTRUDER=[initial_no_support_extruder]\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nM83\nT[initial_tool]\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nM141 S[chamber_temperature]\nG4 P3000\nG1 X108 Y1 F30000\nG0 Z[initial_layer_print_height] F600\nG0 X128 E8 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG1 X154 Z-0.1\nG1 X158\nG1 Z1 F600\nG1 X108 Y2.5 F30000\nG0 Z[initial_layer_print_height] F600\nG0 X128 E10 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG1 X154 Z-0.1\nG1 X158\nG1 Z1 F600",
"machine_unload_filament_time": "35", "machine_unload_filament_time": "35",
"nozzle_diameter": [ "nozzle_diameter": [
"0.4" "0.4"
@@ -71,5 +71,6 @@
"thumbnail_size": [ "thumbnail_size": [
"150x150" "150x150"
], ],
"printer_agent": "qidi" "printer_agent": "qidi",
"use_3mf": "1"
} }
@@ -48,7 +48,7 @@
"20" "20"
], ],
"machine_pause_gcode": "PAUSE", "machine_pause_gcode": "PAUSE",
"machine_start_gcode": "INIT_MAPPING_VALUE\nPRINT_START BED=[bed_temperature_initial_layer_single] HOTEND=[nozzle_temperature_initial_layer] EXTRUDER=[initial_no_support_extruder]\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nM83\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nG4 P3000\nT[initial_tool]\nG1 X108.000 Y1 F30000\nG0 Z[initial_layer_print_height] F600\n;G1 E3 F1800\nG90\nM83\nG0 X128 E8 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG91\nG1 X1 Z-0.300\nG1 X4\nG1 Z1 F1200\nG90\nM400\nG1 X108.000 Y2.5 F30000\nG0 Z[initial_layer_print_height] F600\nM83\nG0 X128 E10 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG91\nG1 X1 Z-0.300\nG1 X4\nG1 Z1 F1200\nG90\nM400\nG1 Z1 F600", "machine_start_gcode": "PRINT_START BED=[bed_temperature_initial_layer_single] HOTEND=[nozzle_temperature_initial_layer] EXTRUDER=[initial_no_support_extruder]\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nM83\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nG4 P3000\nT[initial_tool]\nG1 X108.000 Y1 F30000\nG0 Z[initial_layer_print_height] F600\n;G1 E3 F1800\nG90\nM83\nG0 X128 E8 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG91\nG1 X1 Z-0.300\nG1 X4\nG1 Z1 F1200\nG90\nM400\nG1 X108.000 Y2.5 F30000\nG0 Z[initial_layer_print_height] F600\nM83\nG0 X128 E10 F{outer_wall_volumetric_speed/(24/20) * 60}\nG0 X133 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X138 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X143 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG0 X148 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}\nG0 X153 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}\nG91\nG1 X1 Z-0.300\nG1 X4\nG1 Z1 F1200\nG90\nM400\nG1 Z1 F600",
"machine_unload_filament_time": "35", "machine_unload_filament_time": "35",
"nozzle_diameter": [ "nozzle_diameter": [
"0.4" "0.4"
@@ -71,5 +71,6 @@
"thumbnail_size": [ "thumbnail_size": [
"150x150" "150x150"
], ],
"printer_agent": "qidi" "printer_agent": "qidi",
"use_3mf": "1"
} }
@@ -78,5 +78,6 @@
"thumbnail_size": [ "thumbnail_size": [
"150x150" "150x150"
], ],
"fan_direction": "left" "fan_direction": "left",
"use_3mf": "1"
} }
@@ -94,7 +94,7 @@
"layer_change_gcode": "{if timelapse_type == 1} ; timelapse with wipe tower\nG92 E0\nG1 E-[retraction_length] F1800\nG2 Z{layer_z + 0.4} I0.86 J0.86 P1 F20000 ; spiral lift a little\nG1 Y304 F20000\nG1 X95 F20000\nG92 E0\nM400\nTIMELAPSE_TAKE_FRAME\nG1 Y324 F5000\nG1 E[retraction_length] F300\nG1 X65 F5000\nG1 Y290 F20000\n{elsif timelapse_type == 0} ; timelapse without wipe tower\nTIMELAPSE_TAKE_FRAME\n{endif}\nG92 E0\nSET_PRINT_STATS_INFO CURRENT_LAYER={layer_num + 1}", "layer_change_gcode": "{if timelapse_type == 1} ; timelapse with wipe tower\nG92 E0\nG1 E-[retraction_length] F1800\nG2 Z{layer_z + 0.4} I0.86 J0.86 P1 F20000 ; spiral lift a little\nG1 Y304 F20000\nG1 X95 F20000\nG92 E0\nM400\nTIMELAPSE_TAKE_FRAME\nG1 Y324 F5000\nG1 E[retraction_length] F300\nG1 X65 F5000\nG1 Y290 F20000\n{elsif timelapse_type == 0} ; timelapse without wipe tower\nTIMELAPSE_TAKE_FRAME\n{endif}\nG92 E0\nSET_PRINT_STATS_INFO CURRENT_LAYER={layer_num + 1}",
"machine_end_gcode": "DISABLE_BOX_HEATER\nM141 S0\nM140 S0\nDISABLE_ALL_SENSOR\nG1 E-3 F1800\nG0 Z{max_layer_z + 3} F600\nUNLOAD_FILAMENT T=[current_extruder]\nG0 Y290 F12000\nG0 X90 Y290 F12000\n{if max_layer_z < max_print_height / 2}G1 Z{max_print_height / 2 + 10} F600{else}G1 Z{min(max_print_height, max_layer_z + 3)}{endif}\nM104 S0", "machine_end_gcode": "DISABLE_BOX_HEATER\nM141 S0\nM140 S0\nDISABLE_ALL_SENSOR\nG1 E-3 F1800\nG0 Z{max_layer_z + 3} F600\nUNLOAD_FILAMENT T=[current_extruder]\nG0 Y290 F12000\nG0 X90 Y290 F12000\n{if max_layer_z < max_print_height / 2}G1 Z{max_print_height / 2 + 10} F600{else}G1 Z{min(max_print_height, max_layer_z + 3)}{endif}\nM104 S0",
"time_lapse_gcode": "{if timelapse_type == 1} ; timelapse with wipe tower\nG92 E0\nG1 E-[retraction_length] F1800\nG2 Z{layer_z + 0.4} I0.86 J0.86 P1 F20000 ; spiral lift a little\nG1 Y304 F20000\nG1 X95 F20000\nG92 E0\nM400\nTIMELAPSE_TAKE_FRAME\nG1 Y324 F5000\nG1 E[retraction_length] F300\nG1 X65 F5000\nG1 Y290 F20000\n{elsif timelapse_type == 0} ; timelapse without wipe tower\nTIMELAPSE_TAKE_FRAME\n{endif}", "time_lapse_gcode": "{if timelapse_type == 1} ; timelapse with wipe tower\nG92 E0\nG1 E-[retraction_length] F1800\nG2 Z{layer_z + 0.4} I0.86 J0.86 P1 F20000 ; spiral lift a little\nG1 Y304 F20000\nG1 X95 F20000\nG92 E0\nM400\nTIMELAPSE_TAKE_FRAME\nG1 Y324 F5000\nG1 E[retraction_length] F300\nG1 X65 F5000\nG1 Y290 F20000\n{elsif timelapse_type == 0} ; timelapse without wipe tower\nTIMELAPSE_TAKE_FRAME\n{endif}",
"machine_start_gcode": "INIT_MAPPING_VALUE\nPRINT_START BED=[bed_temperature_initial_layer_single] HOTEND=[nozzle_temperature_initial_layer] CHAMBER=[chamber_temperature] EXTRUDER=[initial_no_support_extruder]\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nM83\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nM141 S[chamber_temperature]\nG4 P3000\nT[initial_tool]\nG0 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0)} Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0)} Z5 F6000\nG0 Z[initial_layer_print_height] F600\nG1 E3 F1800\nG1 X{(min(print_bed_max[0] - 12, first_layer_print_min[0] + 80))} E{85 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0) + 2} E{2 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0)} E{85 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0) + 85} E{83 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0) + 2} E{2 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0) + 3} E{82 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0) + 3} Z0\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0) + 6}\nG1 Z1 F600\nSET_PRINT_STATS_INFO CURRENT_LAYER=1", "machine_start_gcode": "PRINT_START BED=[bed_temperature_initial_layer_single] HOTEND=[nozzle_temperature_initial_layer] CHAMBER=[chamber_temperature] EXTRUDER=[initial_no_support_extruder]\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nM83\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nM141 S[chamber_temperature]\nG4 P3000\nT[initial_tool]\nG0 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0)} Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0)} Z5 F6000\nG0 Z[initial_layer_print_height] F600\nG1 E3 F1800\nG1 X{(min(print_bed_max[0] - 12, first_layer_print_min[0] + 80))} E{85 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0) + 2} E{2 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0)} E{85 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0) + 85} E{83 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0) + 2} E{2 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 Y{max((min(print_bed_max[1] - 3, first_layer_print_min[1] + 80) - 85), 0) + 3} E{82 * 0.5 * initial_layer_print_height * nozzle_diameter[0]} F3000\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0) + 3} Z0\nG1 X{max((min(print_bed_max[0] - 12, first_layer_print_min[0] + 80) - 85), 0) + 6}\nG1 Z1 F600\nSET_PRINT_STATS_INFO CURRENT_LAYER=1",
"thumbnails_format": "PNG", "thumbnails_format": "PNG",
"default_filament_profile": [ "default_filament_profile": [
"Qidi Generic PLA @Qidi X-Plus 4 0.4 nozzle" "Qidi Generic PLA @Qidi X-Plus 4 0.4 nozzle"
@@ -228,5 +228,7 @@
"prime_tower_lift_height": "-1", "prime_tower_lift_height": "-1",
"prime_tower_max_speed": "90", "prime_tower_max_speed": "90",
"prime_tower_flat_ironing": "0", "prime_tower_flat_ironing": "0",
"compatible_printers": [] "compatible_printers": [],
"gcode_label_objects": "0",
"exclude_object": "1"
} }
+1 -1
View File
@@ -353,7 +353,7 @@ private:
// The basic Display. This is almost just an interface but will do all the // The basic Display. This is almost just an interface but will do all the
// initialization and show the fps values. Overriding the render_scene is // initialization and show the fps values. Overriding the render_scene is
// needed to show the scene content. The specific method of displaying the // needed to show the scene content. The specific method of displaying the
// scene is up the the particular implementation (OpenCSG or other screen space // scene is up the particular implementation (OpenCSG or other screen space
// boolean algorithms) // boolean algorithms)
class Display : public Scene::Listener class Display : public Scene::Listener
{ {
@@ -31,7 +31,7 @@ finish-args:
- --filesystem=/mnt - --filesystem=/mnt
- --filesystem=/run/spnav.sock:ro - --filesystem=/run/spnav.sock:ro
# Allow read-only access to OrcaSlicer's legacy config and cache directories (if they exist) for migration purposes. # Allow read-only access to OrcaSlicer's legacy config and cache directories (if they exist) for migration purposes.
- --filesystem=~/.var/app/io.github.orcaslicer.OrcaSlicer:ro - --filesystem=~/.var/app/io.github.softfever.OrcaSlicer:ro
# Allow OrcaSlicer to own and talk to instance-check D-Bus names (InstanceCheck.cpp) # Allow OrcaSlicer to own and talk to instance-check D-Bus names (InstanceCheck.cpp)
- --talk-name=com.orcaslicer.OrcaSlicer.InstanceCheck.* - --talk-name=com.orcaslicer.OrcaSlicer.InstanceCheck.*
- --own-name=com.orcaslicer.OrcaSlicer.InstanceCheck.* - --own-name=com.orcaslicer.OrcaSlicer.InstanceCheck.*
+2 -3
View File
@@ -14,7 +14,6 @@ export REQUIRED_DEV_PACKAGES=(
glew glew
gst-plugins-good gst-plugins-good
gstreamer gstreamer
gstreamermm
gtk3 gtk3
libmspack libmspack
libsecret libsecret
@@ -24,7 +23,7 @@ export REQUIRED_DEV_PACKAGES=(
openssl openssl
texinfo texinfo
wayland-protocols wayland-protocols
webkit2gtk webkit2gtk-4.1
wget wget
) )
@@ -37,7 +36,7 @@ then
done done
if [[ "${#NEEDED_PKGS[*]}" -gt 0 ]]; then if [[ "${#NEEDED_PKGS[*]}" -gt 0 ]]; then
sudo pacman -Syy --noconfirm "${NEEDED_PKGS[@]}" sudo pacman -Syu --noconfirm "${NEEDED_PKGS[@]}"
fi fi
echo -e "done\n" echo -e "done\n"
exit 0 exit 0
+2 -2
View File
@@ -23,7 +23,7 @@ if %FULL_MODE%==1 (
call :prepareGettextList "%list_file%" "%filtered_list%" "%missing_list%" call :prepareGettextList "%list_file%" "%filtered_list%" "%missing_list%"
if "!has_sources!"=="1" ( if "!has_sources!"=="1" (
if not exist "%generated_i18n%" mkdir "%generated_i18n%" if not exist "%generated_i18n%" mkdir "%generated_i18n%"
.\tools\xgettext.exe --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f "%filtered_list%" -o "%generated_pot%" .\tools\xgettext.exe --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost --no-wrap -f "%filtered_list%" -o "%generated_pot%"
if errorlevel 1 ( if errorlevel 1 (
set "script_exit_code=1" set "script_exit_code=1"
) else ( ) else (
@@ -122,7 +122,7 @@ exit /b %errorlevel%
set "lang=%name:OrcaSlicer_=%" set "lang=%name:OrcaSlicer_=%"
if %FULL_MODE%==1 if exist "%pot_file%" ( if %FULL_MODE%==1 if exist "%pot_file%" (
set "merged_file=%TEMP%\orca_gettext_merged_%RANDOM%_%RANDOM%.po" set "merged_file=%TEMP%\orca_gettext_merged_%RANDOM%_%RANDOM%.po"
.\tools\msgmerge.exe -N -o "!merged_file!" "%file%" "%pot_file%" .\tools\msgmerge.exe -N --no-wrap -o "!merged_file!" "%file%" "%pot_file%"
if errorlevel 1 ( if errorlevel 1 (
if exist "!merged_file!" del "!merged_file!" if exist "!merged_file!" del "!merged_file!"
echo Error encountered with msgmerge command for language !lang!. echo Error encountered with msgmerge command for language !lang!.
+2 -2
View File
@@ -85,7 +85,7 @@ if $FULL_MODE; then
generated_pot_file="${generated_i18n_dir}/OrcaSlicer.pot" generated_pot_file="${generated_i18n_dir}/OrcaSlicer.pot"
mkdir -p "$generated_i18n_dir" mkdir -p "$generated_i18n_dir"
xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f "$filtered_list" -o "$generated_pot_file" xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost --no-wrap -f "$filtered_list" -o "$generated_pot_file"
python3 scripts/HintsToPot.py ./resources "$generated_i18n_dir" python3 scripts/HintsToPot.py ./resources "$generated_i18n_dir"
if [ -f "$pot_file" ] && files_equal_ignoring_pot_date "$pot_file" "$generated_pot_file"; then if [ -f "$pot_file" ] && files_equal_ignoring_pot_date "$pot_file" "$generated_pot_file"; then
@@ -108,7 +108,7 @@ do
if [ -f "$dir/OrcaSlicer_${lang}.po" ]; then if [ -f "$dir/OrcaSlicer_${lang}.po" ]; then
if $FULL_MODE && [ -f "$pot_file" ]; then if $FULL_MODE && [ -f "$pot_file" ]; then
merged_po=$(mktemp) merged_po=$(mktemp)
if ! msgmerge -N -o "$merged_po" "$dir/OrcaSlicer_${lang}.po" "$pot_file"; then if ! msgmerge -N --no-wrap -o "$merged_po" "$dir/OrcaSlicer_${lang}.po" "$pot_file"; then
echo "Error encountered with msgmerge command for language ${lang}." echo "Error encountered with msgmerge command for language ${lang}."
rm -f "$merged_po" rm -f "$merged_po"
exit 1 exit 1
+3 -1
View File
@@ -9,4 +9,6 @@ ROOT_DIR="$(dirname "$0")/.."
cd "${ROOT_DIR}" || exit 1 cd "${ROOT_DIR}" || exit 1
ctest --test-dir build/tests -L "Http|PlaceholderParser" --output-junit "$(pwd)/ctest_results.xml" --output-on-failure -j # Run the whole suite, excluding tests tagged [NotWorking].
# --no-tests=error fails the job if the filter matches nothing (instead of passing green).
ctest --test-dir build/tests -LE "NotWorking" --no-tests=error --output-junit "$(pwd)/ctest_results.xml" --output-on-failure -j
+13 -6
View File
@@ -6058,9 +6058,9 @@ int CLI::run(int argc, char **argv)
} }
(dynamic_cast<Print*>(print))->is_BBL_printer() = is_bbl_vendor_preset; (dynamic_cast<Print*>(print))->is_BBL_printer() = is_bbl_vendor_preset;
StringObjectException warning; std::vector<StringObjectException> warnings;
print_fff->set_check_multi_filaments_compatibility(!allow_mix_temp); print_fff->set_check_multi_filaments_compatibility(!allow_mix_temp);
auto err = print->validate(&warning); auto err = print->validate(&warnings);
if (!err.string.empty()) { if (!err.string.empty()) {
if ((STRING_EXCEPT_LAYER_HEIGHT_EXCEEDS_LIMIT == err.type) && no_check) { if ((STRING_EXCEPT_LAYER_HEIGHT_EXCEEDS_LIMIT == err.type) && no_check) {
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< err.string << std::endl; BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< err.string << std::endl;
@@ -6094,8 +6094,9 @@ int CLI::run(int argc, char **argv)
flush_and_exit(validate_error); flush_and_exit(validate_error);
} }
} }
else if (!warning.string.empty()) { else if (!warnings.empty()) {
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< warning.string << std::endl; for (const auto& w : warnings)
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< w.string << std::endl;
} }
if (print->empty()) { if (print->empty()) {
@@ -6115,8 +6116,14 @@ int CLI::run(int argc, char **argv)
BOOST_LOG_TRIVIAL(info) << "set print's callback to cli_status_callback."; BOOST_LOG_TRIVIAL(info) << "set print's callback to cli_status_callback.";
print->set_status_callback(cli_status_callback); print->set_status_callback(cli_status_callback);
g_cli_callback_mgr.set_plate_info(index+1, (plate_to_slice== 0)?partplate_list.get_plate_count():1); g_cli_callback_mgr.set_plate_info(index+1, (plate_to_slice== 0)?partplate_list.get_plate_count():1);
if (!warning.string.empty()) { if (!warnings.empty()) {
PrintBase::SlicingStatus slicing_status{4, warning.string, 0, 0}; std::string warning_text;
for (const auto& w : warnings) {
if (!warning_text.empty())
warning_text += "\n";
warning_text += w.string;
}
PrintBase::SlicingStatus slicing_status{4, warning_text, 0, 0};
cli_status_callback(slicing_status); cli_status_callback(slicing_status);
} }
else { else {
+1 -1
View File
@@ -10,7 +10,7 @@ namespace Slic3r::Arachne::LinearAlg2D
{ {
/*! /*!
* Returns the determinant of the 2D matrix defined by the the vectors ab and ap as rows. * Returns the determinant of the 2D matrix defined by the vectors ab and ap as rows.
* *
* The returned value is zero for \p p lying (approximately) on the line going through \p a and \p b * The returned value is zero for \p p lying (approximately) on the line going through \p a and \p b
* The value is positive for values lying to the left and negative for values lying to the right when looking from \p a to \p b. * The value is positive for values lying to the left and negative for values lying to the right when looking from \p a to \p b.
+1 -1
View File
@@ -520,7 +520,7 @@ ClipperLib::Paths expolygon_offset(const Slic3r::ExPolygon &expolygon, const flo
// This is a safe variant of the polygons offset, tailored for multiple ExPolygons. // This is a safe variant of the polygons offset, tailored for multiple ExPolygons.
// It is required, that the input expolygons do not overlap and that the holes of each ExPolygon don't intersect with their respective outer contours. // It is required, that the input expolygons do not overlap and that the holes of each ExPolygon don't intersect with their respective outer contours.
// Each ExPolygon is offsetted separately. For outer offset, the the offsetted ExPolygons shall be united outside of this function. // Each ExPolygon is offsetted separately. For outer offset, the offsetted ExPolygons shall be united outside of this function.
template<typename ExPolygonVector> template<typename ExPolygonVector>
static std::pair<ClipperLib::Paths, size_t> expolygons_offset_raw(const ExPolygonVector &expolygons, const float delta, ClipperLib::JoinType joinType, double miterLimit) static std::pair<ClipperLib::Paths, size_t> expolygons_offset_raw(const ExPolygonVector &expolygons, const float delta, ClipperLib::JoinType joinType, double miterLimit)
{ {
+1 -1
View File
@@ -2186,7 +2186,7 @@ private:
else else
throw ConfigurationError("Serializing NaN"); throw ConfigurationError("Serializing NaN");
} }
else { else if (this->keys_map != nullptr) {
for (const auto& kvp : *this->keys_map) for (const auto& kvp : *this->keys_map)
if (kvp.second == v) if (kvp.second == v)
ss << kvp.first; ss << kvp.first;
+1 -1
View File
@@ -1025,7 +1025,7 @@ void mark_boundary_segments_touching_infill(
#endif // INFILL_DEBUG_OUTPUT #endif // INFILL_DEBUG_OUTPUT
EdgeGrid::Grid grid; EdgeGrid::Grid grid;
// Make sure that the the grid is big enough for queries against the thick segment. // Make sure that the grid is big enough for queries against the thick segment.
grid.set_bbox(boundary_bbox.inflated(distance_colliding * 1.43)); grid.set_bbox(boundary_bbox.inflated(distance_colliding * 1.43));
// Inflate the bounding box by a thick line width. // Inflate the bounding box by a thick line width.
grid.create(boundary, coord_t(std::max(clip_distance, distance_colliding) + scale_(10.))); grid.create(boundary, coord_t(std::max(clip_distance, distance_colliding) + scale_(10.)));
+1 -1
View File
@@ -2318,7 +2318,7 @@ static std::vector<MonotonicRegionLink> chain_monotonic_regions(
constexpr float const pheromone_evaporation = 0.1f; constexpr float const pheromone_evaporation = 0.1f;
// Evaporation rate to diversify paths taken by individual ants. // Evaporation rate to diversify paths taken by individual ants.
constexpr float const pheromone_diversification = 0.1f; constexpr float const pheromone_diversification = 0.1f;
// Probability at which to take the next best path. Otherwise take the the path based on the cost distribution. // Probability at which to take the next best path. Otherwise take the path based on the cost distribution.
constexpr float const probability_take_best = 0.9f; constexpr float const probability_take_best = 0.9f;
// Exponents of the cost function. // Exponents of the cost function.
constexpr float const pheromone_alpha = 1.f; // pheromone exponent constexpr float const pheromone_alpha = 1.f; // pheromone exponent
+1 -1
View File
@@ -61,7 +61,7 @@ static inline FlowRole opt_key_to_flow_role(const std::string &opt_key)
static inline void throw_on_missing_variable(const std::string &opt_key, const char *dependent_opt_key) static inline void throw_on_missing_variable(const std::string &opt_key, const char *dependent_opt_key)
{ {
throw FlowErrorMissingVariable((boost::format(L("Failed to calculate line width of %1%. Cannot get value of \"%2%\" ")) % opt_key % dependent_opt_key).str()); throw FlowErrorMissingVariable((boost::format(L("Failed to calculate line width of %1%. Cannot get value of \u201c%2%\u201d ")) % opt_key % dependent_opt_key).str());
} }
// Used to provide hints to the user on default extrusion width values, and to provide reasonable values to the PlaceholderParser. // Used to provide hints to the user on default extrusion width values, and to provide reasonable values to the PlaceholderParser.
+49 -1
View File
@@ -17,6 +17,7 @@
#include <limits> #include <limits>
#include <stdexcept> #include <stdexcept>
#include <iomanip> #include <iomanip>
#include <regex>
#include <boost/assign.hpp> #include <boost/assign.hpp>
#include <boost/bimap.hpp> #include <boost/bimap.hpp>
@@ -8137,6 +8138,21 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
return true; return true;
} }
// Orca: replicates GCode's object-label sanitization (sanitize_instance_name in GCode.cpp), used to
// build the per-instance object name written into slice_info.config so it matches the EXCLUDE_OBJECT /
// M486 object name embedded in the g-code. Keep this in sync with GCode.cpp.
static std::string sanitize_object_label(const std::string& name)
{
// Compiled once: building a std::regex is expensive and this runs per object instance.
static const std::regex non_word_re("[ !@#$%^&*()=+\\[\\]{};:\",']+");
std::string result = std::regex_replace(name, non_word_re, "_");
if (!result.empty() && result.front() == '_')
result.erase(result.begin());
if (!result.empty() && result.back() == '_')
result.erase(result.end() - 1);
return result;
}
bool _BBS_3MF_Exporter::_add_slice_info_config_file_to_archive(mz_zip_archive& archive, const Model& model, PlateDataPtrs& plate_data_list, const ObjectToObjectDataMap &objects_data, const DynamicPrintConfig& config) bool _BBS_3MF_Exporter::_add_slice_info_config_file_to_archive(mz_zip_archive& archive, const Model& model, PlateDataPtrs& plate_data_list, const ObjectToObjectDataMap &objects_data, const DynamicPrintConfig& config)
{ {
std::stringstream stream; std::stringstream stream;
@@ -8217,6 +8233,21 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
stream << "\"/>\n"; stream << "\"/>\n";
} }
// Orca: for non-BambuLab printers that label objects in the g-code (Klipper/Marlin/RRF via
// EXCLUDE_OBJECT / M486), write the per-instance g-code object name into slice_info.config
// (e.g. "OrcaCube_v2.drc_id_0_copy_0") so the printer can correlate objects between the 3MF
// and the g-code. The g-code names objects per plate as
// "<name>_id_<object index>_copy_<instance index>" (see GCode::set_object_info), which we
// reconstruct here from the (sorted) objects_and_instances list. identify_id is unchanged.
// BambuLab printers keep the raw object name.
const GCodeFlavor slice_gcode_flavor = config.opt_enum<GCodeFlavor>("gcode_flavor");
const bool use_gcode_object_name = !GCodeProcessor::s_IsBBLPrinter &&
(slice_gcode_flavor == gcfKlipper || slice_gcode_flavor == gcfMarlinLegacy ||
slice_gcode_flavor == gcfMarlinFirmware || slice_gcode_flavor == gcfRepRapFirmware);
int gcode_object_index = -1;
int gcode_copy_index = 0;
int last_object_id = -1;
for (auto it = plate_data->objects_and_instances.begin(); it != plate_data->objects_and_instances.end(); it++) for (auto it = plate_data->objects_and_instances.begin(); it != plate_data->objects_and_instances.end(); it++)
{ {
int obj_id = it->first; int obj_id = it->first;
@@ -8241,7 +8272,24 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
identify_id = inst->id().id; identify_id = inst->id().id;
bool skipped = std::find(plate_data->skipped_objects.begin(), plate_data->skipped_objects.end(), identify_id) != bool skipped = std::find(plate_data->skipped_objects.begin(), plate_data->skipped_objects.end(), identify_id) !=
plate_data->skipped_objects.end(); plate_data->skipped_objects.end();
stream << " <" << OBJECT_TAG << " " << IDENTIFYID_ATTR << "=\"" << std::to_string(identify_id) << "\" " << NAME_ATTR << "=\"" << xml_escape(obj->name)
// Advance the per-plate g-code object/copy index. objects_and_instances is sorted,
// so all instances of the same object are contiguous.
if (obj_id != last_object_id) {
++gcode_object_index;
gcode_copy_index = 0;
last_object_id = obj_id;
} else {
++gcode_copy_index;
}
std::string object_name = obj->name;
if (use_gcode_object_name)
// Matches GCode::get_instance_name(): sanitize(sanitize(name) + "_id_<obj>_copy_<inst>").
object_name = sanitize_object_label(sanitize_object_label(obj->name) + "_id_" +
std::to_string(gcode_object_index) + "_copy_" + std::to_string(gcode_copy_index));
stream << " <" << OBJECT_TAG << " " << IDENTIFYID_ATTR << "=\"" << std::to_string(identify_id) << "\" " << NAME_ATTR << "=\"" << xml_escape(object_name)
<< "\" " << SKIPPED_ATTR << "=\"" << (skipped ? "true" : "false") << "\" " << SKIPPED_ATTR << "=\"" << (skipped ? "true" : "false")
<< "\" />\n"; << "\" />\n";
} }
+8 -6
View File
@@ -1844,10 +1844,10 @@ std::vector<GCode::LayerToPrint> GCode::collect_layers_to_print(const PrintObjec
std::string warning; std::string warning;
size_t i = 0; size_t i = 0;
for (i = 0; i < std::min(warning_ranges.size(), size_t(5)); ++i) for (i = 0; i < std::min(warning_ranges.size(), size_t(5)); ++i)
warning += Slic3r::format(_(L("Object can't be printed for empty layer between %1% and %2%.")), warning += Slic3r::format(_(L("The object has empty layers between %1% and %2% and can\u2019t be printed.")),
warning_ranges[i].first, warning_ranges[i].second) + "\n"; warning_ranges[i].first, warning_ranges[i].second) + "\n";
warning += Slic3r::format(_(L("Object: %1%")), object.model_object()->name) + "\n" warning += Slic3r::format(_(L("Object: %1%")), object.model_object()->name) + "\n"
+ _(L("Maybe parts of the object at these height are too thin, or the object has faulty mesh")); + _(L("Parts of the object at these heights may be too thin or the object may have a faulty mesh."));
const_cast<Print*>(object.print())->active_step_add_warning( const_cast<Print*>(object.print())->active_step_add_warning(
PrintStateBase::WarningLevel::CRITICAL, warning, PrintStateBase::SlicingEmptyGcodeLayers); PrintStateBase::WarningLevel::CRITICAL, warning, PrintStateBase::SlicingEmptyGcodeLayers);
@@ -2222,7 +2222,9 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu
BOOST_LOG_TRIVIAL(info) << "Exporting G-code finished" << log_memory_info(); BOOST_LOG_TRIVIAL(info) << "Exporting G-code finished" << log_memory_info();
print->set_done(psGCodeExport); print->set_done(psGCodeExport);
if(is_BBL_Printer()) // Orca: label_object_enabled reflects whether objects are labeled in the g-code (EXCLUDE_OBJECT /
// M486), which is driven by exclude_object for every printer
if(result != nullptr)
result->label_object_enabled = m_enable_exclude_object; result->label_object_enabled = m_enable_exclude_object;
// Write the profiler measurements to file // Write the profiler measurements to file
PROFILE_UPDATE(); PROFILE_UPDATE();
@@ -2807,7 +2809,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
} }
if (initial_extruder_id == static_cast<unsigned int>(-1)) if (initial_extruder_id == static_cast<unsigned int>(-1))
// No object to print was found, cancel the G-code export. // No object to print was found, cancel the G-code export.
throw Slic3r::SlicingError(_(L("No object can be printed. Maybe too small"))); throw Slic3r::SlicingError(_(L("No object can be printed. It may be too small.")));
// We don't allow switching of extruders per layer by Model::custom_gcode_per_print_z in sequential mode. // We don't allow switching of extruders per layer by Model::custom_gcode_per_print_z in sequential mode.
// Use the extruder IDs collected from Regions. // Use the extruder IDs collected from Regions.
this->set_extruders(print.extruders()); this->set_extruders(print.extruders());
@@ -2823,7 +2825,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
max_additional_fan = temp_max_additional_fan; max_additional_fan = temp_max_additional_fan;
if (tool_ordering.all_extruders().empty()) if (tool_ordering.all_extruders().empty())
// No object to print was found, cancel the G-code export. // No object to print was found, cancel the G-code export.
throw Slic3r::SlicingError(_(L("No object can be printed. Maybe too small"))); throw Slic3r::SlicingError(_(L("No object can be printed. It may be too small.")));
has_wipe_tower = print.has_wipe_tower() && tool_ordering.has_wipe_tower(); has_wipe_tower = print.has_wipe_tower() && tool_ordering.has_wipe_tower();
// Orca: support all extruder priming // Orca: support all extruder priming
initial_extruder_id = (wipe_tower_type == WipeTowerType::Type2 && has_wipe_tower && !print.config().single_extruder_multi_material_priming) ? initial_extruder_id = (wipe_tower_type == WipeTowerType::Type2 && has_wipe_tower && !print.config().single_extruder_multi_material_priming) ?
@@ -5412,7 +5414,7 @@ LayerResult GCode::process_layer(
} }
} }
// We are almost ready to print. However, we must go through all the objects twice to print the the overridden extrusions first (infill/perimeter wiping feature): // We are almost ready to print. However, we must go through all the objects twice to print the overridden extrusions first (infill/perimeter wiping feature):
std::vector<ObjectByExtruder::Island::Region> by_region_per_copy_cache; std::vector<ObjectByExtruder::Island::Region> by_region_per_copy_cache;
for (int print_wipe_extrusions = is_anything_overridden; print_wipe_extrusions>=0; --print_wipe_extrusions) { for (int print_wipe_extrusions = is_anything_overridden; print_wipe_extrusions>=0; --print_wipe_extrusions) {
if (is_anything_overridden && print_wipe_extrusions == 0) if (is_anything_overridden && print_wipe_extrusions == 0)
+8 -8
View File
@@ -3158,7 +3158,7 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
// Orca: Integrate filament consumption for purging performed to an external device and controlled via macros // Orca: Integrate filament consumption for purging performed to an external device and controlled via macros
// (eg. Happy Hare) in the filament consumption stats. // (eg. Happy Hare) in the filament consumption stats.
if (boost::starts_with(comment, GCodeProcessor::External_Purge_Tag)) { if (boost::starts_with(comment, GCodeProcessor::External_Purge_Tag)) {
std::regex numberRegex(R"(\d+\.\d+)"); static const std::regex numberRegex(R"(\d+\.\d+)");
std::smatch match; std::smatch match;
std::string line(comment); std::string line(comment);
if (std::regex_search(line, match, numberRegex)) { if (std::regex_search(line, match, numberRegex)) {
@@ -5014,7 +5014,7 @@ void GCodeProcessor::process_M572(const GCodeReader::GCodeLine &line)
void GCodeProcessor::process_SET_PRESSURE_ADVANCE(const GCodeReader::GCodeLine& line) void GCodeProcessor::process_SET_PRESSURE_ADVANCE(const GCodeReader::GCodeLine& line)
{ {
std::regex regex(R"(SET_PRESSURE_ADVANCE\s+(?:.*\s+)?ADVANCE\s*=\s*([\d.]+))"); static const std::regex regex(R"(SET_PRESSURE_ADVANCE\s+(?:.*\s+)?ADVANCE\s*=\s*([\d.]+))");
std::smatch matches; std::smatch matches;
if (std::regex_search(line.raw(), matches, regex) && matches.size() > 1) { if (std::regex_search(line.raw(), matches, regex) && matches.size() > 1) {
@@ -5236,9 +5236,9 @@ void GCodeProcessor::process_M205(const GCodeReader::GCodeLine& line)
void GCodeProcessor::process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& line) void GCodeProcessor::process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& line)
{ {
// handle SQUARE_CORNER_VELOCITY // handle SQUARE_CORNER_VELOCITY
std::regex pattern("\\sSQUARE_CORNER_VELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)"); static const std::regex square_corner_velocity_pattern("\\sSQUARE_CORNER_VELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)");
std::smatch matches; std::smatch matches;
if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) { if (std::regex_search(line.raw(), matches, square_corner_velocity_pattern) && matches.size() == 2) {
float _jerk = 0; float _jerk = 0;
try try
{ {
@@ -5251,8 +5251,8 @@ void GCodeProcessor::process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& li
} }
} }
pattern = std::regex("\\sACCEL\\s*=\\s*([0-9]*\\.*[0-9]*)"); static const std::regex accel_pattern("\\sACCEL\\s*=\\s*([0-9]*\\.*[0-9]*)");
if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) { if (std::regex_search(line.raw(), matches, accel_pattern) && matches.size() == 2) {
float _accl = 0; float _accl = 0;
try try
{ {
@@ -5265,8 +5265,8 @@ void GCodeProcessor::process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& li
} }
} }
pattern = std::regex("\\sVELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)"); static const std::regex velocity_pattern("\\sVELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)");
if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) { if (std::regex_search(line.raw(), matches, velocity_pattern) && matches.size() == 2) {
float _speed = 0; float _speed = 0;
try try
{ {
+2 -2
View File
@@ -493,10 +493,10 @@ std::string GCodeWriter::set_input_shaping(char axis, float damp, float freq, st
break; break;
} }
case gcfMarlinLegacy: { case gcfMarlinLegacy: {
throw std::runtime_error(_u8L("Input shaping is not supported by Marlin < 2.1.2.\nCheck your firmware version and update your G-code flavor to ´Marlin 2´")); throw std::runtime_error(_u8L("Input shaping is not supported by Marlin < 2.1.2.\nCheck your firmware version and update your G-code flavor to ´Marlin 2´."));
} }
default: default:
throw std::runtime_error(_u8L("Input shaping is only supported by Klipper, RepRapFirmware and Marlin 2")); throw std::runtime_error(_u8L("Input shaping is only supported by Klipper, RepRapFirmware and Marlin 2."));
} }
if (!gcode.str().empty()) { if (!gcode.str().empty()) {
if (GCodeWriter::full_gcode_comment) { if (GCodeWriter::full_gcode_comment) {
+1 -1
View File
@@ -1236,7 +1236,7 @@ std::vector<Vec2d> edge_offset_contour_intersections(
// 2) offset_distance == dmin_new -> one duplicate point is found. // 2) offset_distance == dmin_new -> one duplicate point is found.
// If 2) is ignored, then two tangentially touching offset curves are created. // If 2) is ignored, then two tangentially touching offset curves are created.
// If not ignored, then the two offset curves merge at this double point. // If not ignored, then the two offset curves merge at this double point.
// We should merge the contours while pushing the the two copies of the tangent point away a bit. // We should merge the contours while pushing the two copies of the tangent point away a bit.
dmin = dmin_new; dmin = dmin_new;
num_intersections = (offset_distance > dmin) + 1; num_intersections = (offset_distance > dmin) + 1;
} }
+8 -14
View File
@@ -225,7 +225,7 @@ _finished:
} }
if (model.objects.empty()) if (model.objects.empty())
throw Slic3r::RuntimeError(_L("The supplied file couldn't be read because it's empty")); throw Slic3r::RuntimeError(_L("The supplied file couldn\'t be read because it\'s empty."));
for (ModelObject *o : model.objects) for (ModelObject *o : model.objects)
o->input_file = input_file; o->input_file = input_file;
@@ -337,7 +337,7 @@ Model Model::read_from_file(const std::string&
} }
#endif #endif
else else
throw Slic3r::RuntimeError(_L("Unknown file format. Input file must have .stl, .obj, .amf(.xml) extension.")); throw Slic3r::RuntimeError(_L("Unknown file format: input file must have .stl, .obj, or .amf(.xml) extension."));
if (is_cb_cancel) { if (is_cb_cancel) {
Model empty_model; Model empty_model;
@@ -352,7 +352,7 @@ Model Model::read_from_file(const std::string&
} }
if (model.objects.empty()) if (model.objects.empty())
throw Slic3r::RuntimeError(_L("The supplied file couldn't be read because it's empty")); throw Slic3r::RuntimeError(_L("The supplied file couldn\'t be read because it\'s empty."));
for (ModelObject *o : model.objects) for (ModelObject *o : model.objects)
o->input_file = input_file; o->input_file = input_file;
@@ -399,7 +399,7 @@ Model Model::read_from_archive(const std::string& input_file, DynamicPrintConfig
else if (boost::algorithm::iends_with(input_file, ".zip.amf")) else if (boost::algorithm::iends_with(input_file, ".zip.amf"))
result = load_amf(input_file.c_str(), config, config_substitutions, &model, &is_bbl_3mf); result = load_amf(input_file.c_str(), config, config_substitutions, &model, &is_bbl_3mf);
else else
throw Slic3r::RuntimeError(_L("Unknown file format. Input file must have .3mf or .zip.amf extension.")); throw Slic3r::RuntimeError(_L("Unknown file format: input file must have .3mf or .zip.amf extension."));
if (out_file_type != En3mfType::From_Prusa) { if (out_file_type != En3mfType::From_Prusa) {
if (is_orca_3mf) if (is_orca_3mf)
@@ -696,8 +696,7 @@ unsigned int Model::update_print_volume_state(const BuildVolume &build_volume)
num_printable += model_object->update_instances_print_volume_state(build_volume); num_printable += model_object->update_instances_print_volume_state(build_volume);
//BBS: add logs for build_volume //BBS: add logs for build_volume
const BoundingBoxf3& print_volume = build_volume.bounding_volume(); const BoundingBoxf3& print_volume = build_volume.bounding_volume();
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}, got %7% printable istances")\ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}, got %7% printable istances") %print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z() %num_printable;
%print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z() %num_printable;
return num_printable; return num_printable;
} }
@@ -2127,10 +2126,7 @@ void ModelObject::split(ModelObjectPtrs* new_objects, const bool remap_paint)
if (is_multi_volume_object) { if (is_multi_volume_object) {
// BBS: volume geometry not changed, so we can keep the paint facets // BBS: volume geometry not changed, so we can keep the paint facets
#define COPY_FACETS(f) \ #define COPY_FACETS(f) if (new_vol->f.timestamp() == volume->f.timestamp()) new_vol->f.reset(); /* BBS: let next assign take effect */ new_vol->f.assign(volume->f)
if (new_vol->f.timestamp() == volume->f.timestamp()) \
new_vol->f.reset(); /* BBS: let next assign take effect */ \
new_vol->f.assign(volume->f)
COPY_FACETS(supported_facets); COPY_FACETS(supported_facets);
COPY_FACETS(seam_facets); COPY_FACETS(seam_facets);
@@ -2372,8 +2368,7 @@ unsigned int ModelObject::update_instances_print_volume_state(const BuildVolume
unsigned int num_printable = 0; unsigned int num_printable = 0;
//BBS: add logs for build_volume //BBS: add logs for build_volume
//const BoundingBoxf3& print_volume = build_volume.bounding_volume(); //const BoundingBoxf3& print_volume = build_volume.bounding_volume();
//BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}")\ //BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}") // %print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z();
// %print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z();
for (ModelInstance* model_instance : this->instances) { for (ModelInstance* model_instance : this->instances) {
if (model_instance->update_print_volume_state(build_volume) == ModelInstancePVS_Inside) { if (model_instance->update_print_volume_state(build_volume) == ModelInstancePVS_Inside) {
//BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", object %1%'s instance inside print volum")%this->name; //BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", object %1%'s instance inside print volum")%this->name;
@@ -3434,8 +3429,7 @@ ModelInstanceEPrintVolumeState ModelInstance::calc_print_volume_state(const Buil
BoundingBoxf3 bb = vol->get_convex_hull().bounding_box(); BoundingBoxf3 bb = vol->get_convex_hull().bounding_box();
Vec3d size = bb.size(); Vec3d size = bb.size();
if ((size.x() == 0.f) || (size.y() == 0.f) || (size.z() == 0.f)) { if ((size.x() == 0.f) || (size.y() == 0.f) || (size.z() == 0.f)) {
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", object %1%'s vol %2% is empty, skip it, box: {%3%, %4%, %5%} to {%6%, %7%, %8%}")%this->object->name %vol->name\ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", object %1%'s vol %2% is empty, skip it, box: {%3%, %4%, %5%} to {%6%, %7%, %8%}")%this->object->name %vol->name %bb.min.x() %bb.min.y() %bb.min.z()%bb.max.x() %bb.max.y() %bb.max.z();
%bb.min.x() %bb.min.y() %bb.min.z()%bb.max.x() %bb.max.y() %bb.max.z();
continue; continue;
} }
+4
View File
@@ -19,6 +19,10 @@ arrangement::ArrangePolygons get_arrange_polys(const Model &model, ModelInstance
for (ModelObject *mo : model.objects) for (ModelObject *mo : model.objects)
for (ModelInstance *minst : mo->instances) { for (ModelInstance *minst : mo->instances) {
minst->get_arrange_polygon(&ap); minst->get_arrange_polygon(&ap);
// ModelInstance::get_arrange_polygon leaves bed_idx at its UNARRANGED
// default; seed it to bed 0 (as get_instance_arrange_poly does) so the
// nester treats the item as placeable instead of returning it unplaced.
ap.bed_idx = 0;
input.emplace_back(ap); input.emplace_back(ap);
instances.emplace_back(minst); instances.emplace_back(minst);
} }
+1 -1
View File
@@ -179,7 +179,7 @@ static bool clip_narrow_corner(
bool blocked = forward == Blocked || backward == Blocked; bool blocked = forward == Blocked || backward == Blocked;
assert(polygon.size() < 3 || assert(polygon.size() < 3 ||
// Remaining triangle is CCW oriented. Both sides must be "blocked", but the other side may have not been // Remaining triangle is CCW oriented. Both sides must be "blocked", but the other side may have not been
// updated after the the p02 / p22 became united into a single point. // updated after the p02 / p22 became united into a single point.
blocked || blocked ||
// Remaining triangle is concave, however both of its arms are long. // Remaining triangle is concave, however both of its arms are long.
(forward == Far && backward == Far)); (forward == Far && backward == Far));
+1 -1
View File
@@ -1354,7 +1354,7 @@ static std::vector<std::string> s_Preset_printer_options {
"cooling_tube_retraction", "cooling_tube_retraction",
"cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "wipe_tower_type", "purge_in_prime_tower", "enable_filament_ramming", "tool_change_on_wipe_tower", "cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "wipe_tower_type", "purge_in_prime_tower", "enable_filament_ramming", "tool_change_on_wipe_tower",
"z_offset", "z_offset",
"disable_m73", "preferred_orientation", "emit_machine_limits_to_gcode", "pellet_modded_printer", "support_multi_bed_types", "default_bed_type", "bed_mesh_min","bed_mesh_max","bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "enable_long_retraction_when_cut","long_retractions_when_cut","retraction_distances_when_cut", "disable_m73", "preferred_orientation", "emit_machine_limits_to_gcode", "pellet_modded_printer", "support_multi_bed_types", "use_3mf", "default_bed_type", "bed_mesh_min","bed_mesh_max","bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "enable_long_retraction_when_cut","long_retractions_when_cut","retraction_distances_when_cut",
"bed_temperature_formula", "nozzle_flush_dataset" "bed_temperature_formula", "nozzle_flush_dataset"
}; };
+74 -77
View File
@@ -244,7 +244,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"bed_temperature_formula", "bed_temperature_formula",
"filament_notes", "filament_notes",
"process_notes", "process_notes",
"printer_notes" "printer_notes",
"use_3mf"
}; };
static std::unordered_set<std::string> steps_ignore; static std::unordered_set<std::string> steps_ignore;
@@ -700,13 +701,13 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
//juedge the exclude area //juedge the exclude area
if (!intersection(exclude_polys, convex_hull_no_offset).empty()) { if (!intersection(exclude_polys, convex_hull_no_offset).empty()) {
if (single_object_exception.string.empty()) { if (single_object_exception.string.empty()) {
single_object_exception.string = (boost::format(L("%1% is too close to exclusion area, there may be collisions when printing.")) %instance.model_instance->get_object()->name).str(); single_object_exception.string = (boost::format(L("%1% is too close to exclusion area. There may be collisions when printing.")) %instance.model_instance->get_object()->name).str();
// single_object_exception.object = instance.model_instance->get_object(); // single_object_exception.object = instance.model_instance->get_object();
//ORCA: Pass ModelInstance instead of ModelObject //ORCA: Pass ModelInstance instead of ModelObject
single_object_exception.object = instance.model_instance; single_object_exception.object = instance.model_instance;
} }
else { else {
single_object_exception.string += "\n"+(boost::format(L("%1% is too close to exclusion area, there may be collisions when printing.")) %instance.model_instance->get_object()->name).str(); single_object_exception.string += "\n"+(boost::format(L("%1% is too close to exclusion area. There may be collisions when printing.")) %instance.model_instance->get_object()->name).str();
single_object_exception.object = nullptr; single_object_exception.object = nullptr;
} }
//if (polygons) { //if (polygons) {
@@ -1069,7 +1070,7 @@ static StringObjectException layered_print_cleareance_valid(const Print &print,
/*if (warning) { /*if (warning) {
warning->string += L("Prime Tower is too close to exclusion area, there may be collisions when printing.\n"); warning->string += L("Prime Tower is too close to exclusion area, there may be collisions when printing.\n");
}*/ }*/
return {L("Prime Tower") + L(" is too close to exclusion area, and collisions will be caused.\n")}; return {L("Prime Tower") + L(" is too close to an exclusion area, and collisions will be caused.\n")};
} }
if (print_config.enable_wrapping_detection.value && !intersection({wrapping_poly}, convex_hulls_temp).empty()) { if (print_config.enable_wrapping_detection.value && !intersection({wrapping_poly}, convex_hulls_temp).empty()) {
return {L("Prime Tower") + L(" is too close to clumping detection area, and collisions will be caused.\n")}; return {L("Prime Tower") + L(" is too close to clumping detection area, and collisions will be caused.\n")};
@@ -1286,9 +1287,22 @@ StringObjectException Print::check_multi_filament_valid(const Print& print)
} }
// Precondition: Print::validate() requires the Print::apply() to be called its invocation. // Precondition: Print::validate() requires the Print::apply() to be called its invocation.
//BBS: refine seq-print validation logic.....FIXME:StringObjectException *warning can only contain one warning, but there might be many warnings, need a vector<StringObjectException> //BBS: refine seq-print validation logic
StringObjectException Print::validate(StringObjectException *warning, Polygons* collison_polygons, std::vector<std::pair<Polygon, float>>* height_polygons) const StringObjectException Print::validate(std::vector<StringObjectException> *warnings, Polygons* collison_polygons, std::vector<std::pair<Polygon, float>>* height_polygons) const
{ {
auto add_warning = [warnings](StringObjectException w) {
w.is_warning = true;
if (warnings != nullptr)
warnings->push_back(std::move(w));
};
auto warn = [&](std::string msg, std::string opt_key = "", const ObjectBase* object = nullptr) {
StringObjectException w;
w.string = std::move(msg);
w.opt_key = std::move(opt_key);
w.object = object;
add_warning(std::move(w));
};
std::vector<unsigned int> extruders = this->extruders(); std::vector<unsigned int> extruders = this->extruders();
unsigned int nozzles = m_config.nozzle_diameter.size(); unsigned int nozzles = m_config.nozzle_diameter.size();
@@ -1313,9 +1327,8 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
if (!ret.string.empty()) if (!ret.string.empty())
{ {
ret.type = STRING_EXCEPT_FILAMENTS_DIFFERENT_TEMP; ret.type = STRING_EXCEPT_FILAMENTS_DIFFERENT_TEMP;
if (ret.is_warning && warning != nullptr) { if (ret.is_warning) {
*warning = ret; add_warning(ret);
//return {};
}else }else
return ret; return ret;
} }
@@ -1341,32 +1354,26 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
} }
else { else {
//BBS //BBS
auto ret = layered_print_cleareance_valid(*this, warning); StringObjectException layer_warning;
auto ret = layered_print_cleareance_valid(*this, &layer_warning);
if (!ret.string.empty()) { if (!ret.string.empty()) {
ret.type = STRING_EXCEPT_OBJECT_COLLISION_IN_LAYER_PRINT; ret.type = STRING_EXCEPT_OBJECT_COLLISION_IN_LAYER_PRINT;
return ret; return ret;
} }
if (!layer_warning.string.empty())
add_warning(layer_warning);
} }
if (m_config.enable_prime_tower) { if (m_config.enable_prime_tower) {
for (const PrintObject* object : m_objects) { for (const PrintObject* object : m_objects) {
if (object->config().precise_z_height.value && warning != nullptr) { if (object->config().precise_z_height.value) {
StringObjectException warningtemp; warn(L("Enabling both precise Z height and the prime tower may cause slicing errors."), "precise_z_height");
warningtemp.string = L("Enabling both precise Z height and the prime tower may cause slicing errors.");
warningtemp.opt_key = "precise_z_height";
warningtemp.is_warning = true;
*warning = warningtemp;
break; break;
} }
} }
} else { } else {
if (m_config.enable_wrapping_detection && warning!=nullptr) { if (m_config.enable_wrapping_detection)
StringObjectException warningtemp; warn(L("A prime tower is required for clumping detection; otherwise, there may be flaws on the model."), "enable_prime_tower");
warningtemp.string = L("A prime tower is required for clumping detection; otherwise, there may be flaws on the model.");
warningtemp.opt_key = "enable_prime_tower";
warningtemp.is_warning = true;
*warning = warningtemp;
}
} }
if (m_config.spiral_mode) { if (m_config.spiral_mode) {
@@ -1383,7 +1390,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
if (std::any_of(all_regions.begin() + 1, all_regions.end(), [ra = all_regions.front()](const auto rb) { if (std::any_of(all_regions.begin() + 1, all_regions.end(), [ra = all_regions.front()](const auto rb) {
return !Layer::is_perimeter_compatible(ra, rb); return !Layer::is_perimeter_compatible(ra, rb);
})) { })) {
return {L("The spiral vase mode does not work when an object contains more than one materials."), nullptr, "spiral_mode"}; return {L("Spiral (vase) mode does not work when an object contains more than one material."), nullptr, "spiral_mode"};
} }
} }
} }
@@ -1484,8 +1491,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
if (nozzle_diam - EPSILON > first_nozzle_diam || nozzle_diam + EPSILON < first_nozzle_diam if (nozzle_diam - EPSILON > first_nozzle_diam || nozzle_diam + EPSILON < first_nozzle_diam
|| std::abs((filament_diam - first_filament_diam) / first_filament_diam) > 0.1) { || std::abs((filament_diam - first_filament_diam) / first_filament_diam) > 0.1) {
// return { L("Different nozzle diameters and different filament diameters may not work well when prime tower is enabled. It's very experimental, please proceed with caucious.") }; // return { L("Different nozzle diameters and different filament diameters may not work well when prime tower is enabled. It's very experimental, please proceed with caucious.") };
warning->string = L("Different nozzle diameters and different filament diameters may not work well when the prime tower is enabled. It's very experimental, so please proceed with caution."); warn(L("Different nozzle diameters and different filament diameters may not work well when the prime tower is enabled. It's very experimental, so please proceed with caution."), "nozzle_diameter");
warning->opt_key = "nozzle_diameter";
break; break;
} }
} }
@@ -1502,14 +1508,14 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
return { L("The prime tower is currently only supported for the Marlin, RepRap/Sprinter, RepRapFirmware and Repetier G-code flavors.")}; return { L("The prime tower is currently only supported for the Marlin, RepRap/Sprinter, RepRapFirmware and Repetier G-code flavors.")};
if ((m_config.print_sequence == PrintSequence::ByObject) && extruders.size() > 1) if ((m_config.print_sequence == PrintSequence::ByObject) && extruders.size() > 1)
return { L("The prime tower is not supported in \"By object\" print."), nullptr, "enable_prime_tower" }; return { L("A prime tower is not supported in \u201cBy object\u201d print."), nullptr, "enable_prime_tower" };
// BBS: When prime tower is on, object layer and support layer must be aligned. So support gap should be multiple of object layer height. // BBS: When prime tower is on, object layer and support layer must be aligned. So support gap should be multiple of object layer height.
for (size_t i = 0; i < m_objects.size(); i++) { for (size_t i = 0; i < m_objects.size(); i++) {
const PrintObject* object = m_objects[i]; const PrintObject* object = m_objects[i];
const SlicingParameters& slicing_params = object->slicing_parameters(); const SlicingParameters& slicing_params = object->slicing_parameters();
if (object->config().adaptive_layer_height) { if (object->config().adaptive_layer_height) {
return { L("The prime tower is not supported when adaptive layer height is on. It requires that all objects have the same layer height."), object, "adaptive_layer_height" }; return { L("A prime tower is not supported when adaptive layer height is on. It requires that all objects have the same layer height."), object, "adaptive_layer_height" };
} }
if (!object->config().enable_support) if (!object->config().enable_support)
@@ -1517,7 +1523,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
double gap_layers = slicing_params.gap_object_support / slicing_params.layer_height; double gap_layers = slicing_params.gap_object_support / slicing_params.layer_height;
if (gap_layers - (int)gap_layers > EPSILON) { if (gap_layers - (int)gap_layers > EPSILON) {
return {L("The prime tower requires \"support gap\" to be multiple of layer height."), object}; return {L("A prime tower requires any \u201csupport gap\u201d to be a multiple of layer height."), object};
} }
} }
#endif #endif
@@ -1530,9 +1536,9 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
const SlicingParameters &slicing_params = object->slicing_parameters(); const SlicingParameters &slicing_params = object->slicing_parameters();
if (std::abs(slicing_params.first_print_layer_height - slicing_params0.first_print_layer_height) > EPSILON || if (std::abs(slicing_params.first_print_layer_height - slicing_params0.first_print_layer_height) > EPSILON ||
std::abs(slicing_params.layer_height - slicing_params0.layer_height ) > EPSILON) std::abs(slicing_params.layer_height - slicing_params0.layer_height ) > EPSILON)
return {L("The prime tower requires that all objects have the same layer heights."), object, "initial_layer_print_height"}; return {L("A prime tower requires that all objects have the same layer height."), object, "initial_layer_print_height"};
if (slicing_params.raft_layers() != slicing_params0.raft_layers()) if (slicing_params.raft_layers() != slicing_params0.raft_layers())
return {L("The prime tower requires that all objects are printed over the same number of raft layers."), object, "raft_layers"}; return {L("A prime tower requires that all objects are printed over the same number of raft layers."), object, "raft_layers"};
// BBS: support gap can be multiple of object layer height, remove _L() // BBS: support gap can be multiple of object layer height, remove _L()
#if 0 #if 0
if (slicing_params0.gap_object_support != slicing_params.gap_object_support || if (slicing_params0.gap_object_support != slicing_params.gap_object_support ||
@@ -1540,7 +1546,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
return {L("The prime tower is only supported for multiple objects if they are printed with the same support_top_z_distance."), object}; return {L("The prime tower is only supported for multiple objects if they are printed with the same support_top_z_distance."), object};
#endif #endif
if (!equal_layering(slicing_params, slicing_params0)) if (!equal_layering(slicing_params, slicing_params0))
return { L("The prime tower requires that all objects are sliced with the same layer heights."), object }; return { L("A prime tower requires that all objects are sliced with the same layer height."), object };
if (has_custom_layering) { if (has_custom_layering) {
auto &lh = layer_height_profile(i); auto &lh = layer_height_profile(i);
auto &lh_tallest = layer_height_profile(tallest_object_idx); auto &lh_tallest = layer_height_profile(tallest_object_idx);
@@ -1606,10 +1612,10 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
if (extrusion_width_min == 0) { if (extrusion_width_min == 0) {
// Default "auto-generated" extrusion width is always valid. // Default "auto-generated" extrusion width is always valid.
} else if (extrusion_width_min <= layer_height) { } else if (extrusion_width_min <= layer_height) {
err_msg = L("Too small line width"); err_msg = L("Line width too small");
return false; return false;
} else if (extrusion_width_max > max_nozzle_diameter * MAX_LINE_WIDTH_MULTIPLIER) { } else if (extrusion_width_max > max_nozzle_diameter * MAX_LINE_WIDTH_MULTIPLIER) {
err_msg = L("Too large line width"); err_msg = L("Line width too large");
return false; return false;
} }
return true; return true;
@@ -1631,7 +1637,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
// BBS // BBS
#if 0 #if 0
if (this->has_wipe_tower() && object->config().independent_support_layer_height) { if (this->has_wipe_tower() && object->config().independent_support_layer_height) {
return {L("The prime tower requires that support has the same layer height with object."), object, "support_filament"}; return {L("A prime tower requires that support has the same layer height as the object."), object, "support_filament"};
} }
#endif #endif
@@ -1642,22 +1648,15 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
// Orca: use organic as default // Orca: use organic as default
object->config().support_style == smsDefault) { object->config().support_style == smsDefault) {
if (warning) {
// Orca: check the support wall count and the base pattern // Orca: check the support wall count and the base pattern
if (object->config().tree_support_wall_count > 1 && if (object->config().tree_support_wall_count > 1 &&
object->config().support_base_pattern != SupportMaterialPattern::smpNone && object->config().support_base_pattern != SupportMaterialPattern::smpNone &&
object->config().support_base_pattern != SupportMaterialPattern::smpDefault) { object->config().support_base_pattern != SupportMaterialPattern::smpDefault)
warning->string = L("For Organic supports, two walls are supported only with the Hollow/Default base pattern."); warn(L("For Organic supports, two walls are supported only with the Hollow/Default base pattern."), "support_base_pattern");
warning->opt_key = "support_base_pattern";
}
// Orca: check if the Lightning base pattern selected // Orca: check if the Lightning base pattern selected
if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning) { if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning)
warning->string = L( warn(L("The Lightning base pattern is not supported by this support type; Rectilinear will be used instead."), "support_base_pattern");
"The Lightning base pattern is not supported by this support type; Rectilinear will be used instead.");
warning->opt_key = "support_base_pattern";
}
}
float extrusion_width = std::min( float extrusion_width = std::min(
support_material_flow(object).width(), support_material_flow(object).width(),
@@ -1669,28 +1668,23 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
if (object->config().tree_support_branch_diameter_organic < object->config().tree_support_tip_diameter) if (object->config().tree_support_branch_diameter_organic < object->config().tree_support_tip_diameter)
return { L("Organic support branch diameter must not be smaller than support tree tip diameter."), object, "tree_support_branch_diameter_organic" }; return { L("Organic support branch diameter must not be smaller than support tree tip diameter."), object, "tree_support_branch_diameter_organic" };
} }
} else if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning && warning) { } else if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning) {
// Orca: check if the Lightning base pattern selected // Orca: check if the Lightning base pattern selected
warning->string = L("The Lightning base pattern is not supported by this support type; Rectilinear will be used instead."); warn(L("The Lightning base pattern is not supported by this support type; Rectilinear will be used instead."), "support_base_pattern");
warning->opt_key = "support_base_pattern"; } else if (object->config().support_base_pattern == SupportMaterialPattern::smpNone) {
} else if (object->config().support_base_pattern == SupportMaterialPattern::smpNone && warning) {
// Orca: check if the Hollow base pattern selected // Orca: check if the Hollow base pattern selected
warning->string = L("The Hollow base pattern is not supported by this support type; Rectilinear will be used instead."); warn(L("The Hollow base pattern is not supported by this support type; Rectilinear will be used instead."), "support_base_pattern");
warning->opt_key = "support_base_pattern";
} }
} }
// Do we have custom support data that would not be used? // Do we have custom support data that would not be used?
// Notify the user in that case. // Notify the user in that case.
if (! object->has_support() && warning) { if (! object->has_support()) {
for (const ModelVolume* mv : object->model_object()->volumes) { for (const ModelVolume* mv : object->model_object()->volumes) {
bool has_enforcers = mv->is_support_enforcer() || bool has_enforcers = mv->is_support_enforcer() ||
(mv->is_model_part() && mv->supported_facets.has_facets(*mv, EnforcerBlockerType::ENFORCER)); (mv->is_model_part() && mv->supported_facets.has_facets(*mv, EnforcerBlockerType::ENFORCER));
if (has_enforcers) { if (has_enforcers) {
StringObjectException warningtemp; warn(L("Support enforcers are used but support is not enabled. Please enable support."), "", object);
warningtemp.string = L("Support enforcers are used but support is not enabled. Please enable support.");
warningtemp.object = object;
*warning = warningtemp;
break; break;
} }
} }
@@ -1744,7 +1738,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
return { err_msg, object, "bridge_line_width" }; return { err_msg, object, "bridge_line_width" };
} }
if (!allow_thin_bridge_width && bridge_width <= layer_height) { if (!allow_thin_bridge_width && bridge_width <= layer_height) {
err_msg = L("Too small line width"); err_msg = L("Line width too small");
return { err_msg, object, "bridge_line_width" }; return { err_msg, object, "bridge_line_width" };
} }
} }
@@ -1842,7 +1836,11 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
} }
// check if print speed/accel/jerk is higher than the maximum speed of the printer // check if print speed/accel/jerk is higher than the maximum speed of the printer
if (warning) { if (warnings) {
// The motion-ability checks are mutually exclusive (gated on warning_key), so collect the
// single one that fires into a local and push it once - separate from the precise-wall and
// shrinkage warnings below.
StringObjectException motion_warning;
try { try {
auto check_motion_ability_object_setting = [&](const std::vector<std::string>& keys_to_check, double limit) -> std::string { auto check_motion_ability_object_setting = [&](const std::vector<std::string>& keys_to_check, double limit) -> std::string {
std::string warning_key; std::string warning_key;
@@ -1873,7 +1871,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
if (!ignore_jerk_validation) { if (!ignore_jerk_validation) {
if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 || if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 ||
m_default_object_config.inner_wall_jerk == 1) { m_default_object_config.inner_wall_jerk == 1) {
warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces"); motion_warning.string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces");
if (m_default_object_config.outer_wall_jerk == 1) if (m_default_object_config.outer_wall_jerk == 1)
warning_key = "outer_wall_jerk"; warning_key = "outer_wall_jerk";
else if (m_default_object_config.inner_wall_jerk == 1) else if (m_default_object_config.inner_wall_jerk == 1)
@@ -1881,7 +1879,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
else else
warning_key = "default_jerk"; warning_key = "default_jerk";
warning->opt_key = warning_key; motion_warning.opt_key = warning_key;
} }
if (warning_key.empty() && m_default_object_config.default_jerk > 0) { if (warning_key.empty() && m_default_object_config.default_jerk > 0) {
@@ -1891,20 +1889,20 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
warning_key.clear(); warning_key.clear();
warning_key = check_motion_ability_object_setting(jerk_to_check, max_jerk); warning_key = check_motion_ability_object_setting(jerk_to_check, max_jerk);
if (!warning_key.empty()) { if (!warning_key.empty()) {
warning->string = L( motion_warning.string = L(
"The jerk setting exceeds the printer's maximum jerk (machine_max_jerk_x/machine_max_jerk_y).\n" "The jerk setting exceeds the printer's maximum jerk (machine_max_jerk_x/machine_max_jerk_y).\n"
"Orca will automatically cap the jerk speed to ensure it doesn't surpass the printer's capabilities.\n" "Orca will automatically cap the jerk speed to ensure it doesn't surpass the printer's capabilities.\n"
"You can adjust the maximum jerk setting in your printer's configuration to get higher speeds."); "You can adjust the maximum jerk setting in your printer's configuration to get higher speeds.");
warning->opt_key = warning_key; motion_warning.opt_key = warning_key;
} }
} }
} }
// check junction deviation // check junction deviation
else if (m_default_object_config.default_junction_deviation.value > max_junction_deviation) { else if (m_default_object_config.default_junction_deviation.value > max_junction_deviation) {
warning->string = L( "Junction deviation setting exceeds the printer's maximum value (machine_max_junction_deviation).\n" motion_warning.string = L( "Junction deviation setting exceeds the printer's maximum value (machine_max_junction_deviation).\n"
"Orca will automatically cap the junction deviation to ensure it doesn't surpass the printer's capabilities.\n" "Orca will automatically cap the junction deviation to ensure it doesn't surpass the printer's capabilities.\n"
"You can adjust the machine_max_junction_deviation value in your printer's configuration to get higher limits."); "You can adjust the machine_max_junction_deviation value in your printer's configuration to get higher limits.");
warning->opt_key = "default_junction_deviation"; motion_warning.opt_key = "default_junction_deviation";
} }
// check acceleration // check acceleration
@@ -1939,12 +1937,12 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
}; };
warning_key = check_motion_ability_object_setting(accel_to_check, max_accel); warning_key = check_motion_ability_object_setting(accel_to_check, max_accel);
if (!warning_key.empty()) { if (!warning_key.empty()) {
warning->string = L("The acceleration setting exceeds the printer's maximum acceleration " motion_warning.string = L("The acceleration setting exceeds the printer's maximum acceleration "
"(machine_max_acceleration_extruding).\nOrca will " "(machine_max_acceleration_extruding).\nOrca will "
"automatically cap the acceleration speed to ensure it doesn't surpass the printer's " "automatically cap the acceleration speed to ensure it doesn't surpass the printer's "
"capabilities.\nYou can adjust the " "capabilities.\nYou can adjust the "
"machine_max_acceleration_extruding value in your printer's configuration to get higher speeds."); "machine_max_acceleration_extruding value in your printer's configuration to get higher speeds.");
warning->opt_key = warning_key; motion_warning.opt_key = warning_key;
} }
if (support_travel_acc) { if (support_travel_acc) {
const auto max_travel = m_config.machine_max_acceleration_travel.values[0]; const auto max_travel = m_config.machine_max_acceleration_travel.values[0];
@@ -1954,13 +1952,13 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
}; };
warning_key = check_motion_ability_object_setting(accel_to_check, max_travel); warning_key = check_motion_ability_object_setting(accel_to_check, max_travel);
if (!warning_key.empty()) { if (!warning_key.empty()) {
warning->string = L( motion_warning.string = L(
"The travel acceleration setting exceeds the printer's maximum travel acceleration " "The travel acceleration setting exceeds the printer's maximum travel acceleration "
"(machine_max_acceleration_travel).\nOrca will " "(machine_max_acceleration_travel).\nOrca will "
"automatically cap the travel acceleration speed to ensure it doesn't surpass the printer's " "automatically cap the travel acceleration speed to ensure it doesn't surpass the printer's "
"capabilities.\nYou can adjust the " "capabilities.\nYou can adjust the "
"machine_max_acceleration_travel value in your printer's configuration to get higher speeds."); "machine_max_acceleration_travel value in your printer's configuration to get higher speeds.");
warning->opt_key = warning_key; motion_warning.opt_key = warning_key;
} }
} }
} }
@@ -1986,19 +1984,17 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
// } // }
// check wall sequence and precise outer wall // check wall sequence and precise outer wall
if (m_default_region_config.precise_outer_wall && m_default_region_config.wall_sequence != WallSequence::InnerOuter) { if (m_default_region_config.precise_outer_wall && m_default_region_config.wall_sequence != WallSequence::InnerOuter)
warning->string = L("The precise wall option will be ignored for outer-inner or inner-outer-inner wall sequences."); warn(L("The precise wall option will be ignored for outer-inner or inner-outer-inner wall sequences."), "precise_outer_wall");
warning->opt_key = "precise_outer_wall";
}
} catch (std::exception& e) { } catch (std::exception& e) {
BOOST_LOG_TRIVIAL(warning) << "Orca: validate motion ability failed: " << e.what() << std::endl; BOOST_LOG_TRIVIAL(warning) << "Orca: validate motion ability failed: " << e.what() << std::endl;
} }
if (!motion_warning.string.empty())
add_warning(motion_warning);
} }
if (!this->has_same_shrinkage_compensations()){ if (!this->has_same_shrinkage_compensations())
warning->string = L("Filament shrinkage will not be used because filament shrinkage for the used filaments does not match."); warn(L("Filament shrinkage will not be used because filament shrinkage for the used filaments does not match."));
warning->opt_key = "";
}
return {}; return {};
} }
@@ -2711,6 +2707,7 @@ std::string Print::export_gcode(const std::string& path_template, GCodeProcessor
gcode->do_export(this, path.c_str(), result, thumbnail_cb); gcode->do_export(this, path.c_str(), result, thumbnail_cb);
gcode->export_layer_filaments(result); gcode->export_layer_filaments(result);
//BBS //BBS
if (result != nullptr)
result->conflict_result = m_conflict_result; result->conflict_result = m_conflict_result;
return path.c_str(); return path.c_str();
} }
+1 -1
View File
@@ -960,7 +960,7 @@ public:
} }
// Returns an empty string if valid, otherwise returns an error message. // Returns an empty string if valid, otherwise returns an error message.
StringObjectException validate(StringObjectException *warning = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const override; StringObjectException validate(std::vector<StringObjectException> *warnings = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const override;
double skirt_first_layer_height() const; double skirt_first_layer_height() const;
Flow brim_flow() const; Flow brim_flow() const;
Flow skirt_flow() const; Flow skirt_flow() const;
+1 -1
View File
@@ -83,7 +83,7 @@ std::string PrintBase::output_filename(const std::string &format, const std::str
filename.replace_extension(default_ext); filename.replace_extension(default_ext);
return filename.string(); return filename.string();
} catch (std::runtime_error &err) { } catch (std::runtime_error &err) {
throw Slic3r::PlaceholderParserError(L("Failed processing of the filename_format template.") + "\n" + err.what()); throw Slic3r::PlaceholderParserError(L("Processing of the filename_format template failed.") + "\n" + err.what());
} }
} }
+2 -2
View File
@@ -32,7 +32,7 @@ struct StringObjectException
std::string string; std::string string;
ObjectBase const *object = nullptr; ObjectBase const *object = nullptr;
std::string opt_key; std::string opt_key;
StringExceptionType type; // warning type for tips StringExceptionType type = STRING_EXCEPT_NOT_DEFINED; // warning type for tips
bool is_warning = false; bool is_warning = false;
std::vector<std::string> params; // warning params for tips std::vector<std::string> params; // warning params for tips
}; };
@@ -396,7 +396,7 @@ public:
// Validate the print, return empty string if valid, return error if process() cannot (or should not) be started. // Validate the print, return empty string if valid, return error if process() cannot (or should not) be started.
//BBS: add more paremeters to validate //BBS: add more paremeters to validate
virtual StringObjectException validate(StringObjectException *warning = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const { return {}; } virtual StringObjectException validate(std::vector<StringObjectException> *warnings = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const { return {}; }
enum ApplyStatus { enum ApplyStatus {
// No change after the Print::apply() call. // No change after the Print::apply() call.
File diff suppressed because it is too large Load Diff
+1
View File
@@ -1527,6 +1527,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBool, enable_filament_ramming)) ((ConfigOptionBool, enable_filament_ramming))
((ConfigOptionBool, tool_change_on_wipe_tower)) ((ConfigOptionBool, tool_change_on_wipe_tower))
((ConfigOptionBool, support_multi_bed_types)) ((ConfigOptionBool, support_multi_bed_types))
((ConfigOptionBool, use_3mf))
// Small Area Infill Flow Compensation // Small Area Infill Flow Compensation
((ConfigOptionStrings, small_area_infill_flow_compensation_model)) ((ConfigOptionStrings, small_area_infill_flow_compensation_model))
+1 -1
View File
@@ -613,7 +613,7 @@ std::string SLAPrint::output_filename(const std::string &filename_base) const
return this->PrintBase::output_filename(m_print_config.filename_format.value, ".sl1", filename_base, &config); return this->PrintBase::output_filename(m_print_config.filename_format.value, ".sl1", filename_base, &config);
} }
StringObjectException SLAPrint::validate(StringObjectException *exception, Polygons *collison_polygons, std::vector<std::pair<Polygon, float>> *height_polygons) const StringObjectException SLAPrint::validate(std::vector<StringObjectException> *warnings, Polygons *collison_polygons, std::vector<std::pair<Polygon, float>> *height_polygons) const
{ {
for(SLAPrintObject * po : m_objects) { for(SLAPrintObject * po : m_objects) {
+1 -1
View File
@@ -488,7 +488,7 @@ public:
const SLAPrintStatistics& print_statistics() const { return m_print_statistics; } const SLAPrintStatistics& print_statistics() const { return m_print_statistics; }
StringObjectException validate(StringObjectException * warning = nullptr, StringObjectException validate(std::vector<StringObjectException> * warnings = nullptr,
Polygons * collison_polygons = nullptr, Polygons * collison_polygons = nullptr,
std::vector<std::pair<Polygon, float>> *height_polygons = nullptr) const override; std::vector<std::pair<Polygon, float>> *height_polygons = nullptr) const override;

Some files were not shown because too many files have changed in this diff Show More