diff --git a/.cursorignore b/.cursorignore index 5ff5f06f8d..d79104d045 100644 --- a/.cursorignore +++ b/.cursorignore @@ -4,4 +4,7 @@ build_*/ build/ localization/ sandboxes/ -resources/ +resources/* +!resources/web/ +!resources/dailytip +!resources/shaders diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index fcdfad099b..c0990561e1 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -49,9 +49,9 @@ jobs: fail-fast: false matrix: include: - # Deprecate appimage + # Deprecate 20.04appimage # - os: ubuntu-20.04 - # - os: ubuntu-24.04 + - os: ubuntu-24.04 - os: windows-latest - os: macos-14 arch: arm64 diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 68f6553e0a..75e78e344a 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -267,7 +267,7 @@ jobs: chmod +x ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage - name: Build orca_custom_preset_tests - if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' + if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04' working-directory: ${{ github.workspace }}/build/src shell: bash run: | @@ -307,7 +307,7 @@ jobs: message: "nightly-builds" - name: Deploy orca_custom_preset_tests - if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }} + if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04' }} uses: WebFreak001/deploy-nightly@v3.2.0 with: upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label} diff --git a/deps/TIFF/TIFF.cmake b/deps/TIFF/TIFF.cmake index 01d72428b9..9d66d89b8b 100644 --- a/deps/TIFF/TIFF.cmake +++ b/deps/TIFF/TIFF.cmake @@ -17,7 +17,7 @@ if (APPLE) else() orcaslicer_add_cmake_project(TIFF URL https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.zip - URL_HASH SHA256=c56edfacef0a60c0de3e6489194fcb2f24c03dbb550a8a7de5938642d045bd32 + URL_HASH SHA256=17a3e875acece9be40b093361cfef47385d4ef22c995ffbf36b2871f5785f9b8 DEPENDS ${ZLIB_PKG} ${PNG_PKG} dep_JPEG CMAKE_ARGS -Dlzma:BOOL=OFF @@ -27,7 +27,4 @@ else() -Dpixarlog:BOOL=OFF ) -endif() - - - +endif() \ No newline at end of file diff --git a/resources/profiles/BBL/filament/FusRock/FusRock ABS-GF @base.json b/resources/profiles/BBL/filament/FusRock/FusRock ABS-GF @base.json index 29b77ca23a..b53c36d1b1 100644 --- a/resources/profiles/BBL/filament/FusRock/FusRock ABS-GF @base.json +++ b/resources/profiles/BBL/filament/FusRock/FusRock ABS-GF @base.json @@ -6,21 +6,11 @@ "filament_id": "GFR00", "instantiation": "false", "description": "When printing this filament, there's a risk of nozzle clogging, oozing, warping and low layer adhesion strength. To get better results, please refer to this wiki: Printing Tips for High Temp / Engineering materials(https://wiki.fusrock.com).", - "filament_notes": "//EN\n1.Be sure to read it carefully before using (https://wiki.fusrock.com).\n2.When printing this filament, there's a risk of nozzle clogging, oozing, warping and low layer adhesion strength. To get better results, please refer to this wiki: Printing Tips for High Temp / Engineering materials(https://wiki.fusrock.com).\\n3.Thank you for choosing us FusRock. \n//CN\n1.使用前请务必仔细阅读(https://wiki.fusrock.com)。\n2.打印该耗材时,可能会出现喷嘴堵塞、拉丝、翘边以及层间附着力不足等问题。为了获得更好的打印效果,请参考此维基页面:高温 / 工程材料打印技巧(https://wiki.fusrock.com)。\n3.感谢您选择FusRock。", - "activate_air_filtration": [ - "1" + "filament_extruder_variant": [ + "Direct Drive Standard" ], - "cool_plate_temp": [ - "0" - ], - "cool_plate_temp_initial_layer": [ - "0" - ], - "fan_cooling_layer_time": [ - "30" - ], - "fan_min_speed": [ - "10" + "filament_adhesiveness_category": [ + "200" ], "filament_type": [ "ABS-GF" @@ -28,83 +18,144 @@ "filament_vendor": [ "FusRock" ], - "nozzle_temperature": [ - "270" + "filament_flow_ratio": [ + "0.92" ], - "nozzle_temperature_initial_layer": [ - "260" + "filament_density": [ + "1.08" ], - "nozzle_temperature_range_high": [ - "280" + "filament_cost": [ + "13" ], "nozzle_temperature_range_low": [ "240" ], - "overhang_fan_threshold": [ - "25%" + "nozzle_temperature_range_high": [ + "280" ], - "slow_down_layer_time": [ - "3" + "cool_plate_temp_initial_layer": [ + "0" ], - "slow_down_min_speed": [ - "20" - ], - "supertack_plate_temp": [ + "cool_plate_temp": [ "0" ], "supertack_plate_temp_initial_layer": [ "0" ], - "filament_end_gcode": [ - "; filament end gcode \n\n" - ], - "eng_plate_temp": [ - "105" + "supertack_plate_temp": [ + "0" ], "eng_plate_temp_initial_layer": [ "105" ], - "fan_max_speed": [ - "50" - ], - "filament_adhesiveness_category": [ - "100" - ], - "filament_cost": [ - "0" - ], - "filament_density": [ - "1.05" - ], - "filament_extruder_variant": [ - "Direct Drive Standard" - ], - "filament_flow_ratio": [ - "0.92" - ], - "filament_max_volumetric_speed": [ - "20" - ], - "filament_retraction_length": [ - "0.8" - ], - "hot_plate_temp": [ + "eng_plate_temp": [ "105" ], "hot_plate_temp_initial_layer": [ "105" ], - "overhang_fan_speed": [ - "50" - ], - "reduce_fan_stop_start_freq": [ - "0" - ], - "textured_plate_temp": [ + "hot_plate_temp": [ "105" ], "textured_plate_temp_initial_layer": [ "105" ], - "version": "1.10.0.32" + "textured_plate_temp": [ + "105" + ], + "nozzle_temperature_initial_layer": [ + "260" + ], + "nozzle_temperature": [ + "270" + ], + "filament_max_volumetric_speed": [ + "18" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "fan_min_speed": [ + "10" + ], + "fan_cooling_layer_time": [ + "12" + ], + "fan_max_speed": [ + "30" + ], + "slow_down_layer_time": [ + "4" + ], + "reduce_fan_stop_start_freq": [ + "0" + ], + "slow_down_for_layer_cooling": [ + "1" + ], + "slow_down_min_speed": [ + "20" + ], + "enable_overhang_bridge_fan": [ + "1" + ], + "overhang_fan_threshold": [ + "10%" + ], + "overhang_threshold_participating_cooling": [ + "100%" + ], + "overhang_fan_speed": [ + "30" + ], + "pre_start_fan_time": [ + "0" + ], + "additional_cooling_fan_speed": [ + "0" + ], + "activate_air_filtration": [ + "1" + ], + "during_print_exhaust_fan_speed": [ + "30" + ], + "complete_print_exhaust_fan_speed": [ + "10" + ], + "filament_retraction_length": [ + "0.8" + ], + "filament_z_hop": [ + "0.4" + ], + "filament_z_hop_types": [ + "Spiral Lift" + ], + "filament_retraction_speed": [ + "30" + ], + "filament_deretraction_speed": [ + "0" + ], + "filament_retraction_minimum_travel": [ + "2" + ], + "filament_retract_when_changing_layer": [ + "0" + ], + "filament_wipe": [ + "0" + ], + "filament_wipe_distance": [ + "2" + ], + "filament_retract_before_wipe": [ + "100%" + ], + "filament_end_gcode": [ + "; filament end gcode \n\n" + ], + "filament_notes": "//EN\n1.Be sure to read it carefully before using (https://wiki.fusrock.com).\n2.When printing this filament, there's a risk of nozzle clogging, oozing, warping and low layer adhesion strength. To get better results, please refer to this wiki: Printing Tips for High Temp / Engineering materials(https://wiki.fusrock.com).\\n3.Thank you for choosing us FusRock.\n*This setting may not be able to adapt to all models. In some cases, you need to modify and adjust the parameters by yourself to improve the printing effect.\n*FusRock 3D printing filaments are intended for general-purpose printing and have been tested under standard conditions. However, the performance and safety of printed objects are affected by multiple factors, including printing parameters, model design, usage environment, and the specific application.\n*By using FusRock materials, the user acknowledges and agrees to independently evaluate whether the printed parts are suitable for their intended use, and assumes all associated risks.\n*FusRock shall not be held liable for any damage, injury, or loss that may result from the use of printed products made with our materials, including but not limited to structural failure, functional defects, or safety hazards under actual usage conditions.Before applying printed parts in any critical, functional, or commercial context, thorough testing must be conducted. Except for the certifications explicitly stated for specific FusRock materials, our products are not certified for medical, aerospace, or life-support applications.\n//CN\n1.使用前请务必仔细阅读(https://wiki.fusrock.com)。\n2.打印该耗材时,可能会出现喷嘴堵塞、拉丝、翘边以及层间附着力不足等问题。为了获得更好的打印效果,请参考此维基页面:高温 / 工程材料打印技巧(https://wiki.fusrock.com)。\n3.感谢您选择FusRock。\n*此设置不一定能够适配所有模型,存在部分情况下需要您自行修改调整参数来提升打印效果。\n*FusRock 3D打印耗材适用于通用打印用途,已在标准条件下进行测试。然而,打印成品的性能与安全性受多种因素影响,包括打印参数、模型设计、使用环境及实际用途。\n*使用FusRock材料即表示用户已知悉并同意,自行评估打印件是否适用于其具体应用,并承担由此产生的全部风险。\n*FusRock对使用本公司耗材打印的产品在实际应用中可能导致的任何损害、伤害或损失不承担任何责任,包括但不限于结构失效、功能异常或使用环境中的安全隐患。在将打印件应用于关键、功能性或商业性场景前,请务必进行充分测试。除FusRock已标明材料所获得的各项认证资质外,FusRock产品未取得医疗、航天或生命支持系统认证资质。", + "impact_strength_z":["5.3"] } diff --git a/resources/profiles/OrcaFilamentLibrary.json b/resources/profiles/OrcaFilamentLibrary.json index 982830b0ec..690eaded8f 100644 --- a/resources/profiles/OrcaFilamentLibrary.json +++ b/resources/profiles/OrcaFilamentLibrary.json @@ -367,6 +367,14 @@ { "name": "Overture PLA @base", "sub_path": "filament/Overture/Overture PLA @base.json" + }, + { + "name": "Overture TPU @base", + "sub_path": "filament/Overture/Overture TPU @base.json" + }, + { + "name": "Overture ABS Basic @base", + "sub_path": "filament/Overture/Overture ABS Basic @base.json" }, { "name": "PolyLite PLA @base", @@ -683,6 +691,14 @@ { "name": "Overture PLA @System", "sub_path": "filament/Overture/Overture PLA @System.json" + }, + { + "name": "Overture TPU @System", + "sub_path": "filament/Overture/Overture TPU @System.json" + }, + { + "name": "Overture ABS Basic @System", + "sub_path": "filament/Overture/Overture ABS Basic @System.json" }, { "name": "PolyLite Dual PLA @System", @@ -756,6 +772,14 @@ "name": "Bambu TPU 95A HF @System", "sub_path": "filament/Bambu/Bambu TPU 95A HF @System.json" }, + { + "name": "FusRock ABS-GF @base", + "sub_path": "filament/FusRock/FusRock ABS-GF @base.json" + }, + { + "name": "FusRock ABS-GF @System", + "sub_path": "filament/FusRock/FusRock ABS-GF @System.json" + }, { "name": "AliZ PETG-CF @System", "sub_path": "filament/AliZ/AliZ PETG-CF @System.json" diff --git a/resources/profiles/OrcaFilamentLibrary/filament/FusRock/FusRock ABS-GF @System.json b/resources/profiles/OrcaFilamentLibrary/filament/FusRock/FusRock ABS-GF @System.json new file mode 100644 index 0000000000..151c311ab5 --- /dev/null +++ b/resources/profiles/OrcaFilamentLibrary/filament/FusRock/FusRock ABS-GF @System.json @@ -0,0 +1,15 @@ +{ + "type": "filament", + "name": "FusRock ABS-GF @System", + "inherits": "FusRock ABS-GF @base", + "from": "system", + "setting_id": "OGFSB50_00", + "instantiation": "true", + "filament_long_retractions_when_cut": [ + "1" + ], + "filament_retraction_distances_when_cut": [ + "18" + ], + "compatible_printers": [] +} \ No newline at end of file diff --git a/resources/profiles/OrcaFilamentLibrary/filament/FusRock/FusRock ABS-GF @base.json b/resources/profiles/OrcaFilamentLibrary/filament/FusRock/FusRock ABS-GF @base.json new file mode 100644 index 0000000000..7c1d4e3e64 --- /dev/null +++ b/resources/profiles/OrcaFilamentLibrary/filament/FusRock/FusRock ABS-GF @base.json @@ -0,0 +1,161 @@ +{ + "type": "filament", + "name": "FusRock ABS-GF @base", + "inherits": "fdm_filament_common", + "from": "system", + "filament_id": "OGFR00", + "instantiation": "false", + "description": "When printing this filament, there's a risk of nozzle clogging, oozing, warping and low layer adhesion strength. To get better results, please refer to this wiki: Printing Tips for High Temp / Engineering materials(https://wiki.fusrock.com).", + "filament_extruder_variant": [ + "Direct Drive Standard" + ], + "filament_adhesiveness_category": [ + "200" + ], + "filament_type": [ + "ABS-GF" + ], + "filament_vendor": [ + "FusRock" + ], + "filament_flow_ratio": [ + "0.92" + ], + "filament_density": [ + "1.08" + ], + "filament_cost": [ + "13" + ], + "nozzle_temperature_range_low": [ + "240" + ], + "nozzle_temperature_range_high": [ + "280" + ], + "cool_plate_temp_initial_layer": [ + "0" + ], + "cool_plate_temp": [ + "0" + ], + "supertack_plate_temp_initial_layer": [ + "0" + ], + "supertack_plate_temp": [ + "0" + ], + "eng_plate_temp_initial_layer": [ + "105" + ], + "eng_plate_temp": [ + "105" + ], + "hot_plate_temp_initial_layer": [ + "105" + ], + "hot_plate_temp": [ + "105" + ], + "textured_plate_temp_initial_layer": [ + "105" + ], + "textured_plate_temp": [ + "105" + ], + "nozzle_temperature_initial_layer": [ + "260" + ], + "nozzle_temperature": [ + "270" + ], + "filament_max_volumetric_speed": [ + "18" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "fan_min_speed": [ + "10" + ], + "fan_cooling_layer_time": [ + "12" + ], + "fan_max_speed": [ + "30" + ], + "slow_down_layer_time": [ + "4" + ], + "reduce_fan_stop_start_freq": [ + "0" + ], + "slow_down_for_layer_cooling": [ + "1" + ], + "slow_down_min_speed": [ + "20" + ], + "enable_overhang_bridge_fan": [ + "1" + ], + "overhang_fan_threshold": [ + "10%" + ], + "overhang_threshold_participating_cooling": [ + "100%" + ], + "overhang_fan_speed": [ + "30" + ], + "pre_start_fan_time": [ + "0" + ], + "additional_cooling_fan_speed": [ + "0" + ], + "activate_air_filtration": [ + "1" + ], + "during_print_exhaust_fan_speed": [ + "30" + ], + "complete_print_exhaust_fan_speed": [ + "10" + ], + "filament_retraction_length": [ + "0.8" + ], + "filament_z_hop": [ + "0.4" + ], + "filament_z_hop_types": [ + "Spiral Lift" + ], + "filament_retraction_speed": [ + "30" + ], + "filament_deretraction_speed": [ + "0" + ], + "filament_retraction_minimum_travel": [ + "2" + ], + "filament_retract_when_changing_layer": [ + "0" + ], + "filament_wipe": [ + "0" + ], + "filament_wipe_distance": [ + "2" + ], + "filament_retract_before_wipe": [ + "100%" + ], + "filament_end_gcode": [ + "; filament end gcode \n\n" + ], + "filament_notes": "//EN\n1.Be sure to read it carefully before using (https://wiki.fusrock.com).\n2.When printing this filament, there's a risk of nozzle clogging, oozing, warping and low layer adhesion strength. To get better results, please refer to this wiki: Printing Tips for High Temp / Engineering materials(https://wiki.fusrock.com).\\n3.Thank you for choosing us FusRock.\n*This setting may not be able to adapt to all models. In some cases, you need to modify and adjust the parameters by yourself to improve the printing effect.\n*FusRock 3D printing filaments are intended for general-purpose printing and have been tested under standard conditions. However, the performance and safety of printed objects are affected by multiple factors, including printing parameters, model design, usage environment, and the specific application.\n*By using FusRock materials, the user acknowledges and agrees to independently evaluate whether the printed parts are suitable for their intended use, and assumes all associated risks.\n*FusRock shall not be held liable for any damage, injury, or loss that may result from the use of printed products made with our materials, including but not limited to structural failure, functional defects, or safety hazards under actual usage conditions.Before applying printed parts in any critical, functional, or commercial context, thorough testing must be conducted. Except for the certifications explicitly stated for specific FusRock materials, our products are not certified for medical, aerospace, or life-support applications.\n//CN\n1.使用前请务必仔细阅读(https://wiki.fusrock.com)。\n2.打印该耗材时,可能会出现喷嘴堵塞、拉丝、翘边以及层间附着力不足等问题。为了获得更好的打印效果,请参考此维基页面:高温 / 工程材料打印技巧(https://wiki.fusrock.com)。\n3.感谢您选择FusRock。\n*此设置不一定能够适配所有模型,存在部分情况下需要您自行修改调整参数来提升打印效果。\n*FusRock 3D打印耗材适用于通用打印用途,已在标准条件下进行测试。然而,打印成品的性能与安全性受多种因素影响,包括打印参数、模型设计、使用环境及实际用途。\n*使用FusRock材料即表示用户已知悉并同意,自行评估打印件是否适用于其具体应用,并承担由此产生的全部风险。\n*FusRock对使用本公司耗材打印的产品在实际应用中可能导致的任何损害、伤害或损失不承担任何责任,包括但不限于结构失效、功能异常或使用环境中的安全隐患。在将打印件应用于关键、功能性或商业性场景前,请务必进行充分测试。除FusRock已标明材料所获得的各项认证资质外,FusRock产品未取得医疗、航天或生命支持系统认证资质。", + "impact_strength_z":["5.3"] +} diff --git a/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture ABS Basic @System.json b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture ABS Basic @System.json new file mode 100644 index 0000000000..c8b5543e0e --- /dev/null +++ b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture ABS Basic @System.json @@ -0,0 +1,14 @@ +{ + "type": "filament", + "name": "Overture ABS Basic @System", + "inherits": "Overture ABS Basic @base", + "from": "system", + "setting_id": "OVABS08", + "instantiation": "true", + "filament_max_volumetric_speed": [ + "16" + ], + "filament_long_retractions_when_cut": ["nil"], + "filament_retraction_distances_when_cut": ["nil"], + "compatible_printers": [] +} \ No newline at end of file diff --git a/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture ABS Basic @base.json b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture ABS Basic @base.json new file mode 100644 index 0000000000..479894a51f --- /dev/null +++ b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture ABS Basic @base.json @@ -0,0 +1,195 @@ +{ + "type": "filament", + "name": "Overture ABS Basic @base", + "inherits": "fdm_filament_abs", + "from": "system", + "filament_id": "OVTABS08", + "instantiation": "false", + "description": "Overture ABS settings from https://overture3d.com/.", + "activate_air_filtration": [ + "1" + ], + "additional_cooling_fan_speed": [ + "0" + ], + "chamber_temperatures": [ + "0" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "compatible_printers": [ + "" + ], + "complete_print_exhaust_fan_speed": [ + "70" + ], + "cool_plate_temp": [ + "0" + ], + "cool_plate_temp_initial_layer": [ + "0" + ], + "default_filament_colour": [ + "" + ], + "during_print_exhaust_fan_speed": [ + "70" + ], + "enable_overhang_bridge_fan": [ + "1" + ], + "enable_pressure_advance": [ + "0" + ], + "eng_plate_temp": [ + "90" + ], + "eng_plate_temp_initial_layer": [ + "90" + ], + "fan_cooling_layer_time": [ + "38" + ], + "fan_max_speed": [ + "50" + ], + "fan_min_speed": [ + "10" + ], + "filament_cost": [ + "0" + ], + "filament_density": [ + "1.15" + ], + "filament_deretraction_speed": [ + "nil" + ], + "filament_diameter": [ + "1.75" + ], + "filament_end_gcode": [ + "; filament end gcode \nM106 P3 S0\n" + ], + "filament_flow_ratio": [ + "0.95" + ], + "filament_is_support": [ + "0" + ], + "filament_long_retractions_when_cut": [ + "nil" + ], + "filament_max_volumetric_speed": [ + "16" + ], + "filament_minimal_purge_on_wipe_tower": [ + "15" + ], + "filament_notes": "", + "filament_retract_before_wipe": [ + "nil" + ], + "filament_retract_restart_extra": [ + "nil" + ], + "filament_retract_when_changing_layer": [ + "nil" + ], + "filament_retraction_distances_when_cut": [ + "nil" + ], + "filament_retraction_length": [ + "nil" + ], + "filament_retraction_minimum_travel": [ + "nil" + ], + "filament_retraction_speed": [ + "nil" + ], + "filament_settings_id": [ + "OVERTURE ABS Basic" + ], + "filament_soluble": [ + "0" + ], + "filament_start_gcode": [ + "; Filament gcode\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" + ], + "filament_type": [ + "ABS" + ], + "filament_vendor": [ + "OVERTURE" + ], + "filament_wipe": [ + "nil" + ], + "filament_wipe_distance": [ + "nil" + ], + "filament_z_hop": [ + "nil" + ], + "filament_z_hop_types": [ + "nil" + ], + "full_fan_speed_layer": [ + "0" + ], + "hot_plate_temp": [ + "90" + ], + "hot_plate_temp_initial_layer": [ + "90" + ], + "is_custom_defined": "0", + "nozzle_temperature": [ + "260" + ], + "nozzle_temperature_initial_layer": [ + "260" + ], + "nozzle_temperature_range_high": [ + "265" + ], + "nozzle_temperature_range_low": [ + "245" + ], + "overhang_fan_speed": [ + "100" + ], + "overhang_fan_threshold": [ + "95%" + ], + "pressure_advance": [ + "0.02" + ], + "reduce_fan_stop_start_freq": [ + "1" + ], + "required_nozzle_HRC": [ + "3" + ], + "slow_down_for_layer_cooling": [ + "1" + ], + "slow_down_layer_time": [ + "2" + ], + "slow_down_min_speed": [ + "20" + ], + "temperature_vitrification": [ + "103" + ], + "textured_plate_temp": [ + "90" + ], + "textured_plate_temp_initial_layer": [ + "90" + ], + "version": "1.9.0.14" +} \ No newline at end of file diff --git a/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture TPU @System.json b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture TPU @System.json new file mode 100644 index 0000000000..4f004c6c12 --- /dev/null +++ b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture TPU @System.json @@ -0,0 +1,14 @@ +{ + "type": "filament", + "name": "Overture TPU @System", + "inherits": "Overture TPU @base", + "from": "system", + "setting_id": "OFOVT08", + "instantiation": "true", + "filament_max_volumetric_speed": [ + "4" + ], + "filament_long_retractions_when_cut": ["0"], + "filament_retraction_distances_when_cut": ["0"], + "compatible_printers": [] +} \ No newline at end of file diff --git a/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture TPU @base.json b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture TPU @base.json new file mode 100644 index 0000000000..9485dd5fe9 --- /dev/null +++ b/resources/profiles/OrcaFilamentLibrary/filament/Overture/Overture TPU @base.json @@ -0,0 +1,184 @@ +{ + "type": "filament", + "name": "Overture TPU @base", + "inherits": "fdm_filament_tpu", + "from": "system", + "filament_id": "OGFOVT08", + "instantiation": "false", + "description": "Overture TPU settings from https://overture3d.com/.", + "activate_air_filtration": [ + "0" + ], + "additional_cooling_fan_speed": [ + "100" + ], + "chamber_temperatures": [ + "0" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "complete_print_exhaust_fan_speed": [ + "70" + ], + "cool_plate_temp": [ + "35" + ], + "cool_plate_temp_initial_layer": [ + "35" + ], + "default_filament_colour": [ + "" + ], + "during_print_exhaust_fan_speed": [ + "70" + ], + "enable_overhang_bridge_fan": [ + "1" + ], + "enable_pressure_advance": [ + "0" + ], + "eng_plate_temp": [ + "0" + ], + "eng_plate_temp_initial_layer": [ + "0" + ], + "fan_cooling_layer_time": [ + "120" + ], + "fan_max_speed": [ + "100" + ], + "fan_min_speed": [ + "100" + ], + "filament_cost": [ + "0" + ], + "filament_density": [ + "1.18" + ], + "filament_deretraction_speed": [ + "nil" + ], + "filament_diameter": [ + "1.75" + ], + "filament_end_gcode": [ + "; filament end gcode \nM106 P3 S0\n" + ], + "filament_flow_ratio": [ + "0.95" + ], + "filament_is_support": [ + "0" + ], + "filament_long_retractions_when_cut": [ + "nil" + ], + "filament_minimal_purge_on_wipe_tower": [ + "15" + ], + "filament_notes": "", + "filament_retract_before_wipe": [ + "nil" + ], + "filament_retract_restart_extra": [ + "nil" + ], + "filament_retract_when_changing_layer": [ + "nil" + ], + "filament_retraction_distances_when_cut": [ + "nil" + ], + "filament_retraction_length": [ + "0.4" + ], + "filament_retraction_minimum_travel": [ + "nil" + ], + "filament_retraction_speed": [ + "nil" + ], + "filament_soluble": [ + "0" + ], + "filament_start_gcode": [ + "; filament start gcode\n{if (bed_temperature[current_extruder] >35)||(bed_temperature_initial_layer[current_extruder] >35)}M106 P3 S255\n{elsif(bed_temperature[current_extruder] >30)||(bed_temperature_initial_layer[current_extruder] >30)}M106 P3 S180\n{endif}\n\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" + ], + "filament_type": [ + "TPU" + ], + "filament_vendor": [ + "OVERTURE" + ], + "filament_wipe": [ + "nil" + ], + "filament_wipe_distance": [ + "nil" + ], + "filament_z_hop": [ + "nil" + ], + "filament_z_hop_types": [ + "nil" + ], + "full_fan_speed_layer": [ + "0" + ], + "hot_plate_temp": [ + "35" + ], + "hot_plate_temp_initial_layer": [ + "35" + ], + "nozzle_temperature": [ + "230" + ], + "nozzle_temperature_initial_layer": [ + "230" + ], + "nozzle_temperature_range_high": [ + "230" + ], + "nozzle_temperature_range_low": [ + "210" + ], + "overhang_fan_speed": [ + "100" + ], + "overhang_fan_threshold": [ + "95%" + ], + "pressure_advance": [ + "0.02" + ], + "reduce_fan_stop_start_freq": [ + "1" + ], + "required_nozzle_HRC": [ + "3" + ], + "slow_down_for_layer_cooling": [ + "1" + ], + "slow_down_layer_time": [ + "120" + ], + "slow_down_min_speed": [ + "20" + ], + "temperature_vitrification": [ + "0" + ], + "textured_plate_temp": [ + "35" + ], + "textured_plate_temp_initial_layer": [ + "35" + ] +} \ No newline at end of file diff --git a/resources/web/guide/11/earth.png b/resources/web/guide/11/earth.png index 1b15fb712e..be8ffa44fb 100644 Binary files a/resources/web/guide/11/earth.png and b/resources/web/guide/11/earth.png differ diff --git a/resources/web/guide/11/tip.png b/resources/web/guide/11/tip.png index 1e64a958df..3bda75771a 100644 Binary files a/resources/web/guide/11/tip.png and b/resources/web/guide/11/tip.png differ diff --git a/resources/web/guide/21/21.css b/resources/web/guide/21/21.css index 933f823080..c0c7bfbd93 100644 --- a/resources/web/guide/21/21.css +++ b/resources/web/guide/21/21.css @@ -1,7 +1,7 @@ - #Content { overflow-y:auto; + padding: 32px; /* ORCA Specify & Reduce horizontal paddings to fit 4 items per row */ } .BlockBanner @@ -21,7 +21,11 @@ align-items: center; height: 40px; text-align: center; - margin-right: 10px; + margin-right: 0px; /* ORCA align buttons with end of horizontal separator/line */ +} + +.BannerBtns>.SmallBtn_Green.trans{ + margin-right: 7px; /* ORCA adds a small gap between buttons */ } .BlockBanner a @@ -36,7 +40,7 @@ .PrinterArea { - padding: 10px; + padding: 10px 0px; /* ORCA Reduce horizontal paddings to fit 4 items per row */ display: flex; flex-wrap: wrap; } @@ -57,7 +61,7 @@ .PName { font-weight: 700; - text-align: left; + text-align:left; } .pNozzel @@ -66,7 +70,7 @@ align-items: center; justify-content:flex-start; color: #5A5A5A; - padding-left: 10px; + padding-left: 0px; /* ORCA Align checkboxes with with model text */ } .pNozzel input @@ -129,26 +133,47 @@ width: 100%; position: relative; display: flex; - } +} - .searchTerm { +.searchTerm { width: 100%; - border: 3px solid #009688; + border: 1px solid #DBDBDB; /* ORCA Searchbox > match border style */ /*border-right: none;*/ padding: 5px; - height: 20px; + padding-left:32px; + height: 20px; /* ORCA match height */ + line-height: 20px; /* ORCA center text vertically */ border-radius: 5px 5px 5px 5px; outline: none; color: #9DBFAF; - } - - .searchTerm:focus{ - color: #009688; - } - - /*Resize the wrap to see the search bar change!*/ - .wrap{ +} +@media (prefers-color-scheme: dark) { /* ORCA Searchbox > add dark mode support */ + .searchTerm {border: 1px solid #4A4A51;} +} + +.searchTerm:focus{ + color: #363636; /* ORCA Searchbox > use normal text color */ + border-color:#009688; /* ORCA Searchbox > highlight border color when focused. like on normal UI */ +} +@media (prefers-color-scheme: dark) { /* ORCA Searchbox > add dark mode support */ + .searchTerm:focus{color: #FFFFFF} +} + +#search-icon{ /* ORCA */ + position:absolute; + top: 50%; + transform: translateY(-50%); + left:8px; + margin:0px auto; + fill:#7C8282 +} +@media (prefers-color-scheme: dark) { /* ORCA Searchbox > add dark mode support */ + #search-icon{fill:#949494} +} + +/*Resize the wrap to see the search bar change!*/ +.wrap{ width: 30%; padding-bottom: 5px; - padding-left: 42px; - } \ No newline at end of file + padding-left: 32px; /* ORCA Align with content */ +} diff --git a/resources/web/guide/21/21.js b/resources/web/guide/21/21.js index deca4516d0..4ade5cb150 100644 --- a/resources/web/guide/21/21.js +++ b/resources/web/guide/21/21.js @@ -98,7 +98,8 @@ function HandleModelList( pVal ) for(let m=0;m'+nNozzel+'mm nozzle'; + /* ORCA use label tag to allow checkbox to toggle when user ckicked to text */ + HtmlNozzel += ''; } let CoverImage=OneModel['cover']; @@ -261,7 +262,8 @@ function FilterModelList(keyword) { let HtmlNozzel = ''; for (let m = 0; m < NozzleArray.length; m++) { let nNozzel = NozzleArray[m]; - HtmlNozzel += '
' + nNozzel + 'mm nozzle
'; + /* ORCA use label tag to allow checkbox to toggle when user ckicked to text */ + HtmlNozzel += ''; } let CoverImage = OneModel['cover']; diff --git a/resources/web/guide/21/index.html b/resources/web/guide/21/index.html index 3e19309d19..5122ccec49 100644 --- a/resources/web/guide/21/index.html +++ b/resources/web/guide/21/index.html @@ -22,6 +22,10 @@
diff --git a/resources/web/guide/22/22.css b/resources/web/guide/22/22.css index 0a542a4645..8f8abac0a9 100644 --- a/resources/web/guide/22/22.css +++ b/resources/web/guide/22/22.css @@ -60,7 +60,7 @@ input .MItem { - min-width: 220px; + min-width: 180px; /* ORCA Filtered items > slightly reduce min width to fit more items*/ height: 32px; } diff --git a/resources/web/guide/22/22.js b/resources/web/guide/22/22.js index ce75dd59eb..73a4110b2a 100644 --- a/resources/web/guide/22/22.js +++ b/resources/web/guide/22/22.js @@ -95,8 +95,8 @@ function SortUI() for(let n=0;n'+sModel['model']+'
'; + /* ORCA use label tag to allow checkbox to toggle when user ckicked to text */ + HtmlMode+=''; } $('#MachineList .CValues').append(HtmlMode); @@ -172,7 +172,8 @@ function SortUI() let LowType=fType.toLowerCase(); if(!TypeHtmlArray.hasOwnProperty(LowType)) { - let HtmlType='
'+fType+'
'; + /* ORCA use label tag to allow checkbox to toggle when user ckicked to text */ + let HtmlType=''; TypeHtmlArray[LowType]=HtmlType; } @@ -181,7 +182,8 @@ function SortUI() let lowVendor=fVendor.toLowerCase(); if(!VendorHtmlArray.hasOwnProperty(lowVendor)) { - let HtmlVendor='
'+fVendor+'
'; + /* ORCA use label tag to allow checkbox to toggle when user ckicked to text */ + let HtmlVendor=''; VendorHtmlArray[lowVendor]=HtmlVendor; } @@ -190,7 +192,8 @@ function SortUI() let pFila=$("#ItemBlockArea input[vendor='"+fVendor+"'][filatype='"+fType+"'][name='"+fShortName+"']"); if(pFila.length==0) { - let HtmlFila='
'+fShortName+'
'; + /* ORCA use label tag to allow checkbox to toggle when user ckicked to text */ + let HtmlFila=''; $("#ItemBlockArea").append(HtmlFila); } diff --git a/resources/web/guide/22/index.html b/resources/web/guide/22/index.html index 6e379d2a0b..cf8e26e7d6 100644 --- a/resources/web/guide/22/index.html +++ b/resources/web/guide/22/index.html @@ -24,7 +24,7 @@
printer
-
all
+ + + +
diff --git a/resources/web/guide/3/index.html b/resources/web/guide/3/index.html index c9ae0994bd..836811bf84 100644 --- a/resources/web/guide/3/index.html +++ b/resources/web/guide/3/index.html @@ -26,10 +26,10 @@

-
+
+
Back
diff --git a/resources/web/guide/31/index.html b/resources/web/guide/31/index.html index 965d1538ae..65b81fd420 100644 --- a/resources/web/guide/31/index.html +++ b/resources/web/guide/31/index.html @@ -25,10 +25,10 @@

-
+
+
Back
diff --git a/resources/web/guide/4orca/4orca.css b/resources/web/guide/4orca/4orca.css index f12a7860fe..d2ffcd8469 100644 --- a/resources/web/guide/4orca/4orca.css +++ b/resources/web/guide/4orca/4orca.css @@ -16,12 +16,12 @@ margin-top:10mm; line-height: 30px; } - +/* ORCA brokes shape of custom css checkbox #StealthMode { width: 30px; } - +*/ #RestartText { padding-left:30px; diff --git a/resources/web/guide/4orca/index.html b/resources/web/guide/4orca/index.html index 975123eabc..c108144a81 100644 --- a/resources/web/guide/4orca/index.html +++ b/resources/web/guide/4orca/index.html @@ -25,8 +25,8 @@
- -
Enable Stealth Mode.
+ +
diff --git a/resources/web/guide/5/5.css b/resources/web/guide/5/5.css index 52d3248faa..8dd1cdc1f3 100644 --- a/resources/web/guide/5/5.css +++ b/resources/web/guide/5/5.css @@ -16,11 +16,12 @@ margin-top:10mm; line-height: 30px; } - +/* ORCA brokes shape of custom css checkbox #InstallCheck { width: 30px; } +*/ #RestartText { diff --git a/resources/web/guide/5/index.html b/resources/web/guide/5/index.html index aa838c1515..96357328d6 100644 --- a/resources/web/guide/5/index.html +++ b/resources/web/guide/5/index.html @@ -31,8 +31,8 @@ - -
Install Bambu Network Plug-in.
+ +
diff --git a/resources/web/guide/css/common.css b/resources/web/guide/css/common.css index 411b219ee4..11eac6d01a 100644 --- a/resources/web/guide/css/common.css +++ b/resources/web/guide/css/common.css @@ -133,16 +133,17 @@ body padding: 3mm 9mm; font-size: 14px; text-align: center; - border: 1px solid #575757; + /* border: 1px solid #575757; */ /* ORCA match button style */ border-radius: 18px; - color: #575757; + background-color: #D9D9D9; + color: #000; /* ORCA match button style */ cursor: pointer; margin-left: 10px; } .GrayBtn:hover { - background-color:#E8E8E8; + background-color:#CCCCCC; /* ORCA match button style */ } .SmallBtn @@ -189,6 +190,50 @@ body cursor: pointer; } +/*---Checkboxes ORCA ---*/ +label:has(input[type="checkbox"]){ + margin:0; + padding: 0; + margin-right: 20px; +} + +label:has(input[type="checkbox"])>span{ + vertical-align: middle; + margin:0; +} + +input[type="checkbox"] { + -webkit-appearance: none; + appearance: none; + background-color:#FFFFFF; + margin:0; + margin-right: 6px; + width: 1em; + height: 1em; + border: 0.1em solid #DBDBDB; + border-radius: 0.15em; + display: inline-flex; + place-content: center; + background-color:#FFFFFF; +} + +input[type="checkbox"]::before { + content: ""; + width: 0.8em; + height: 0.8em; + transform: scale(0); + box-shadow: inset 1em 1em #FFFFFF; + clip-path: polygon(7% 37%, 0 45%, 33% 78%, 100% 30%, 95% 21%, 33% 64%); +} + +input[type="checkbox"]:checked { + border-color:#009688; + background-color:#009688; +} + +input[type="checkbox"]:checked::before { + transform: scale(1); +} /*----------------Light Mode-------------------*/ diff --git a/resources/web/guide/css/dark.css b/resources/web/guide/css/dark.css index ff3a22c342..4ba7e79baf 100644 --- a/resources/web/guide/css/dark.css +++ b/resources/web/guide/css/dark.css @@ -6,7 +6,7 @@ body { - background-color:#3E3E45; + background-color:#2D2D31; /* ORCA match background color */ color: #efeff0; } @@ -23,17 +23,32 @@ body color: #009688; } -/*-----Button-----*/ -.GrayBtn -{ - border: 1px solid #B9B9BC; - color: #B9B9BC; +.search>input[type=text]{ + background-color:#2D2D31; } -.GrayBtn:hover +/*---Checkboxes ORCA---*/ +input[type=checkbox]{ + background-color:#2D2D31; + border-color:#4A4A51; +} + +input[type=checkbox]:checked{ + background-color:#009688; +} + +/*-----Button-----*/ +.GrayBtn, .SmallBtn /* ORCA match button style GrayBtn & SmallBtn */ { - background-color:#E8E8E8; - color: #565656; + background-color:#3E3E45; + /* border: 1px solid #B9B9BC; */ + color: #FFFFFF; +} + +.GrayBtn:hover, .SmallBtn:hover /* ORCA match button style GrayBtn & SmallBtn */ +{ + background-color:#49494E; + color: #FFFFFF; } /*-------Text------*/ diff --git a/src/libslic3r/Extruder.hpp b/src/libslic3r/Extruder.hpp index f048055456..398d388fd1 100644 --- a/src/libslic3r/Extruder.hpp +++ b/src/libslic3r/Extruder.hpp @@ -34,7 +34,9 @@ public: double unretract(); double E() const { return m_share_extruder ? m_share_E : m_E; } void reset_E() { m_E = 0.; m_share_E = 0.; } + // e_per_mm is extrusion_per_mm = geometric volume * (filament flow ratio / cross-sectional area) [Doesn't account for print_flow_ratio, or modifiers like bridge flow ratio etc.] double e_per_mm(double mm3_per_mm) const { return mm3_per_mm * m_e_per_mm3; } + // e_per_mm3 is extrusion_per_mm3 = filament flow ratio / cross-sectional area [Doesn't account for print_flow_ratio, or modifiers like bridge flow ratio etc.] double e_per_mm3() const { return m_e_per_mm3; } // Used filament volume in mm^3. double extruded_volume() const; diff --git a/src/libslic3r/Fill/Fill3DHoneycomb.cpp b/src/libslic3r/Fill/Fill3DHoneycomb.cpp index 7b7a3b8878..eadcfbf537 100644 --- a/src/libslic3r/Fill/Fill3DHoneycomb.cpp +++ b/src/libslic3r/Fill/Fill3DHoneycomb.cpp @@ -273,10 +273,7 @@ void Fill3DHoneycomb::_fill_surface_single( if (!polylines.empty()) { int infill_start_idx = polylines_out.size(); // only rotate what belongs to us. // connect lines - if (params.dont_connect() || polylines.size() <= 1) - append(polylines_out, chain_polylines(std::move(polylines))); - else - this->connect_infill(std::move(polylines), expolygon, polylines_out, this->spacing, params); + chain_or_connect_infill(std::move(polylines), expolygon, polylines_out, this->spacing, params); // rotate back if (std::abs(infill_angle) >= EPSILON) { diff --git a/src/libslic3r/Fill/FillAdaptive.cpp b/src/libslic3r/Fill/FillAdaptive.cpp index 8f28697eb8..d4b117b99d 100644 --- a/src/libslic3r/Fill/FillAdaptive.cpp +++ b/src/libslic3r/Fill/FillAdaptive.cpp @@ -1401,10 +1401,7 @@ void Filler::_fill_surface_single( } #endif /* ADAPTIVE_CUBIC_INFILL_DEBUG_OUTPUT */ - if (params.dont_connect() || all_polylines_with_hooks.size() <= 1) - append(polylines_out, chain_polylines(std::move(all_polylines_with_hooks))); - else - connect_infill(std::move(all_polylines_with_hooks), expolygon, polylines_out, this->spacing, params); + chain_or_connect_infill(std::move(all_polylines_with_hooks), expolygon, polylines_out, this->spacing, params); #ifdef ADAPTIVE_CUBIC_INFILL_DEBUG_OUTPUT { diff --git a/src/libslic3r/Fill/FillBase.cpp b/src/libslic3r/Fill/FillBase.cpp index 8ae8a6d4a7..1430e678bc 100644 --- a/src/libslic3r/Fill/FillBase.cpp +++ b/src/libslic3r/Fill/FillBase.cpp @@ -1787,6 +1787,18 @@ void Fill::connect_infill(Polylines &&infill_ordered, const std::vector 1) + infill_ordered = chain_polylines(std::move(infill_ordered)); + append(polylines_out, std::move(infill_ordered)); + } else + connect_infill(std::move(infill_ordered), boundary, polylines_out, spacing, params); + } +} + // Extend the infill lines along the perimeters, this is mainly useful for grid aligned support, where a perimeter line may be nearly // aligned with the infill lines. static inline void base_support_extend_infill_lines(Polylines &infill, BoundaryInfillGraph &graph, const double spacing, const FillParams ¶ms) diff --git a/src/libslic3r/Fill/FillBase.hpp b/src/libslic3r/Fill/FillBase.hpp index de93db3693..01aaf38d28 100644 --- a/src/libslic3r/Fill/FillBase.hpp +++ b/src/libslic3r/Fill/FillBase.hpp @@ -191,6 +191,8 @@ public: static void connect_infill(Polylines &&infill_ordered, const Polygons &boundary, const BoundingBox& bbox, Polylines &polylines_out, const double spacing, const FillParams ¶ms); static void connect_infill(Polylines &&infill_ordered, const std::vector &boundary, const BoundingBox &bbox, Polylines &polylines_out, double spacing, const FillParams ¶ms); + static void chain_or_connect_infill(Polylines &&infill_ordered, const ExPolygon &boundary, Polylines &polylines_out, const double spacing, const FillParams ¶ms); + static void connect_base_support(Polylines &&infill_ordered, const std::vector &boundary_src, const BoundingBox &bbox, Polylines &polylines_out, const double spacing, const FillParams ¶ms); static void connect_base_support(Polylines &&infill_ordered, const Polygons &boundary_src, const BoundingBox &bbox, Polylines &polylines_out, const double spacing, const FillParams ¶ms); diff --git a/src/libslic3r/Fill/FillCrossHatch.cpp b/src/libslic3r/Fill/FillCrossHatch.cpp index 10f421bef3..3772a1fec2 100644 --- a/src/libslic3r/Fill/FillCrossHatch.cpp +++ b/src/libslic3r/Fill/FillCrossHatch.cpp @@ -218,10 +218,7 @@ void FillCrossHatch ::_fill_surface_single( if (!polylines.empty()) { int infill_start_idx = polylines_out.size(); // only rotate what belongs to us. // connect lines - if (params.dont_connect() || polylines.size() <= 1) - append(polylines_out, chain_polylines(std::move(polylines))); - else - this->connect_infill(std::move(polylines), expolygon, polylines_out, this->spacing, params); + chain_or_connect_infill(std::move(polylines), expolygon, polylines_out, this->spacing, params); // rotate back if (std::abs(infill_angle) >= EPSILON) { diff --git a/src/libslic3r/Fill/FillGyroid.cpp b/src/libslic3r/Fill/FillGyroid.cpp index 5c555df88f..9040f740b2 100644 --- a/src/libslic3r/Fill/FillGyroid.cpp +++ b/src/libslic3r/Fill/FillGyroid.cpp @@ -194,10 +194,7 @@ void FillGyroid::_fill_surface_single( if (! polylines.empty()) { // connect lines size_t polylines_out_first_idx = polylines_out.size(); - if (params.dont_connect()) - append(polylines_out, chain_polylines(polylines)); - else - this->connect_infill(std::move(polylines), expolygon, polylines_out, this->spacing, params); + chain_or_connect_infill(std::move(polylines), expolygon, polylines_out, this->spacing, params); // new paths must be rotated back if (std::abs(infill_angle) >= EPSILON) { diff --git a/src/libslic3r/Fill/FillHoneycomb.cpp b/src/libslic3r/Fill/FillHoneycomb.cpp index 5dc2ed501c..3e37ddbc84 100644 --- a/src/libslic3r/Fill/FillHoneycomb.cpp +++ b/src/libslic3r/Fill/FillHoneycomb.cpp @@ -74,10 +74,7 @@ void FillHoneycomb::_fill_surface_single( } all_polylines = intersection_pl(std::move(all_polylines), expolygon); - if (params.dont_connect() || all_polylines.size() <= 1) - append(polylines_out, chain_polylines(std::move(all_polylines))); - else - connect_infill(std::move(all_polylines), expolygon, polylines_out, this->spacing, params); + chain_or_connect_infill(std::move(all_polylines), expolygon, polylines_out, this->spacing, params); } } // namespace Slic3r diff --git a/src/libslic3r/Fill/FillLightning.cpp b/src/libslic3r/Fill/FillLightning.cpp index dd2189e6b9..5cd7ae5797 100644 --- a/src/libslic3r/Fill/FillLightning.cpp +++ b/src/libslic3r/Fill/FillLightning.cpp @@ -16,10 +16,7 @@ void Filler::_fill_surface_single( const Layer &layer = generator->getTreesForLayer(this->layer_id); Polylines fill_lines = layer.convertToLines(to_polygons(expolygon), scaled(0.5 * this->spacing - this->overlap)); - if (params.dont_connect() || fill_lines.size() <= 1) { - append(polylines_out, chain_polylines(std::move(fill_lines))); - } else - connect_infill(std::move(fill_lines), expolygon, polylines_out, this->spacing, params); + chain_or_connect_infill(std::move(fill_lines), expolygon, polylines_out, this->spacing, params); } void GeneratorDeleter::operator()(Generator *p) { diff --git a/src/libslic3r/Fill/FillPlanePath.cpp b/src/libslic3r/Fill/FillPlanePath.cpp index 2167e3704b..6044ba43a2 100644 --- a/src/libslic3r/Fill/FillPlanePath.cpp +++ b/src/libslic3r/Fill/FillPlanePath.cpp @@ -119,42 +119,44 @@ void FillPlanePath::_fill_surface_single( if (polyline.size() >= 2) { Polylines polylines = intersection_pl(polyline, expolygon); - Polylines chained; - if (params.dont_connect() || params.density > 0.5 || polylines.size() <= 1) { - // ORCA: special flag for flow rate calibration - auto is_flow_calib = params.extrusion_role == erTopSolidInfill && - this->print_object_config->has("calib_flowrate_topinfill_special_order") && - this->print_object_config->option("calib_flowrate_topinfill_special_order")->getBool() && - dynamic_cast(this); - if (is_flow_calib) { - // We want the spiral part to be printed inside-out - // Find the center spiral line first, by looking for the longest one - auto it = std::max_element(polylines.begin(), polylines.end(), [](const Polyline& a, const Polyline& b) { return a.length() < b.length(); }); - Polyline center_spiral = std::move(*it); + if (!polylines.empty()) { + Polylines chained; + if (params.dont_connect() || params.density > 0.5) { + // ORCA: special flag for flow rate calibration + auto is_flow_calib = params.extrusion_role == erTopSolidInfill && + this->print_object_config->has("calib_flowrate_topinfill_special_order") && + this->print_object_config->option("calib_flowrate_topinfill_special_order")->getBool() && + dynamic_cast(this); + if (is_flow_calib) { + // We want the spiral part to be printed inside-out + // Find the center spiral line first, by looking for the longest one + auto it = std::max_element(polylines.begin(), polylines.end(), + [](const Polyline& a, const Polyline& b) { return a.length() < b.length(); }); + Polyline center_spiral = std::move(*it); - // Ensure the spiral is printed from inside to out - if (center_spiral.first_point().squaredNorm() > center_spiral.last_point().squaredNorm()) { - center_spiral.reverse(); + // Ensure the spiral is printed from inside to out + if (center_spiral.first_point().squaredNorm() > center_spiral.last_point().squaredNorm()) { + center_spiral.reverse(); + } + + // Chain the other polylines + polylines.erase(it); + chained = chain_polylines(std::move(polylines)); + + // Then add the center spiral back + chained.push_back(std::move(center_spiral)); + } else { + chained = chain_polylines(std::move(polylines)); } - - // Chain the other polylines - polylines.erase(it); - chained = chain_polylines(std::move(polylines)); - - // Then add the center spiral back - chained.push_back(std::move(center_spiral)); - } else { - chained = chain_polylines(std::move(polylines)); + } else + connect_infill(std::move(polylines), expolygon, chained, this->spacing, params); + // paths must be repositioned and rotated back + for (Polyline& pl : chained) { + pl.translate(shift.x(), shift.y()); + pl.rotate(direction.first); } + append(polylines_out, std::move(chained)); } - else - connect_infill(std::move(polylines), expolygon, chained, this->spacing, params); - // paths must be repositioned and rotated back - for (Polyline &pl : chained) { - pl.translate(shift.x(), shift.y()); - pl.rotate(direction.first); - } - append(polylines_out, std::move(chained)); } } diff --git a/src/libslic3r/Fill/FillRectilinear.cpp b/src/libslic3r/Fill/FillRectilinear.cpp index c85d5e02fb..7fe310e14b 100644 --- a/src/libslic3r/Fill/FillRectilinear.cpp +++ b/src/libslic3r/Fill/FillRectilinear.cpp @@ -2928,7 +2928,7 @@ void make_fill_lines(const ExPolygonWithOffset &poly_with_offset, Point refpt, d bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillParams params, const std::initializer_list &sweep_params, Polylines &polylines_out) { - assert(sweep_params.size() > 1); + assert(sweep_params.size() >= 1); assert(! params.full_infill()); params.density /= double(sweep_params.size()); assert(params.density > 0.0001f && params.density <= 1.f); @@ -2948,12 +2948,14 @@ bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillPar make_fill_lines(ExPolygonWithOffset(poly_with_offset_base, - angle), rotate_vector.second.rotated(-angle), angle, line_width + coord_t(SCALED_EPSILON), line_spacing, coord_t(scale_(sweep.pattern_shift)), fill_lines); } - if (params.dont_connect() || fill_lines.size() <= 1) { - if (fill_lines.size() > 1) - fill_lines = chain_polylines(std::move(fill_lines)); - append(polylines_out, std::move(fill_lines)); - } else - connect_infill(std::move(fill_lines), poly_with_offset_base.polygons_outer, get_extents(surface->expolygon.contour), polylines_out, this->spacing, params); + if (!fill_lines.empty()) { + if (params.dont_connect()) { + if (fill_lines.size() > 1) + fill_lines = chain_polylines(std::move(fill_lines)); + append(polylines_out, std::move(fill_lines)); + } else + connect_infill(std::move(fill_lines), poly_with_offset_base.polygons_outer, get_extents(surface->expolygon.contour), polylines_out, this->spacing, params); + } return true; } @@ -2961,8 +2963,13 @@ bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillPar Polylines FillRectilinear::fill_surface(const Surface *surface, const FillParams ¶ms) { Polylines polylines_out; - if (! fill_surface_by_lines(surface, params, 0.f, 0.f, polylines_out)) - BOOST_LOG_TRIVIAL(error) << "FillRectilinear::fill_surface() failed to fill a region."; + if (params.full_infill()) { + if (!fill_surface_by_lines(surface, params, 0.f, 0.f, polylines_out)) + BOOST_LOG_TRIVIAL(error) << "FillRectilinear::fill_surface() fill_surface_by_lines() failed to fill a region."; + } else { + if (!fill_surface_by_multilines(surface, params, {{0.f, 0.f}}, polylines_out)) + BOOST_LOG_TRIVIAL(error) << "FillRectilinear::fill_surface() fill_surface_by_multilines() failed to fill a region."; + } return polylines_out; } diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 020471033c..5037465574 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -5270,8 +5270,11 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description, gcode += m_writer.set_jerk_xy(jerk); } - // calculate extrusion length per distance unit + // calculate effective extrusion length per distance unit (e_per_mm) + double filament_flow_ratio = m_config.option("filament_flow_ratio")->get_at(0); + // We set _mm3_per_mm to effectove flow = Geometric volume * print flow ratio * filament flow ratio * role-based-flow-ratios auto _mm3_per_mm = path.mm3_per_mm * this->config().print_flow_ratio; + _mm3_per_mm *= filament_flow_ratio; if (path.role() == erTopSolidInfill) _mm3_per_mm *= m_config.top_solid_infill_flow_ratio; else if (path.role() == erBottomSurface) @@ -5280,9 +5283,12 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description, _mm3_per_mm *= m_config.internal_bridge_flow; else if(sloped) _mm3_per_mm *= m_config.scarf_joint_flow_ratio; - - + // Effective extrusion length per distance unit = (filament_flow_ratio/cross_section) * mm3_per_mm / print flow ratio + // m_writer.extruder()->e_per_mm3() below is (filament flow ratio / cross-sectional area) double e_per_mm = m_writer.extruder()->e_per_mm3() * _mm3_per_mm; + e_per_mm /= filament_flow_ratio; + + // set speed if (speed == -1) { diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 0dd7b16e3e..08aad18b60 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -1150,6 +1150,7 @@ void GCodeProcessor::reset() m_forced_width = 0.0f; m_forced_height = 0.0f; m_mm3_per_mm = 0.0f; + m_travel_dist = 0.0f; m_fan_speed = 0.0f; m_z_offset = 0.0f; @@ -2648,7 +2649,8 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line, const std::o EMoveType type = move_type(delta_pos); if (type == EMoveType::Extrude) { - float delta_xyz = std::sqrt(sqr(delta_pos[X]) + sqr(delta_pos[Y]) + sqr(delta_pos[Z])); + const float delta_xyz = std::sqrt(sqr(delta_pos[X]) + sqr(delta_pos[Y]) + sqr(delta_pos[Z])); + m_travel_dist = delta_xyz; float volume_extruded_filament = area_filament_cross_section * delta_pos[E]; float area_toolpath_cross_section = volume_extruded_filament / delta_xyz; @@ -3125,7 +3127,8 @@ void GCodeProcessor::process_G2_G3(const GCodeReader::GCodeLine& line) EMoveType type = move_type(delta_pos[E]); - float delta_xyz = std::sqrt(sqr(arc_length) + sqr(delta_pos[Z])); + const float delta_xyz = std::sqrt(sqr(arc_length) + sqr(delta_pos[Z])); + m_travel_dist = delta_xyz; if (type == EMoveType::Extrude) { float volume_extruded_filament = area_filament_cross_section * delta_pos[E]; float area_toolpath_cross_section = volume_extruded_filament / delta_xyz; @@ -4783,6 +4786,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type, EMovePathType path_type) m_width, m_height, m_mm3_per_mm, + m_travel_dist, m_fan_speed, m_extruder_temps[m_extruder_id], static_cast(m_result.moves.size()), diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 661dd8a981..311920b6b8 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -162,6 +162,7 @@ class Print; float width{ 0.0f }; // mm float height{ 0.0f }; // mm float mm3_per_mm{ 0.0f }; + float travel_dist{ 0.0f }; // mm float fan_speed{ 0.0f }; // percentage float temperature{ 0.0f }; // Celsius degrees float time{ 0.0f }; // s @@ -704,6 +705,7 @@ class Print; float m_forced_width; // mm float m_forced_height; // mm float m_mm3_per_mm; + float m_travel_dist; // mm float m_fan_speed; // percentage float m_z_offset; // mm ExtrusionRole m_extrusion_role; diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index e42fe38ab1..3470556fb3 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -412,6 +412,7 @@ void GCodeViewer::SequentialView::Marker::render(int canvas_width, int canvas_he // break; // } case EViewType::VolumetricRate: { + if (m_curr_move.type != EMoveType::Extrude) break; ImGui::SameLine(startx2); sprintf(buf, "%s%.2f", flow.c_str(), m_curr_move.volumetric_rate()); ImGui::PushItemWidth(item_size); @@ -1143,8 +1144,12 @@ void GCodeViewer::refresh(const GCodeProcessorResult& gcode_result, const std::v m_extrusions.ranges.width.update_from(round_to_bin(curr.width)); m_extrusions.ranges.fan_speed.update_from(curr.fan_speed); m_extrusions.ranges.temperature.update_from(curr.temperature); - if (curr.extrusion_role != erCustom || is_visible(erCustom)) - m_extrusions.ranges.volumetric_rate.update_from(round_to_bin(curr.volumetric_rate())); + if (curr.delta_extruder > 0.005 && curr.travel_dist > 0.01) { + // Ignore very tiny extrusions from flow rate calculation, because + // it could give very imprecise result due to rounding in gcode generation + if (curr.extrusion_role != erCustom || is_visible(erCustom)) + m_extrusions.ranges.volumetric_rate.update_from(round_to_bin(curr.volumetric_rate())); + } if (curr.layer_duration > 0.f) { m_extrusions.ranges.layer_duration.update_from(curr.layer_duration); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp index 59c5f194ed..dfdd788029 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp @@ -174,7 +174,9 @@ void GLGizmoRotate::on_render() render_angle_arc(m_highlight_color, hover_radius_changed); } - render_grabber_connection(color, radius_changed); + // ORCA dont use axis color on line because they are not on same direction with axis + const ColorRGBA line_color = (m_hover_id != -1) ? m_drag_color : ColorRGBA(.6f, .6f ,.6f, 1.f); + render_grabber_connection(line_color, radius_changed); shader->stop_using(); } diff --git a/src/slic3r/GUI/ParamsPanel.cpp b/src/slic3r/GUI/ParamsPanel.cpp index 4435519a42..69048b0f95 100644 --- a/src/slic3r/GUI/ParamsPanel.cpp +++ b/src/slic3r/GUI/ParamsPanel.cpp @@ -366,13 +366,13 @@ void ParamsPanel::create_layout() m_mode_sizer->Add( m_title_label, 0, wxALIGN_CENTER ); m_mode_sizer->AddStretchSpacer(2); m_mode_sizer->Add(m_mode_region, 0, wxALIGN_CENTER); - m_mode_sizer->AddStretchSpacer(1); + m_mode_sizer->AddSpacer(FromDIP(SidebarProps::ElementSpacing())); m_mode_sizer->Add(m_tips_arrow, 0, wxALIGN_CENTER); m_mode_sizer->AddStretchSpacer(8); m_mode_sizer->Add( m_title_view, 0, wxALIGN_CENTER ); m_mode_sizer->AddSpacer(FromDIP(SidebarProps::ElementSpacing())); m_mode_sizer->Add(m_mode_view, 0, wxALIGN_CENTER); - m_mode_sizer->AddStretchSpacer(2); + m_mode_sizer->AddSpacer(FromDIP(SidebarProps::ElementSpacing() * 6)); // ORCA using spacer prevents shaky mode_view when tips_arrow highlighting mode_region instead using AddStretchSpacer m_mode_sizer->Add(m_setting_btn, 0, wxALIGN_CENTER); m_mode_sizer->AddSpacer(FromDIP(SidebarProps::IconSpacing())); m_mode_sizer->Add(m_compare_btn, 0, wxALIGN_CENTER); diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.cpp b/src/slic3r/GUI/PhysicalPrinterDialog.cpp index 1ec7b537e3..78e33b19e7 100644 --- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp +++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp @@ -136,9 +136,26 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr m_optgroup->append_single_option_line("host_type"); - auto create_sizer_with_btn = [](wxWindow* parent, ScalableButton** btn, const std::string& icon_name, const wxString& label) { - *btn = new ScalableButton(parent, wxID_ANY, icon_name, label, wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT); - (*btn)->SetFont(wxGetApp().normal_font()); + auto create_sizer_with_btn = [](wxWindow* parent, Button** btn, const std::string& icon_name, const wxString& label) { + *btn = new Button(parent, label, ""/*icon_name*/, 0, parent->FromDIP(16)); + (*btn)->SetFont(Label::Body_14); + (*btn)->SetMinSize(wxSize(parent->FromDIP(120), parent->FromDIP(26))); + (*btn)->SetSize(wxSize(parent->FromDIP(120), parent->FromDIP(26))); + (*btn)->SetCornerRadius(parent->FromDIP(4)); + StateColor clr_bg = StateColor( + std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed), + std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled) + ); + (*btn)->SetBackgroundColor(clr_bg); + (*btn)->SetBorderColor(clr_bg); + (*btn)->SetTextColor(StateColor( + std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled), + std::pair(wxColour("#262E30"), (int)StateColor::Hovered), + std::pair(wxColour("#262E30"), (int)StateColor::Normal) + )); auto sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(*btn); @@ -235,9 +252,8 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr auto print_host_printers = [this, create_sizer_with_btn](wxWindow* parent) { //add_scaled_button(parent, &m_printhost_port_browse_btn, "browse", _(L("Refresh Printers")), wxBU_LEFT | wxBU_EXACTFIT); - auto sizer = create_sizer_with_btn(parent, &m_printhost_port_browse_btn, "monitor_signal_strong", _(L("Refresh Printers"))); - ScalableButton* btn = m_printhost_port_browse_btn; - btn->SetFont(Slic3r::GUI::wxGetApp().normal_font()); + auto sizer = create_sizer_with_btn(parent, &m_printhost_port_browse_btn, "monitor_signal_strong", _L("Refresh") + " " + dots); + Button* btn = m_printhost_port_browse_btn; btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent e) { update_printers(); }); return sizer; }; @@ -712,11 +728,11 @@ void PhysicalPrinterDialog::on_dpi_changed(const wxRect& suggested_rect) { const int& em = em_unit(); - m_printhost_browse_btn->msw_rescale(); - m_printhost_test_btn->msw_rescale(); - m_printhost_logout_btn->msw_rescale(); + m_printhost_browse_btn->Rescale(); + m_printhost_test_btn->Rescale(); + m_printhost_logout_btn->Rescale(); if (m_printhost_cafile_browse_btn) - m_printhost_cafile_browse_btn->msw_rescale(); + m_printhost_cafile_browse_btn->Rescale(); m_optgroup->msw_rescale(); diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.hpp b/src/slic3r/GUI/PhysicalPrinterDialog.hpp index b6faff82f9..102e4635f6 100644 --- a/src/slic3r/GUI/PhysicalPrinterDialog.hpp +++ b/src/slic3r/GUI/PhysicalPrinterDialog.hpp @@ -11,7 +11,7 @@ class wxTextCtrl; class wxStaticText; -class ScalableButton; +class Button; class wxBoxSizer; namespace Slic3r { @@ -28,12 +28,12 @@ class PhysicalPrinterDialog : public DPIDialog DynamicPrintConfig* m_config { nullptr }; ConfigOptionsGroup* m_optgroup { nullptr }; - ScalableButton* m_printhost_browse_btn {nullptr}; - ScalableButton* m_printhost_test_btn {nullptr}; - ScalableButton* m_printhost_logout_btn {nullptr}; - ScalableButton* m_printhost_cafile_browse_btn {nullptr}; - ScalableButton* m_printhost_client_cert_browse_btn {nullptr}; - ScalableButton* m_printhost_port_browse_btn {nullptr}; + Button* m_printhost_browse_btn {nullptr}; + Button* m_printhost_test_btn {nullptr}; + Button* m_printhost_logout_btn {nullptr}; + Button* m_printhost_cafile_browse_btn {nullptr}; + Button* m_printhost_client_cert_browse_btn {nullptr}; + Button* m_printhost_port_browse_btn {nullptr}; RoundedRectangle* m_input_area {nullptr}; wxStaticText* m_valid_label {nullptr}; diff --git a/src/slic3r/GUI/PlateSettingsDialog.cpp b/src/slic3r/GUI/PlateSettingsDialog.cpp index 88f9391773..0558fabcf9 100644 --- a/src/slic3r/GUI/PlateSettingsDialog.cpp +++ b/src/slic3r/GUI/PlateSettingsDialog.cpp @@ -382,8 +382,8 @@ PlateSettingsDialog::PlateSettingsDialog(wxWindow* parent, const wxString& title auto plate_name_txt = new wxStaticText(this, wxID_ANY, _L("Plate name")); plate_name_txt->SetFont(Label::Body_14); m_ti_plate_name = new TextInput(this, wxString::FromDouble(0.0), "", "", wxDefaultPosition, wxSize(FromDIP(240),-1), wxTE_PROCESS_ENTER); - top_sizer->Add(plate_name_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT |wxALL, FromDIP(5)); - top_sizer->Add(m_ti_plate_name, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT |wxALL, FromDIP(5)); + top_sizer->Add(plate_name_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxTOP | wxBOTTOM, FromDIP(5)); + top_sizer->Add(m_ti_plate_name, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxTOP | wxBOTTOM, FromDIP(5)); m_bed_type_choice = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(240), -1), 0, NULL, wxCB_READONLY); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 81d16587a1..5a82d31f25 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -352,7 +352,8 @@ struct Sidebar::priv wxPanel* m_panel_project_title; ScalableButton* m_filament_icon = nullptr; Button * m_flushing_volume_btn = nullptr; - wxSearchCtrl* m_search_bar = nullptr; + TextInput* m_search_item = nullptr; + StaticBox* m_search_bar = nullptr; Search::SearchObjectDialog* dia = nullptr; // BBS printer config @@ -426,7 +427,7 @@ void Sidebar::priv::on_search_update() { m_object_list->assembly_plate_object_name(); - wxString search_text = m_search_bar->GetValue(); + wxString search_text = m_search_item->GetTextCtrl()->GetValue(); m_object_list->GetModel()->search_object(search_text); dia->update_list(); } @@ -439,7 +440,7 @@ void Sidebar::priv::jump_to_object(ObjectDataViewModelNode* item) void Sidebar::priv::can_search() { if (m_search_bar->IsShown()) { - m_search_bar->SetFocus(); + m_search_item->SetFocus(); } } @@ -1092,25 +1093,45 @@ Sidebar::Sidebar(Plater *parent) //add project content p->sizer_params = new wxBoxSizer(wxVERTICAL); - p->m_search_bar = new wxSearchCtrl(p->scrolled, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER); - p->m_search_bar->ShowSearchButton(true); - p->m_search_bar->ShowCancelButton(true); - p->m_search_bar->SetDescriptiveText(_L("Search plate, object and part.")); + // ORCA: Update search box to modern style + p->m_search_bar = new StaticBox(p->scrolled); + p->m_search_bar->SetCornerRadius(0); + p->m_search_bar->SetBorderColor(wxColour("#CECECE")); - p->m_search_bar->Bind(wxEVT_SET_FOCUS, [this](wxFocusEvent&) { + p->m_search_item = new TextInput(p->m_search_bar, wxEmptyString, wxEmptyString, "", wxDefaultPosition, wxDefaultSize, 0 | wxBORDER_NONE); + p->m_search_item->SetIcon(*BitmapCache().load_svg("search", FromDIP(16), FromDIP(16))); // ORCA: Add search icon to search box + + wxTextCtrl* text_ctrl = p->m_search_item->GetTextCtrl(); + text_ctrl->SetHint(_L("Search plate, object and part.")); + text_ctrl->SetForegroundColour(wxColour("#262E30")); + text_ctrl->SetFont(Label::Body_13); + text_ctrl->SetSize(wxSize(-1, FromDIP(16))); // Centers text vertically + + text_ctrl->Bind(wxEVT_SET_FOCUS, [this](wxFocusEvent& e) { this->p->on_search_update(); + p->m_search_bar->SetBorderColor(wxColour("#009688")); wxPoint pos = this->p->m_search_bar->ClientToScreen(wxPoint(0, 0)); pos.y += this->p->m_search_bar->GetRect().height; p->dia->SetPosition(pos); p->dia->Popup(); - }); - p->m_search_bar->Bind(wxEVT_COMMAND_TEXT_UPDATED, [this](wxCommandEvent&) { + e.Skip(); // required to show caret + }); + text_ctrl->Bind(wxEVT_COMMAND_TEXT_UPDATED, [this](wxCommandEvent&) { this->p->on_search_update(); - }); - p->m_search_bar->Bind(wxEVT_KILL_FOCUS, [this](wxFocusEvent& e) { + }); + text_ctrl->Bind(wxEVT_KILL_FOCUS, [this](wxFocusEvent& e) { p->dia->Dismiss(); + p->m_search_bar->SetBorderColor(wxColour("#CECECE")); + p->m_search_item->GetTextCtrl()->SetValue(""); // reset value when loose focus e.Skip(); - }); + }); + + auto search_sizer = new wxBoxSizer(wxHORIZONTAL); + search_sizer->Add(new wxWindow(p->m_search_bar, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(1)); + search_sizer->Add(p->m_search_item, 1, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(2)); + p->m_search_bar->SetSizer(search_sizer); + p->m_search_bar->Layout(); + search_sizer->Fit(p->m_search_bar); p->m_object_list = new ObjectList(p->scrolled); @@ -1122,7 +1143,7 @@ Sidebar::Sidebar(Plater *parent) // Frequently Object Settings p->object_settings = new ObjectSettings(p->scrolled); - p->dia = new Search::SearchObjectDialog(p->m_object_list, p->m_search_bar); + p->dia = new Search::SearchObjectDialog(p->m_object_list, text_ctrl); #if !NEW_OBJECT_SETTING p->object_settings->Hide(); p->sizer_params->Add(p->object_settings->get_sizer(), 0, wxEXPAND | wxTOP, 5 * em / 10); @@ -1511,6 +1532,9 @@ void Sidebar::msw_rescale() // BBS //p->object_manipulation->msw_rescale(); p->object_settings->msw_rescale(); + p->m_search_item->Rescale(); + p->m_search_item->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(16))); + p->m_search_bar->Layout(); // BBS #if 0 diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 3aeb61779d..5c6724fbef 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -273,7 +273,7 @@ void Tab::create_preset_tab() //search input m_search_item = new StaticBox(m_top_panel); StateColor box_colour(std::pair(*wxWHITE, StateColor::Normal)); - StateColor box_border_colour(std::pair(wxColour("#DBDBDB"), StateColor::Normal)); // ORCA match border color with other input/combo boxes + StateColor box_border_colour(std::pair(wxColour("#009688"), StateColor::Normal)); // ORCA match border color with other input/combo boxes m_search_item->SetBackgroundColor(box_colour); m_search_item->SetBorderColor(box_border_colour); @@ -286,8 +286,9 @@ void Tab::create_preset_tab() m_search_input->SetBackgroundColour(wxColour(238, 238, 238)); m_search_input->SetForegroundColour(wxColour(43, 52, 54)); m_search_input->SetFont(wxGetApp().bold_font()); - - search_sizer->Add(new wxWindow(m_search_item, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(6)); + m_search_input->SetIcon(*BitmapCache().load_svg("search", FromDIP(16), FromDIP(16))); + m_search_input->GetTextCtrl()->SetHint(_L("Search in preset") + dots); + search_sizer->Add(new wxWindow(m_search_item, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(2)); search_sizer->Add(m_search_input, 1, wxEXPAND | wxALL, FromDIP(2)); //bbl for linux //search_sizer->Add(new wxWindow(m_search_input, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND | wxLEFT, 16); @@ -3545,14 +3546,30 @@ void TabFilament::build() optgroup->append_single_option_line("filament_stamping_loading_speed"); optgroup->append_single_option_line("filament_stamping_distance"); create_line_with_widget(optgroup.get(), "filament_ramming_parameters", "", [this](wxWindow* parent) { - auto ramming_dialog_btn = new wxButton(parent, wxID_ANY, _(L("Ramming settings"))+dots, wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); - wxGetApp().UpdateDarkUI(ramming_dialog_btn); - ramming_dialog_btn->SetFont(Slic3r::GUI::wxGetApp().normal_font()); - ramming_dialog_btn->SetSize(ramming_dialog_btn->GetBestSize()); - auto sizer = new wxBoxSizer(wxHORIZONTAL); - sizer->Add(ramming_dialog_btn); + // ORCA modernize button style + Button* btn = new Button(parent, _(L("Set")) + " " + dots); + btn->SetFont(Label::Body_14); + btn->SetSize(wxSize(FromDIP(120), FromDIP(26))); + btn->SetCornerRadius(FromDIP(4)); + StateColor clr_bg = StateColor( + std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed), + std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled) + ); + btn->SetBackgroundColor(clr_bg); + btn->SetBorderColor(clr_bg); + btn->SetTextColor(StateColor( + std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled), + std::pair(wxColour("#262E30"), (int)StateColor::Hovered), + std::pair(wxColour("#262E30"), (int)StateColor::Normal) + )); - ramming_dialog_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& e) { + auto sizer = new wxBoxSizer(wxHORIZONTAL); + sizer->Add(btn); + + btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& e) { RammingDialog dlg(this,(m_config->option("filament_ramming_parameters"))->get_at(0)); if (dlg.ShowModal() == wxID_OK) { load_key_value("filament_ramming_parameters", dlg.get_parameters()); @@ -3568,7 +3585,7 @@ void TabFilament::build() optgroup->append_single_option_line("filament_multitool_ramming_flow"); page = add_options_page(L("Dependencies"), "advanced"); - optgroup = page->new_optgroup(L("Profile dependencies")); + optgroup = page->new_optgroup(L("Profile dependencies"), "param_profile_dependencies"); create_line_with_widget(optgroup.get(), "compatible_printers", "", [this](wxWindow* parent) { return compatible_widget_create(parent, m_compatible_printers); }); @@ -5907,10 +5924,27 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep deps.checkbox = new wxCheckBox(parent, wxID_ANY, _(L("All"))); deps.checkbox->SetFont(Slic3r::GUI::wxGetApp().normal_font()); wxGetApp().UpdateDarkUI(deps.checkbox, false, true); - deps.btn = new ScalableButton(parent, wxID_ANY, "printer", from_u8((boost::format(" %s %s") % _utf8(L("Set")) % std::string(dots.ToUTF8())).str()), - wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT, true); - deps.btn->SetFont(Slic3r::GUI::wxGetApp().normal_font()); - deps.btn->SetSize(deps.btn->GetBestSize()); + + // ORCA modernize button style + Button* btn = new Button(parent, _(L("Set")) + " " + dots); + btn->SetFont(Label::Body_14); + btn->SetSize(wxSize(FromDIP(120), FromDIP(26))); + btn->SetCornerRadius(FromDIP(4)); + StateColor clr_bg = StateColor( + std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed), + std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled) + ); + btn->SetBackgroundColor(clr_bg); + btn->SetBorderColor(clr_bg); + btn->SetTextColor(StateColor( + std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled), + std::pair(wxColour("#262E30"), (int)StateColor::Hovered), + std::pair(wxColour("#262E30"), (int)StateColor::Normal) + )); + deps.btn = btn; auto sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add((deps.checkbox), 0, wxALIGN_CENTER_VERTICAL); @@ -5994,10 +6028,25 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep // Return a callback to create a TabPrinter widget to edit bed shape wxSizer* TabPrinter::create_bed_shape_widget(wxWindow* parent) { - ScalableButton* btn = new ScalableButton(parent, wxID_ANY, "printer", " " + _(L("Set")) + " " + dots, - wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT, true); - btn->SetFont(wxGetApp().normal_font()); - btn->SetSize(btn->GetBestSize()); + // ORCA modernize button style + Button* btn = new Button(parent, _(L("Set")) + " " + dots); + btn->SetFont(Label::Body_14); + btn->SetSize(wxSize(FromDIP(120), FromDIP(26))); + btn->SetCornerRadius(FromDIP(4)); + StateColor clr_bg = StateColor( + std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed), + std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal), + std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled) + ); + btn->SetBackgroundColor(clr_bg); + btn->SetBorderColor(clr_bg); + btn->SetTextColor(StateColor( + std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled), + std::pair(wxColour("#262E30"), (int)StateColor::Hovered), + std::pair(wxColour("#262E30"), (int)StateColor::Normal) + )); auto sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(btn, 0, wxALIGN_CENTER_VERTICAL); diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index cab9990bb4..5f5081fe54 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -164,7 +164,7 @@ protected: struct PresetDependencies { Preset::Type type = Preset::TYPE_INVALID; wxCheckBox *checkbox = nullptr; - ScalableButton *btn = nullptr; + Button *btn = nullptr; std::string key_list; // "compatible_printers" std::string key_condition; wxString dialog_title; diff --git a/src/slic3r/GUI/Widgets/StateColor.cpp b/src/slic3r/GUI/Widgets/StateColor.cpp index f2e1b07027..95cea1882f 100644 --- a/src/slic3r/GUI/Widgets/StateColor.cpp +++ b/src/slic3r/GUI/Widgets/StateColor.cpp @@ -11,6 +11,10 @@ static std::map gDarkColors{ {"#FF6F00", "#D15B00"}, // rgb(255, 111, 0) Secondary color {"#D01B1B", "#BB2A3A"}, // rgb(208, 27, 27) ??? {"#262E30", "#EFEFF0"}, // rgb(38, 46, 48) Button text color | Input Text Color + {"#DFDFDF", "#3E3E45"}, // rgb(223, 223, 223) Button Background color + {"#D4D4D4", "#4D4D54"}, // rgb(212, 212, 212) Button Background color on Hover + {"#6B6A6A", "#909090"}, // rgb(107, 107, 106) Button Dimmed text + {"#6B6B6A", "#B3B3B5"}, // rgb(107, 107, 106) Input box side text {"#2C2C2E", "#B3B3B4"}, // rgb(44, 44, 46) ??? {"#6B6B6B", "#818183"}, // rgb(107, 107, 107) Disabled Text {"#ACACAC", "#65656A"}, // rgb(172, 172, 172) Disabled Text on boxes | Dimmed Elements @@ -28,7 +32,6 @@ static std::map gDarkColors{ {"#DBDBDB", "#4A4A51"}, // rgb(219, 219, 219) Input/Combo Box Border Color {"#EDFAF2", "#283232"}, // rgb(229, 240, 238) Not Used anymore // Was used for BBS Combo / Dropdown focused background color {"#323A3C", "#E5E5E6"}, // rgb(50, 58, 60) Text color used on search list | - {"#6B6B6A", "#B3B3B5"}, // rgb(107, 107, 106) Button Dimmed text | Input box side text {"#303A3C", "#E5E5E5"}, // rgb(48, 58, 60) Object Table > Column header text color | StaticBox Border Color {"#FEFFFF", "#242428"}, // rgb(254, 255, 255) Side Tabbar bg | {"#A6A9AA", "#2D2D29"}, // rgb(166, 169, 170) Seperator color