Compare commits

..
Author SHA1 Message Date
SoftFever ec7a7ff1ff PA per filament 2022-11-05 14:49:37 +08:00
SoftFever 6fb941cf4c Merge branch 'master-remote' into SoftFever
# Conflicts:
#	resources/profiles/Creality.json
#	resources/profiles/Voron.json
#	version.inc
2022-11-05 11:26:59 +08:00
SoftFever 3c70c12720 add heating command.
Save new users from panic
2022-11-05 11:19:38 +08:00
SoftFever 0008668fa5 Change layer time to float 2022-11-05 00:33:07 +08:00
SoftFever 78b9fcb71b filter out tiny gaps 2022-11-04 16:44:43 +08:00
SoftFever 1a371a9417 fix a small UI glitch caused by printer viewer 2022-11-02 21:19:46 +08:00
SoftFever 47225a83a2 add doxygen 2022-11-01 21:14:40 +08:00
gerrit c05d42cc1c ci: update build version to 01.03.00.22
Change-Id: I69d99b1b3306fd0d191a22b320705f846b82eb9d
2022-11-01 20:52:23 +08:00
qing.zhang eae71a5184 ENH: remove the dulicate warning msg of temp
Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I978f2de34e277c6747adc783cb91c341f159a67e
2022-11-01 20:52:23 +08:00
lane.wei 8df60acc61 FIX: fix the label switch incorrect issue when print_sequence change
1. only turn on label while switch from by_layer to by_object
2. don't crash when filament_colours mismatch between project_config and PresetBundle

Change-Id: Icac9d0d7f88e17fcad3b042ea19cda3ac23ae62c
2022-11-01 20:52:23 +08:00
lane.wei 082c695db1 ENH: version: increase version of profiles
Change-Id: I2dc0bbf8374f60f4e4c43806c9e16bd20d9d08f2
2022-11-01 20:52:23 +08:00
lane.wei 7086a3fb5a ENH: add some logs for appconfig::save exception
Change-Id: Ic65345af7debdb340fce5dd03fe09257d7c2c395
2022-11-01 20:52:23 +08:00
gerrit 28cf2d56e2 ci: update build version to 01.03.00.21
Change-Id: Iff25f6602a010247776103aa882d2fb1eefe4ec3
2022-11-01 20:52:23 +08:00
Arthur 8dd401d35f FIX: auto-arrange reads wrongs first_bed_temp
Also change words for extruder clearance parameters.

Change-Id: I736fd9049d184c140b33078d78f764b4fe172765
(cherry picked from commit e70c0c0ea133cffa5788efbfc9633332b196e8df)
2022-11-01 20:52:23 +08:00
gerrit d3e7989119 ci: update build version to 01.03.00.20
Change-Id: I9245d64eb7ae836581fc2426921b4ecda63a064e
2022-11-01 20:52:23 +08:00
Arthur 703f93d8e2 FIX: reduce height_to_lid to 90mm
Towline may be even lower than the upper rod. Let's
take away 10mm tolerance.

Change-Id: I13972fc4ecb0671e1af4b2c6d102e319417e532f
(cherry picked from commit cedcb862556c8c9014a91ef2aad8f39fc118d925)
2022-11-01 20:52:23 +08:00
gerrit 85c0aeb19f ci: update build version to 01.03.00.19
Change-Id: Ieee2345c952011ef87915bb07134ccb3c36309ec
2022-11-01 20:52:23 +08:00
lane.wei c79af29ad4 ENH: refine the label logic of seq_print
use the arrange_order computed by Print
turn on label by default when switch to sequent print

Change-Id: I7063bcc9494bbfc14a3cee85eaf30a9eb52c99d2
2022-11-01 20:52:23 +08:00
gerrit 301b85f5c0 ci: update build version to 01.03.00.18
Change-Id: Ic3ad3d2e1314e131178962961c6d8c75afb3ad4c
2022-11-01 20:52:23 +08:00
gerrit 387889cda0 ci: update build version to 01.03.00.17
Change-Id: I4a3695999070a72b9cf59f2273875d788ecb4cb8
2022-11-01 20:52:23 +08:00
Arthur f16f5afec5 FIX: 2 auto-arrange bugss with per-object printing
1. use strict ordering to ensure the printing order is right
2. reduce height-to-lid to 100mm considering towline is lower than lid
and may collid with objects

TODO: printing brim may still collide, need to subtract inflated boundary of
others during brim generation

Change-Id: Icf0cba10c579d28fabd97764c1b3abec267ebd9b
(cherry picked from commit 46c6f5ff94488b2f4481bf1d34555f4a7c45e135)
2022-11-01 20:52:23 +08:00
gerrit 66f38fbb81 ci: update build version to 01.03.00.16
Change-Id: I44e01e64fcc762c9bc0082b446543f78bfb40279
2022-11-01 20:52:23 +08:00
gerrit 95496fc057 ci: update build version to 01.03.00.15
Change-Id: I2936f6922e0ee188575777483d7c12a92dcef024
2022-11-01 20:52:23 +08:00
liz.li c065c3a2e6 FIX:AssembleViewData crash
Change-Id: I759a385621b8a83d89abcc7c1b38786e067dbb33
(cherry picked from commit c218e7dd77fad970f637412dc9c230b1241c1f67)
2022-11-01 20:52:23 +08:00
gerrit ebf7a6c3c7 ci: update build version to 01.03.00.14
Change-Id: I2d9679a72adafd0e0b29cf1da27d98f034cd4abf
2022-11-01 20:52:23 +08:00
Arthur c8c073a199 FIX: print ordering didn't consider object height
This may cause tall objects be printed before short ones. There are two
possible solutions:
1. do strict ordering only when y-overlap is large enough (the one
   chosen in this commit)
2. when considering vertical collision with rod, the actual expansion
   can be much smaller (because the rod is only slightly off extruder).
   But this solution requires an extra parameter. Let's hold it for a
   while.

Change-Id: Icc9a4796d49dad93cbcc20d4103e641a48886e5e
(cherry picked from commit 6a958b1fa9e58e4ca3be63b4918da77bcdc53314)
(cherry picked from commit ceff67789c27ea576afd663a2e5bae9a10241728)
2022-11-01 20:52:23 +08:00
tao wang db233c6051 FIX:fixed cant not link to wiki on macos
Change-Id: I8c7fc943e9c6eb46c1f7a63dcd32f0a9a7f120d3
(cherry picked from commit 1fd7ef86e39c979e8b986c9f6d6db239949682cd)
2022-11-01 20:52:23 +08:00
gerrit badd314724 ci: update build version to 01.03.00.13
Change-Id: Iedf30b5615da18c0b5e3a1e86e12cfd9d7de6af2
2022-11-01 20:52:23 +08:00
Arthur Tang 5544e9602c FIX: rewrite per-object printing order logic
1. Previous logic can't guarantee left-to-right printing order, so
   toolhead may crash on the right side. In the new algorithm printing
   order is guaranteed.
2. Clearance radius should be the max of 3 directions (left, bottom,
   up), not including right, otherwise collision may happen on bottom or
   up directions.
3. Add is_extrusion_cali_object property to handle extrusion brim
   overlap better.

Change-Id: I44868b9925d983f5cca0c31d35dfa28d895fadbf
2022-11-01 20:52:23 +08:00
qing.zhang 59dfcb98fc FIX: fix the empty layer after adding modifier
Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: Iad6c149cb5f1a50a199fdf1dd50f4971898972e2
(cherry picked from commit 6065729c6febb9f3a704dde12bda6ad34f62caec)
2022-11-01 20:52:23 +08:00
tao wang 39df4c8b49 FIX:fixed description messages not refreshing the scrollbar
Change-Id: Ie067784144031d4f9418b4af1b08420bf919d7f1
(cherry picked from commit 520703c1823bdf6ec802467b4bc035da8e797d8f)
2022-11-01 20:52:23 +08:00
tao wang 34e1939666 FIX:change the downloading plugin url of the wiki
Change-Id: I0eb1c42105e5e27e16b9888f8c415aa157cd6f03
(cherry picked from commit 6a35a3546722d16e6118539ab60b748aa9666097)
2022-11-01 20:52:23 +08:00
tao wang 57c877ab9a FIX:fixed incorrect display after adding files via add
Change-Id: Id812b40cb85a882a8c490ccdc2375e0d9b8e312d
2022-11-01 20:52:23 +08:00
SoftFever cf8ff30c74 bump voron profile version 2022-10-30 21:32:40 +08:00
SoftFever dc941163eb bump up version 1.32 2022-10-30 19:45:35 +08:00
SoftFever fdb4196ad5 handle klipper set_velocity_limit 2022-10-30 00:50:15 +08:00
SoftFever 258f800b8b Merge branch 'SoftFever' into feature/compatible_comments 2022-10-28 17:44:50 +08:00
SoftFever 9a5a336483 show fan speed 2022-10-28 17:17:35 +08:00
SoftFever a89a354c31 layer count issue fixed 2022-10-28 17:16:07 +08:00
SoftFever 644742133e fix crash when there are unicode string in the model path 2022-10-26 21:23:51 +08:00
SoftFever 96810ea994 handle url 2022-10-26 12:45:16 +08:00
SoftFever bd672054cc fix aux fan issue for third party printers 2022-10-25 21:42:36 +08:00
SoftFever ec28acf476 Special handling temperature for Klipper 2022-10-25 10:40:23 +08:00
SoftFever bd38df6a6a un-hide fan speed/temp preview 2022-10-25 09:11:19 +08:00
SoftFever 48e5d3d3c1 hide bed type for 3rd party printer 2022-10-25 09:10:09 +08:00
SoftFever dd77599dea small perimeter threshold 2022-10-24 22:35:40 +08:00
SoftFever 397e0f0a29 Merge branch 'SoftFever' into feature/small_perimeter 2022-10-24 14:53:58 +08:00
SoftFever 166832cd94 add back small perimeter support 2022-10-24 14:47:18 +08:00
SoftFever e65ba104dd support changing thumbnail size 2022-10-23 23:00:46 +08:00
SoftFever cd71a86d3f support klipper gcode flavor 2022-10-23 19:42:01 +08:00
SoftFever ff760815ca Device view for third party printers 2022-10-23 16:37:34 +08:00
SoftFever 658d41dd69 Omit M981 for third party printers 2022-10-23 15:49:02 +08:00
SoftFever c40607aef3 update 1.3.1 changenotes 2022-10-22 14:37:56 +08:00
SoftFever 1b6db78f9e bump version to 1.3.1 2022-10-22 01:09:57 +08:00
SoftFever 3d2ee60acd update mac build script 2022-10-22 01:07:32 +08:00
SoftFever b7572b9004 Omit BBL specific gcodes for other machines 2022-10-22 00:19:08 +08:00
SoftFever bab4f443e2 expose more parameters 2022-10-21 16:50:59 +08:00
SoftFever 6072053737 update SF version 2022-10-21 16:50:34 +08:00
73 changed files with 3730 additions and 287 deletions
+12 -5
View File
@@ -6,6 +6,18 @@ It also supports Voron and Prusa MK3S printers.
You can download it here: https://github.com/SoftFever/BambuStudio-SoftFever/releases
## BambuStudio SoftFever change notes:
### [V1.3.1 changes](https://github.com/SoftFever/BambuStudio-SoftFever/releases/tag/v1.3.1-sf):
1. Support change bed size and nozzle diameter
2. Allow users to specify the bridge infill direction
3. bridge_infill_direction1
4. bridge_infill_direction2
5. Change to ISO view angle for preview image
6. Add an option to change Z Hop action: NormalLift/SpiralLift
7. Optimise g-code generation for both Bambu printers and 3rd party printers
8. Support Klipper Exclude Objects
9. Better support for Moonraker's metadata.
### [V1.2.5.3 changes](https://github.com/SoftFever/BambuStudio-SoftFever/releases/tag/v1.2.5.3-sf):
1. Label objects to support Klipper Exclude Objects feature
2. Allow users to change output file name format
@@ -97,11 +109,6 @@ It's also recommended to add followinging dummy macros to make Klipper happy
[gcode_macro G17]
gcode:
[gcode_macro M981]
gcode:
[gcode_macro M1003]
gcode:
```
- For Prusa MK3S:
+15
View File
@@ -1030,6 +1030,12 @@ msgstr "自动Brim"
msgid "Outer wall speed"
msgstr "外墙速度"
msgid "Small perimeters"
msgstr "微小部位"
msgid "Small perimeters threshold"
msgstr "微小部位周长阈值"
msgid "Plate"
msgstr "盘"
@@ -4804,6 +4810,12 @@ msgstr "桥接"
msgid "Gap infill"
msgstr "填缝"
msgid "Filter out tiny gaps"
msgstr "忽略微小间隙"
msgid "Filter out gaps smaller than the threshold specified. This setting won't affact top/bottom layers"
msgstr "小于指定阈值的微小间隙不填充。本设置不会对顶/底层起作用"
msgid "Support interface"
msgstr "支撑面"
@@ -5895,6 +5907,9 @@ msgstr "如果机器有辅助部件冷却风扇,勾选该选项"
msgid "G-code flavor"
msgstr "G-code风格"
msgid "G-code thumbnails"
msgstr "G-code缩略图尺寸"
msgid "What kind of gcode the printer is compatible with"
msgstr "打印机兼容的G-code风格'"
+1 -1
View File
@@ -9,6 +9,6 @@ cmake --build . --config Release --target ALL_BUILD -- -m
cd %WP%
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=0 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake --build . --config Release --target ALL_BUILD -- -m
cmake --build . --target install --config Release
+6 -3
View File
@@ -6,12 +6,15 @@ mkdir -p build
cd build
DEPS=$PWD/BambuStudio_dep
mkdir -p $DEPS
cmake ../ -DDESTDIR="$DEPS" -DOPENSSL_ARCH="darwin64-$(uname -m)-cc" -DCMAKE_BUILD_TYPE=Release
cmake ../ -DDESTDIR="$DEPS" -DOPENSSL_ARCH="darwin64-$(uname -m)-cc" -DCMAKE_BUILD_TYPE=Release
make -j10
cd $WD
mkdir -p build
cd build
cmake .. -DBBL_RELEASE_TO_PUBLIC=0 -DCMAKE_PREFIX_PATH="$DEPS/usr/local" -DCMAKE_INSTALL_PREFIX="$PWD/BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="$DEPS/usr/local" -DCMAKE_MACOSX_BUNDLE=ON
cmake --build . --config Release --target all
cmake .. -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="$DEPS/usr/local" -DCMAKE_INSTALL_PREFIX="$PWD/BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=Release -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH="$DEPS/usr/local" -DCMAKE_MACOSX_BUNDLE=ON
cmake --build . --config Release --target all -j10
cmake --build . --target install --config Release -j10
cd BambuStudio-SoftFever
cp -r bin/BambuStudio.app/Contents/MacOS BambuStudio.app/Contents
cp -r bin/BambuStudio.app/Contents/Info.plist BambuStudio.app/Contents/
+1 -1
View File
@@ -9,6 +9,6 @@ cmake --build . --config Release --target ALL_BUILD -- -m
cd %WP%
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=0 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake .. -G "Visual Studio 16 2019" -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="%DEPS%/usr/local" -DCMAKE_INSTALL_PREFIX="./BambuStudio-SoftFever" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWIN10SDK_PATH="C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0"
cmake --build . --config RelWithDebInfo --target ALL_BUILD -- -m
@REM cmake --build . --target install --config RelWithDebInfo
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Anycubic",
"version": "01.02.00.03",
"version": "01.02.00.05",
"force_update": "0",
"description": "Anycubic configurations",
"machine_model_list": [
@@ -20,7 +20,7 @@
"0x205"
],
"printable_height": "200",
"machine_start_gcode": ";M190 S0\n;M104 S0\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_start_gcode": "M190 S[bed_temperature_initial_layer_single]\nM109 S[nozzle_temperature_initial_layer]\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_end_gcode": "PRINT_END",
"layer_change_gcode": "",
"scan_first_layer": "0",
@@ -130,7 +130,7 @@
"single_extruder_multi_material": "1",
"change_filament_gcode": "",
"before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0\n",
"layer_change_gcode": "",
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
"machine_pause_gcode": "M400 U1\n",
"wipe": [
"1"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "Bambulab",
"url": "http://www.bambulab.com/Parameters/vendor/BBL.json",
"version": "01.03.00.02",
"version": "01.03.00.13",
"force_update": "0",
"description": "the initial version of BBL configurations",
"machine_model_list": [
@@ -111,9 +111,10 @@
"0.08"
],
"printable_height": "250",
"extruder_clearance_radius": "32",
"extruder_clearance_radius": "57",
"extruder_clearance_max_radius": "68",
"extruder_clearance_height_to_rod": "36",
"extruder_clearance_height_to_lid": "140",
"extruder_clearance_height_to_lid": "90",
"nozzle_volume": "118",
"nozzle_diameter": [
"0.4"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Prusa",
"version": "01.02.00.02",
"version": "01.02.00.03",
"force_update": "0",
"description": "Prusa configurations",
"machine_model_list": [
@@ -23,7 +23,7 @@
"0x210"
],
"printable_height": "210",
"machine_start_gcode": "M862.3 P \"[printer_model]\" ; printer model check\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S170 ; set extruder temp for bed leveling\nM140 S[bed_temperature_initial_layer_single] ; set bed temp\nM109 R170 ; wait for bed leveling temp\nM190 S[bed_temperature_initial_layer_single] ; wait for bed temp\nM204 T1250 ; set travel acceleration\nG28 ; home all without mesh bed level\nG29 ; mesh bed leveling \nM204 T[machine_max_acceleration_travel] ; restore travel acceleration\nM104 S[nozzle_temperature_initial_layer] ; set extruder temp\nG92 E0\nG1 Y-2 X179 F2400\nG1 Z3 F720\nM109 S[nozzle_temperature_initial_layer] ; wait for extruder temp\n\n; intro line\nG1 X170 F1000\nG1 Z0.2 F720\nG1 X110 E8 F900\nG1 X40 E10 F700\nG92 E0\n\nM221 S95 ; set flow",
"machine_start_gcode": "G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S170 ; set extruder temp for bed leveling\nM140 S[bed_temperature_initial_layer_single] ; set bed temp\nM109 R170 ; wait for bed leveling temp\nM190 S[bed_temperature_initial_layer_single] ; wait for bed temp\nM204 T1250 ; set travel acceleration\nG28 ; home all without mesh bed level\nG29 ; mesh bed leveling \nM204 T[machine_max_acceleration_travel] ; restore travel acceleration\nM104 S[nozzle_temperature_initial_layer] ; set extruder temp\nG92 E0\nG1 Y-2 X179 F2400\nG1 Z3 F720\nM109 S[nozzle_temperature_initial_layer] ; wait for extruder temp\n\n; intro line\nG1 X170 F1000\nG1 Z0.2 F720\nG1 X110 E8 F900\nG1 X40 E10 F700\nG92 E0\n\nM221 S95 ; set flow",
"machine_end_gcode": "G1 E-1 F2100 ; retract\n{if max_layer_z < 210}G1 Z{min(max_layer_z+2, 210)} F720 ; Move print head up{endif}\nG1 X178 Y178 F4200 ; park print head\n{if max_layer_z < 210}G1 Z{min(max_layer_z+30, 210)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM221 S100 ; reset flow\nM900 K0 ; reset LA\nM84 ; disable motors",
"layer_change_gcode": "",
"scan_first_layer": "0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Voron",
"version": "01.02.01.03",
"version": "01.02.01.06",
"force_update": "0",
"description": "Voron configurations",
"machine_model_list": [
@@ -4,7 +4,7 @@
"from": "system",
"instantiation": "false",
"inherits": "fdm_machine_common",
"gcode_flavor": "marlin",
"gcode_flavor": "klipper",
"machine_max_acceleration_e": [
"5000",
"5000"
@@ -131,9 +131,9 @@
"bed_exclude_area": [
"0x0"
],
"machine_start_gcode": ";M190 S0\n;M104 S0\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_start_gcode": "M190 S[bed_temperature_initial_layer_single]\nM109 S[nozzle_temperature_initial_layer]\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
"machine_end_gcode": "PRINT_END",
"layer_change_gcode": "",
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
"before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0\n",
"scan_first_layer": "0",
"nozzle_type": "undefine",
+2725
View File
File diff suppressed because it is too large Load Diff
@@ -84,6 +84,15 @@ public:
std::sort(store_.begin(), store_.end(), sortfunc);
// debug: write down intitial order
for (auto it = store_.begin(); it != store_.end(); ++it) {
std::stringstream ss;
ss << "initial order: " << it->get().name << ", p=" << it->get().priority() << ", bed_temp=" << it->get().bed_temp << ", height=" << it->get().height
<< ", area=" << it->get().area();
if (this->unfitindicator_)
this->unfitindicator_(ss.str());
}
int item_id = 0;
auto makeProgress = [this, &item_id](Placer &placer, size_t bin_idx) {
packed_bins_[bin_idx] = placer.getItems();
@@ -102,7 +111,7 @@ public:
bool was_packed = false;
int best_bed_id = -1;
int bed_id_firstfit = -1;
double score = LARGE_COST_TO_REJECT, best_score = LARGE_COST_TO_REJECT;
double score = LARGE_COST_TO_REJECT+1, best_score = LARGE_COST_TO_REJECT+1;
double score_all_plates = 0, score_all_plates_best = std::numeric_limits<double>::max();
typename Placer::PackResult result, result_best, result_firstfit;
size_t j = 0;
@@ -130,8 +139,8 @@ public:
// item is not fit because we have tried all possible plates to find a good enough fit
if (bed_id_firstfit == MAX_NUM_PLATES) {
it->get().binId(BIN_ID_UNFIT);
//if (this->unfitindicator_)
// this->unfitindicator_(it->get().name + " bed_id_firstfit == MAX_NUM_PLATES" + ",best_score=" + std::to_string(best_score));
if (this->unfitindicator_)
this->unfitindicator_(it->get().name + " bed_id_firstfit == MAX_NUM_PLATES" + ",best_score=" + std::to_string(best_score));
break;
}
else {
@@ -152,10 +161,13 @@ public:
}
if(!was_packed){
//if (this->unfitindicator_)
// this->unfitindicator_(it->get().name + " ,plate_id=" + std::to_string(j) + ",score=" + std::to_string(score)
// + ", score_all_plates=" + std::to_string(score_all_plates)
// + ", overfit=" + std::to_string(result.overfit()));
if (this->unfitindicator_ && !placers.empty())
this->unfitindicator_(it->get().name + ", height=" +std::to_string(it->get().height)
+ " ,plate_id=" + std::to_string(j-1)
+ ", score=" + std::to_string(score)
+ ", best_bed_id=" + std::to_string(best_bed_id)
+ ", score_all_plates=" + std::to_string(score_all_plates)
+", overfit=" + std::to_string(result.overfit()));
placers.emplace_back(bin);
placers.back().plateID(placers.size() - 1);
+4 -2
View File
@@ -533,8 +533,10 @@ void AppConfig::save()
{
// Returns "undefined" if the thread naming functionality is not supported by the operating system.
std::optional<std::string> current_thread_name = get_current_thread_name();
if (current_thread_name && *current_thread_name != "bambustu_main")
throw CriticalException("Calling AppConfig::save() from a worker thread!");
if (current_thread_name && *current_thread_name != "bambustu_main") {
BOOST_LOG_TRIVIAL(error) << __FUNCTION__<<", current_thread_name is " << *current_thread_name;
throw CriticalException("Calling AppConfig::save() from a worker thread, thread name: " + *current_thread_name);
}
}
// The config is first written to a file with a PID suffix and then moved
+7 -8
View File
@@ -404,8 +404,8 @@ protected:
hasLidHeightConflict |= (p.height > clearance_height_to_lid);
}
double lambda3 = LARGE_COST_TO_REJECT;
double lambda4 = LARGE_COST_TO_REJECT;
double lambda3 = LARGE_COST_TO_REJECT*1.1;
double lambda4 = LARGE_COST_TO_REJECT*1.2;
for (int i = 0; i < m_items.size(); i++) {
Item& p = m_items[i];
if (p.is_virt_object) continue;
@@ -556,12 +556,11 @@ public:
}
});
//if (progressind) {
// m_pck.unfitIndicator([this, progressind](std::string name) {
// progressind(100, name+" not fit!");
// BOOST_LOG_TRIVIAL(debug) << "arrange not fit: " + name;
// });
//}
if (progressind) {
m_pck.unfitIndicator([this, progressind](std::string name) {
BOOST_LOG_TRIVIAL(debug) << "arrange not fit: " + name;
});
}
if (stopcond) m_pck.stopCondition(stopcond);
+1
View File
@@ -52,6 +52,7 @@ struct ArrangePolygon {
//BBS: add locked_plate to indicate whether it is in the locked plate
int locked_plate{ -1 };
bool is_virt_object{ false };
bool is_extrusion_cali_object{ false };
bool is_wipe_tower{false};
//BBS: add row/col for sudoku-style layout
int row{0};
+2 -1
View File
@@ -467,8 +467,9 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
params.no_extrusion_overlap = surface_fill.params.overlap;
LayerRegion* layerm = this->m_regions[surface_fill.region_id];
params.config = &layerm->region().config();
for (ExPolygon& expoly : surface_fill.expolygons) {
f->no_overlap_expolygons = intersection_ex(layerm->fill_no_overlap_expolygons, ExPolygons() = { expoly });
f->no_overlap_expolygons = intersection_ex(surface_fill.no_overlap_expolygons, ExPolygons() = {expoly});
// Spacing is modified by the filler to indicate adjustments. Reset it for each expolygon.
f->spacing = surface_fill.params.spacing;
surface_fill.surface.expolygon = std::move(expoly);
+2
View File
@@ -74,6 +74,8 @@ struct FillParams
bool using_internal_flow{ false };
//BBS: only used for new top surface pattern
float no_extrusion_overlap{ 0.0 };
const PrintRegionConfig* config{ nullptr };
};
static_assert(IsTriviallyCopyable<FillParams>::value, "FillParams class is not POD (and it should be - see constructor).");
+8
View File
@@ -3169,9 +3169,17 @@ void FillMonotonicLineWGapFill::fill_surface_extrusion(const Surface* surface, c
}
if (!polylines.empty() && !is_bridge(params.extrusion_role)) {
if (!surface->is_top() && !surface->is_bottom()) {
polylines.erase(std::remove_if(polylines.begin(), polylines.end(),
[&](const ThickPolyline& p) {
return p.length() < scale_(params.config->filter_out_gap_fill.value);
}), polylines.end());
}
ExtrusionEntityCollection gap_fill;
variable_width(polylines, erGapFill, params.flow, gap_fill.entities);
coll_nosort->append(std::move(gap_fill.entities));
}
}
+137 -61
View File
@@ -435,6 +435,11 @@ bool GCode::gcode_label_objects = true;
gcode += tcr_gcode;
check_add_eol(toolchange_gcode_str);
//SoftFever: set new PA for new filament
if (gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
}
// A phony move to the end position at the wipe tower.
gcodegen.writer().travel_to_xy(end_pos.cast<double>());
gcodegen.set_last_pos(wipe_tower_point_to_object_point(gcodegen, end_pos + plate_origin_2d));
@@ -906,8 +911,15 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu
return;
BOOST_LOG_TRIVIAL(info) << boost::format("Will export G-code to %1% soon")%path;
GCodeProcessor::s_IsBBLPrinter = print->is_BBL_printer();
print->set_started(psGCodeExport);
if (print->is_BBL_printer())
gcode_label_objects = false;
else
gcode_label_objects = true;
// check if any custom gcode contains keywords used by the gcode processor to
// produce time estimation and gcode toolpaths
std::vector<std::pair<std::string, std::string>> validation_res = DoExport::validate_custom_gcode(*print);
@@ -1285,7 +1297,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
// modifies m_silent_time_estimator_enabled
DoExport::init_gcode_processor(print.config(), m_processor, m_silent_time_estimator_enabled);
const bool is_bbl_printers = print.is_BBL_printer();
// resets analyzer's tracking data
m_last_height = 0.f;
m_last_layer_z = 0.f;
@@ -1349,19 +1361,49 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str());
file.write_format("; HEADER_BLOCK_END\n\n");
//BBS: write global config at the beginning of gcode file because printer need these config information
// Append full config, delimited by two 'phony' configuration keys CONFIG_BLOCK_START and CONFIG_BLOCK_END.
// The delimiters are structured as configuration key / value pairs to be parsable by older versions of PrusaSlicer G-code viewer.
// BBS: write global config at the beginning of gcode file because printer
// need these config information
// Append full config, delimited by two 'phony' configuration keys
// CONFIG_BLOCK_START and CONFIG_BLOCK_END. The delimiters are structured
// as configuration key / value pairs to be parsable by older versions of
// PrusaSlicer G-code viewer.
{
file.write_format("; hack-fix: write fake slicer info here so that Moonraker will extract thumbs.\n");
file.write_format("; %s\n\n",std::string(std::string("generated by SuperSlicer " SLIC3R_VERSION " on " ) + Slic3r::Utils::utc_timestamp()).c_str());
if (is_bbl_printers) {
file.write("; CONFIG_BLOCK_START\n");
std::string full_config;
append_full_config(print, full_config);
if (!full_config.empty())
file.write(full_config);
// SoftFever: write compatiple image
std::vector<int> temps_per_bed;
int first_layer_bed_temperature = 0;
get_bed_temperature(0, true, temps_per_bed,
first_layer_bed_temperature);
file.write_format("; first_layer_bed_temperature = %d\n",
first_layer_bed_temperature);
file.write_format(
"; first_layer_temperature = %d\n",
print.config().nozzle_temperature_initial_layer.get_at(0));
file.write("; CONFIG_BLOCK_END\n\n");
} else {
file.write_format("; hack-fix: write fake slicer info here so that "
"Moonraker will extract thumbs.\n");
file.write_format(
"; %s\n\n",
std::string(
std::string("generated by SuperSlicer " SLIC3R_VERSION " on ") +
Slic3r::Utils::utc_timestamp())
.c_str());
DoExport::export_thumbnails_to_file(
thumbnail_cb, print.get_plate_index(), print.full_print_config().option<ConfigOptionPoints>("thumbnails")->values,
[&file](const char *sz) { file.write(sz); },
[&print]() { print.throw_if_canceled(); });
}
}
//BBS: add plate id into thumbnail render logic
DoExport::export_thumbnails_to_file(thumbnail_cb, print.get_plate_index(), { Vec2d(300, 300) },
[&file](const char* sz) { file.write(sz); },
[&print]() { print.throw_if_canceled(); });
// Write some terse information on the slicing parameters.
const PrintObject *first_object = print.objects().front();
@@ -1464,7 +1506,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
}
// Disable fan.
if (print.config().close_fan_the_first_x_layers.get_at(initial_extruder_id)) {
if (m_config.auxiliary_fan.value && print.config().close_fan_the_first_x_layers.get_at(initial_extruder_id)) {
file.write(m_writer.set_fan(0));
//BBS: disable additional fan
file.write(m_writer.set_additional_fan(0));
@@ -1504,7 +1546,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
m_placeholder_parser.set("first_layer_print_max", new ConfigOptionFloats({ bbox.max.x(), bbox.max.y() }));
m_placeholder_parser.set("first_layer_print_size", new ConfigOptionFloats({ bbox.size().x(), bbox.size().y() }));
}
float outer_wall_volumetric_speed = 0.0f;
{
int curr_bed_type = m_config.curr_bed_type.getInt();
@@ -1528,7 +1570,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
}
Flow outer_wall_flow = Flow(outer_wall_line_width, m_config.layer_height, m_config.nozzle_diameter.get_at(initial_extruder_id));
float outer_wall_speed = print.default_region_config().outer_wall_speed.value;
float outer_wall_volumetric_speed = outer_wall_speed * outer_wall_flow.mm3_per_mm();
outer_wall_volumetric_speed = outer_wall_speed * outer_wall_flow.mm3_per_mm();
if (outer_wall_volumetric_speed > filament_max_volumetric_speed)
outer_wall_volumetric_speed = filament_max_volumetric_speed;
m_placeholder_parser.set("outer_wall_volumetric_speed", new ConfigOptionFloat(outer_wall_volumetric_speed));
@@ -1536,16 +1578,26 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
}
std::string machine_start_gcode = this->placeholder_parser_process("machine_start_gcode", print.config().machine_start_gcode.value, initial_extruder_id);
// Set bed temperature if the start G-code does not contain any bed temp control G-codes.
this->_print_first_layer_bed_temperature(file, print, machine_start_gcode, initial_extruder_id, true);
// Set extruder(s) temperature before and after start G-code.
this->_print_first_layer_extruder_temperatures(file, print, machine_start_gcode, initial_extruder_id, false);
if (print.config().gcode_flavor != gcfKlipper) {
// Set bed temperature if the start G-code does not contain any bed temp control G-codes.
this->_print_first_layer_bed_temperature(file, print, machine_start_gcode, initial_extruder_id, true);
// Set extruder(s) temperature before and after start G-code.
this->_print_first_layer_extruder_temperatures(file, print, machine_start_gcode, initial_extruder_id, false);
}
// adds tag for processor
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str());
// Write the custom start G-code
file.writeln(machine_start_gcode);
if (print.config().gcode_flavor == gcfKlipper) {
this->_print_first_layer_bed_temperature(file, print, "",
initial_extruder_id, true);
this->_print_first_layer_extruder_temperatures(
file, print, "", initial_extruder_id, false);
}
//BBS: gcode writer doesn't know where the real position of extruder is after inserting custom gcode
m_writer.set_current_position_clear(false);
@@ -1591,12 +1643,11 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
if (this->m_objsWithBrim.empty() && this->m_objSupportsWithBrim.empty()) m_brim_done = true;
//BBS: open spaghetti detector
// if (print.config().spaghetti_detector.value)
file.write("M981 S1 P20000 ;open spaghetti detector\n");
if(m_config.enable_pressure_advance.value)
{
file.write_format("M900 K%.3f ; Override pressure advance value\n",m_config.pressure_advance.values.front());
if (is_bbl_printers) {
// if (print.config().spaghetti_detector.value)
file.write("M981 S1 P20000 ;open spaghetti detector\n");
}
// Do all objects for each layer.
if (print.config().print_sequence == PrintSequence::ByObject) {
size_t finished_objects = 0;
@@ -1659,7 +1710,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
this->process_layers(print, tool_ordering, collect_layers_to_print(object), *print_object_instance_sequential_active - object.instances().data(), file, prime_extruder);
//BBS: close powerlost recovery
{
if (m_second_layer_things_done) {
if (is_bbl_printers && m_second_layer_things_done) {
file.write("; close powerlost recovery\n");
file.write("M1003 S0\n");
}
@@ -1730,7 +1781,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
this->process_layers(print, tool_ordering, print_object_instances_ordering, layers_to_print, file);
//BBS: close powerlost recovery
{
if (m_second_layer_things_done) {
if (is_bbl_printers && m_second_layer_things_done) {
file.write("; close powerlost recovery\n");
file.write("M1003 S0\n");
}
@@ -1749,11 +1800,14 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
file.write(this->retract(false, true));
file.write(m_writer.set_fan(0));
//BBS: make sure the additional fan is closed when end
file.write(m_writer.set_additional_fan(0));
//BBS: close spaghetti detector
//Note: M981 is also used to tell xcam the last layer is finished, so we need always send it even if spaghetti option is disabled.
//if (print.config().spaghetti_detector.value)
file.write("M981 S0 P20000 ; close spaghetti detector\n");
if(m_config.auxiliary_fan.value)
file.write(m_writer.set_additional_fan(0));
if (is_bbl_printers) {
//BBS: close spaghetti detector
//Note: M981 is also used to tell xcam the last layer is finished, so we need always send it even if spaghetti option is disabled.
//if (print.config().spaghetti_detector.value)
file.write("M981 S0 P20000 ; close spaghetti detector\n");
}
// adds tag for processor
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str());
@@ -1796,27 +1850,44 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
m_writer.extruders(),
// Modifies
print.m_print_statistics));
file.write("\n");
file.write("; CONFIG_BLOCK_START\n");
std::string full_config;
append_full_config(print, full_config);
if (!full_config.empty())
if (!is_bbl_printers) {
file.write_format("; total filament used [g] = %.2lf\n",
print.m_print_statistics.total_weight);
file.write_format("; total filament cost = %.2lf\n",
print.m_print_statistics.total_cost);
if (print.m_print_statistics.total_toolchanges > 0)
file.write_format("; total filament change = %i\n",
print.m_print_statistics.total_toolchanges);
file.write_format("; total layers count = %i\n", m_layer_count);
file.write_format(
";%s\n",
GCodeProcessor::reserved_tag(
GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder)
.c_str());
file.write("\n");
file.write("; CONFIG_BLOCK_START\n");
std::string full_config;
append_full_config(print, full_config);
if (!full_config.empty())
file.write(full_config);
// SoftFever: write compatiple image
std::vector<int> temps_per_bed;
int first_layer_bed_temperature = 0;
get_bed_temperature(0, true, temps_per_bed, first_layer_bed_temperature);
file.write_format("; first_layer_bed_temperature = %d\n", first_layer_bed_temperature);
file.write_format("; first_layer_temperature = %d\n", print.config().nozzle_temperature_initial_layer.get_at(0));
file.write("; CONFIG_BLOCK_END\n\n");
file.write_format("; total filament used [g] = %.2lf\n", print.m_print_statistics.total_weight);
file.write_format("; total filament cost = %.2lf\n", print.m_print_statistics.total_cost);
if (print.m_print_statistics.total_toolchanges > 0)
file.write_format("; total filament change = %i\n", print.m_print_statistics.total_toolchanges);
// SoftFever: write compatiple info
std::vector<int> temps_per_bed;
int first_layer_bed_temperature = 0;
get_bed_temperature(0, true, temps_per_bed, first_layer_bed_temperature);
file.write_format("; first_layer_bed_temperature = %d\n",
first_layer_bed_temperature);
file.write_format(
"; first_layer_temperature = %d\n",
print.config().nozzle_temperature_initial_layer.get_at(0));
file.write_format(
"; first_layer_height = %.3f\n",
print.config().initial_layer_print_height.value);
file.write("; CONFIG_BLOCK_END\n\n");
file.write_format("; total layers count = %i\n", m_layer_count);
file.write_format(";%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Estimated_Printing_Time_Placeholder).c_str());
}
file.write("\n");
print.throw_if_canceled();
}
@@ -2470,7 +2541,7 @@ GCode::LayerResult GCode::process_layer(
gcode += ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Layer_Change) + "\n";
// export layer z
char buf[64];
sprintf(buf, "; Z_HEIGHT: %g\n", print_z);
sprintf(buf, print.is_BBL_printer() ? "; Z_HEIGHT: %g\n" : ";Z:%g\n", print_z);
gcode += buf;
// export layer height
float height = first_layer ? static_cast<float>(print_z) : static_cast<float>(print_z) - m_last_layer_z;
@@ -2522,20 +2593,21 @@ GCode::LayerResult GCode::process_layer(
}
if (! first_layer && ! m_second_layer_things_done) {
//BBS: open powerlost recovery
if (print.is_BBL_printer()) {
// BBS: open powerlost recovery
{
gcode += "; open powerlost recovery\n";
gcode += "M1003 S1\n";
gcode += "; open powerlost recovery\n";
gcode += "M1003 S1\n";
}
// BBS: open first layer inspection at second layer
if (print.config().scan_first_layer.value) {
// BBS: retract first to avoid droping when scan model
gcode += this->retract();
gcode += "M976 S1 P1 ; scan model before printing 2nd layer\n";
gcode += "M400 P100\n";
gcode += this->unretract();
// BBS: retract first to avoid droping when scan model
gcode += this->retract();
gcode += "M976 S1 P1 ; scan model before printing 2nd layer\n";
gcode += "M400 P100\n";
gcode += this->unretract();
}
}
//BBS: reset acceleration at sencond layer
if (m_config.default_acceleration.value > 0 && m_config.initial_layer_acceleration.value > 0) {
double acceleration = m_config.default_acceleration.value;
@@ -3249,8 +3321,8 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
// BBS: remove small small_perimeter_speed config, and will absolutely
// remove related code if no other issue in the coming release.
// apply the small perimeter speed
//if (is_perimeter(paths.front().role()) && loop.length() <= SMALL_PERIMETER_LENGTH && speed == -1)
// speed = m_config.small_perimeter_speed.get_abs_value(m_config.inner_wall_speed);
if (is_perimeter(paths.front().role()) && loop.length() <= SMALL_PERIMETER_LENGTH(m_config.small_perimeter_threshold.value) && speed == -1)
speed = m_config.small_perimeter_speed.get_abs_value(m_config.outer_wall_speed);
// extrude along the path
std::string gcode;
@@ -4146,6 +4218,10 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z)
if (m_ooze_prevention.enable)
gcode += m_ooze_prevention.post_toolchange(*this);
if (m_config.enable_pressure_advance.get_at(extruder_id)) {
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
}
return gcode;
}
+2 -2
View File
@@ -774,7 +774,7 @@ std::string CoolingBuffer::apply_layer_cooldown(
new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_fan_speed);
}
//BBS
if (additional_fan_speed_new != m_additional_fan_speed) {
if (additional_fan_speed_new != m_additional_fan_speed && m_config.auxiliary_fan.value) {
m_additional_fan_speed = additional_fan_speed_new;
new_gcode += GCodeWriter::set_additional_fan(m_additional_fan_speed);
}
@@ -811,7 +811,7 @@ std::string CoolingBuffer::apply_layer_cooldown(
//BBS: force to write a fan speed command again
if (m_current_fan_speed != -1)
new_gcode += GCodeWriter::set_fan(m_config.gcode_flavor, m_current_fan_speed);
if (m_additional_fan_speed != -1)
if (m_additional_fan_speed != -1 && m_config.auxiliary_fan.value)
new_gcode += GCodeWriter::set_additional_fan(m_additional_fan_speed);
}
else if (line->type & CoolingLine::TYPE_EXTRUDE_END) {
+94 -13
View File
@@ -14,6 +14,7 @@
#include <float.h>
#include <assert.h>
#include <regex>
#if __has_include(<charconv>)
#include <charconv>
@@ -56,12 +57,30 @@ const std::vector<std::string> GCodeProcessor::Reserved_Tags = {
"_GP_ESTIMATED_PRINTING_TIME_PLACEHOLDER"
};
const std::vector<std::string> GCodeProcessor::Reserved_Tags_compatible = {
"TYPE:",
"WIPE_START",
"WIPE_END",
"HEIGHT:",
"WIDTH:",
"LAYER_CHANGE",
"COLOR_CHANGE",
"PAUSE_PRINT",
"CUSTOM_GCODE",
"_GP_FIRST_LINE_M73_PLACEHOLDER",
"_GP_LAST_LINE_M73_PLACEHOLDER",
"_GP_ESTIMATED_PRINTING_TIME_PLACEHOLDER"
};
const std::string GCodeProcessor::Flush_Start_Tag = " FLUSH_START";
const std::string GCodeProcessor::Flush_End_Tag = " FLUSH_END";
const float GCodeProcessor::Wipe_Width = 0.05f;
const float GCodeProcessor::Wipe_Height = 0.05f;
bool GCodeProcessor::s_IsBBLPrinter = true;
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
const std::string GCodeProcessor::Mm3_Per_Mm_Tag = "MM3_PER_MM:";
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
@@ -808,11 +827,12 @@ bool GCodeProcessor::contains_reserved_tag(const std::string& gcode, std::string
bool ret = false;
GCodeReader parser;
parser.parse_buffer(gcode, [&ret, &found_tag](GCodeReader& parser, const GCodeReader::GCodeLine& line) {
auto& _tags = s_IsBBLPrinter ? Reserved_Tags : Reserved_Tags_compatible;
parser.parse_buffer(gcode, [&ret, &found_tag, _tags](GCodeReader& parser, const GCodeReader::GCodeLine& line) {
std::string comment = line.raw();
if (comment.length() > 2 && comment.front() == ';') {
comment = comment.substr(1);
for (const std::string& s : Reserved_Tags) {
for (const std::string& s : _tags) {
if (boost::starts_with(comment, s)) {
ret = true;
found_tag = comment;
@@ -835,11 +855,12 @@ bool GCodeProcessor::contains_reserved_tags(const std::string& gcode, unsigned i
CNumericLocalesSetter locales_setter;
GCodeReader parser;
parser.parse_buffer(gcode, [&ret, &found_tag, max_count](GCodeReader& parser, const GCodeReader::GCodeLine& line) {
auto& _tags = s_IsBBLPrinter ? Reserved_Tags : Reserved_Tags_compatible;
parser.parse_buffer(gcode, [&ret, &found_tag, max_count, _tags](GCodeReader& parser, const GCodeReader::GCodeLine& line) {
std::string comment = line.raw();
if (comment.length() > 2 && comment.front() == ';') {
comment = comment.substr(1);
for (const std::string& s : Reserved_Tags) {
for (const std::string& s : _tags) {
if (boost::starts_with(comment, s)) {
ret = true;
found_tag.push_back(comment);
@@ -890,7 +911,7 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
m_result.filament_vitrification_temperature[i] = static_cast<float>(config.temperature_vitrification.get_at(i));
}
if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware) {
if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfKlipper) {
m_time_processor.machine_limits = reinterpret_cast<const MachineEnvelopeConfig&>(config);
if (m_flavor == gcfMarlinLegacy) {
// Legacy Marlin does not have separate travel acceleration, it uses the 'extruding' value instead.
@@ -1066,7 +1087,7 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
if (machine_unload_filament_time != nullptr)
m_time_processor.filament_unload_times = static_cast<float>(machine_unload_filament_time->value);
if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware) {
if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfKlipper) {
const ConfigOptionFloats* machine_max_acceleration_x = config.option<ConfigOptionFloats>("machine_max_acceleration_x");
if (machine_max_acceleration_x != nullptr)
m_time_processor.machine_limits.machine_max_acceleration_x.values = machine_max_acceleration_x->values;
@@ -1578,6 +1599,15 @@ void GCodeProcessor::process_gcode_line(const GCodeReader::GCodeLine& line, bool
m_start_position = m_end_position;
const std::string_view cmd = line.cmd();
if (m_flavor == gcfKlipper)
{
if (boost::iequals(cmd, "SET_VELOCITY_LIMIT"))
{
process_SET_VELOCITY_LIMIT(line);
return;
}
}
if (cmd.length() > 1) {
// process command lines
switch (cmd[0])
@@ -3504,7 +3534,7 @@ void GCodeProcessor::process_M203(const GCodeReader::GCodeLine& line)
// see http://reprap.org/wiki/G-code#M203:_Set_maximum_feedrate
// http://smoothieware.org/supported-g-codes
float factor = (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfSmoothie) ? 1.0f : MMMIN_TO_MMSEC;
float factor = (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfSmoothie || m_flavor == gcfKlipper) ? 1.0f : MMMIN_TO_MMSEC;
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
if (static_cast<PrintEstimatedStatistics::ETimeMode>(i) == PrintEstimatedStatistics::ETimeMode::Normal ||
@@ -3583,6 +3613,54 @@ void GCodeProcessor::process_M205(const GCodeReader::GCodeLine& line)
}
}
void GCodeProcessor::process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& line)
{
// handle SQUARE_CORNER_VELOCITY
std::regex pattern("\\sSQUARE_CORNER_VELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)");
std::smatch matches;
if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) {
float _jerk = 0;
try
{
_jerk = std::stof(matches[1]);
}
catch (...){}
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
set_option_value(m_time_processor.machine_limits.machine_max_jerk_x, i, _jerk);
set_option_value(m_time_processor.machine_limits.machine_max_jerk_y, i, _jerk);
}
}
pattern = std::regex("\\sACCEL\\s*=\\s*([0-9]*\\.*[0-9]*)");
if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) {
float _accl = 0;
try
{
_accl = std::stof(matches[1]);
}
catch (...) {}
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
set_acceleration(static_cast<PrintEstimatedStatistics::ETimeMode>(i), _accl);
set_travel_acceleration(static_cast<PrintEstimatedStatistics::ETimeMode>(i), _accl);
}
}
pattern = std::regex("\\sVELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)");
if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) {
float _speed = 0;
try
{
_speed = std::stof(matches[1]);
}
catch (...) {}
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
set_option_value(m_time_processor.machine_limits.machine_max_speed_x, i, _speed);
set_option_value(m_time_processor.machine_limits.machine_max_speed_y, i, _speed);
}
}
}
void GCodeProcessor::process_M221(const GCodeReader::GCodeLine& line)
{
float value_s;
@@ -3980,18 +4058,21 @@ void GCodeProcessor::update_slice_warnings()
auto used_extruders = get_used_extruders();
assert(!used_extruders.empty());
GCodeProcessorResult::SliceWarning warning;
warning.level = 1;
if (m_highest_bed_temp != 0) {
for (size_t i = 0; i < used_extruders.size(); i++) {
int temperature = get_filament_vitrification_temperature(used_extruders[i]);
if (temperature != 0 && m_highest_bed_temp > temperature) {
GCodeProcessorResult::SliceWarning warning;
warning.level = 1;
warning.msg = BED_TEMP_TOO_HIGH_THAN_FILAMENT;
m_result.warnings.emplace_back(std::move(warning));
}
if (temperature != 0 && m_highest_bed_temp > temperature)
warning.params.push_back(std::to_string(used_extruders[i]));
}
}
if (!warning.params.empty()) {
warning.msg = BED_TEMP_TOO_HIGH_THAN_FILAMENT;
m_result.warnings.push_back(warning);
}
m_result.warnings.shrink_to_fit();
}
+7 -1
View File
@@ -197,6 +197,7 @@ namespace Slic3r {
class GCodeProcessor
{
static const std::vector<std::string> Reserved_Tags;
static const std::vector<std::string> Reserved_Tags_compatible;
static const std::string Flush_Start_Tag;
static const std::string Flush_End_Tag;
@@ -217,7 +218,7 @@ namespace Slic3r {
Estimated_Printing_Time_Placeholder
};
static const std::string& reserved_tag(ETags tag) { return Reserved_Tags[static_cast<unsigned char>(tag)]; }
static const std::string& reserved_tag(ETags tag) { return s_IsBBLPrinter ? Reserved_Tags[static_cast<unsigned char>(tag)] : Reserved_Tags_compatible[static_cast<unsigned char>(tag)]; }
// checks the given gcode for reserved tags and returns true when finding the 1st (which is returned into found_tag)
static bool contains_reserved_tag(const std::string& gcode, std::string& found_tag);
// checks the given gcode for reserved tags and returns true when finding any
@@ -227,6 +228,8 @@ namespace Slic3r {
static const float Wipe_Width;
static const float Wipe_Height;
static bool s_IsBBLPrinter;
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
static const std::string Mm3_Per_Mm_Tag;
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
@@ -791,6 +794,9 @@ namespace Slic3r {
// Advanced settings
void process_M205(const GCodeReader::GCodeLine& line);
// Klipper SET_VELOCITY_LIMIT
void process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& line);
// Set extrude factor override percentage
void process_M221(const GCodeReader::GCodeLine& line);
+1 -2
View File
@@ -99,8 +99,7 @@ public:
}
WipeTowerWriter& disable_linear_advance() {
m_gcode += (m_gcode_flavor == gcfRepRapSprinter || m_gcode_flavor == gcfRepRapFirmware
? (std::string("M572 D") + std::to_string(m_current_tool) + " S0\n")
m_gcode += (m_gcode_flavor == gcfKlipper ? (std::string("SET_PRESSURE_ADVANCE ADVANCE=0\n"))
: std::string("M900 K0\n"));
return *this;
}
+24 -3
View File
@@ -22,7 +22,7 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config)
{
this->config.apply(print_config, true);
m_single_extruder_multi_material = print_config.single_extruder_multi_material.value;
bool is_marlin = print_config.gcode_flavor.value == gcfMarlinLegacy || print_config.gcode_flavor.value == gcfMarlinFirmware;
bool is_marlin = print_config.gcode_flavor.value == gcfMarlinLegacy || print_config.gcode_flavor.value == gcfMarlinFirmware || print_config.gcode_flavor.value == gcfKlipper;
m_max_acceleration = std::lrint(is_marlin ? print_config.machine_max_acceleration_extruding.values.front() : 0);
m_max_jerk = std::lrint(is_marlin ? std::min(print_config.machine_max_jerk_x.values.front(), print_config.machine_max_jerk_y.values.front()) : 0);
}
@@ -55,7 +55,8 @@ std::string GCodeWriter::preamble()
FLAVOR_IS(gcfMarlinFirmware) ||
FLAVOR_IS(gcfTeacup) ||
FLAVOR_IS(gcfRepetier) ||
FLAVOR_IS(gcfSmoothie))
FLAVOR_IS(gcfSmoothie) ||
FLAVOR_IS(gcfKlipper))
{
if (RELATIVE_E_AXIS) {
gcode << "M83 ; only support relative e\n";
@@ -196,7 +197,11 @@ std::string GCodeWriter::set_jerk_xy(unsigned int jerk)
m_last_jerk = jerk;
std::ostringstream gcode;
gcode << "M205 X" << jerk << " Y" << jerk;
if(FLAVOR_IS(gcfKlipper))
gcode << "SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=" << jerk;
else
gcode << "M205 X" << jerk << " Y" << jerk;
if (GCodeWriter::full_gcode_comment) gcode << " ; adjust jerk";
gcode << "\n";
@@ -204,6 +209,22 @@ std::string GCodeWriter::set_jerk_xy(unsigned int jerk)
}
std::string GCodeWriter::set_pressure_advance(double pa) const
{
std::ostringstream gcode;
if (pa < 0)
return gcode.str();
if (FLAVOR_IS(gcfKlipper))
gcode << "SET_PRESSURE_ADVANCE ADVANCE=" << std::setprecision(4) << pa << "; Override pressure advance value\n";
else
gcode << "M900 K" <<std::setprecision(4)<< pa << "; Override pressure advance value\n";
return gcode.str();
}
std::string GCodeWriter::reset_e(bool force)
{
if (FLAVOR_IS(gcfMach3)
+1
View File
@@ -47,6 +47,7 @@ public:
std::string set_bed_temperature(std::vector<int> temps_per_bed, int default_temp, bool wait = false);
std::string set_acceleration(unsigned int acceleration);
std::string set_jerk_xy(unsigned int jerk);
std::string set_pressure_advance(double pa) const;
std::string reset_e(bool force = false);
std::string update_progress(unsigned int num, unsigned int tot, bool allow_100 = false) const;
// return false if this extruder was already selected
+3 -1
View File
@@ -170,7 +170,9 @@ void Layer::make_perimeters()
&& config.wall_loops == other_config.wall_loops
&& config.inner_wall_speed == other_config.inner_wall_speed
&& config.outer_wall_speed == other_config.outer_wall_speed
&& config.gap_infill_speed.value == other_config.gap_infill_speed.value
&& config.small_perimeter_speed == other_config.small_perimeter_speed
&& config.gap_infill_speed.value == other_config.gap_infill_speed.value
&& config.filter_out_gap_fill.value == other_config.filter_out_gap_fill.value
&& config.detect_overhang_wall == other_config.detect_overhang_wall
&& config.opt_serialize("inner_wall_line_width") == other_config.opt_serialize("inner_wall_line_width")
&& config.detect_thin_wall == other_config.detect_thin_wall
+4 -1
View File
@@ -2769,6 +2769,7 @@ double Model::findMaxSpeed(const ModelObject* object) {
double solidInfillSpeedObj = Model::printSpeedMap.solidInfillSpeed;
double topSolidInfillSpeedObj = Model::printSpeedMap.topSolidInfillSpeed;
double supportSpeedObj = Model::printSpeedMap.supportSpeed;
double smallPerimeterSpeedObj = Model::printSpeedMap.smallPerimeterSpeed;
for (std::string objectKey : objectKeys) {
if (objectKey == "inner_wall_speed"){
perimeterSpeedObj = object->config.opt_float(objectKey);
@@ -2784,8 +2785,10 @@ double Model::findMaxSpeed(const ModelObject* object) {
supportSpeedObj = object->config.opt_float(objectKey);
if (objectKey == "outer_wall_speed")
externalPerimeterSpeedObj = object->config.opt_float(objectKey);
if (objectKey == "small_perimeter_speed")
smallPerimeterSpeedObj = object->config.get_abs_value(objectKey);
}
objMaxSpeed = std::max(perimeterSpeedObj, std::max(externalPerimeterSpeedObj, std::max(infillSpeedObj, std::max(solidInfillSpeedObj, std::max(topSolidInfillSpeedObj, std::max(supportSpeedObj, objMaxSpeed))))));
objMaxSpeed = std::max(perimeterSpeedObj, std::max(externalPerimeterSpeedObj, std::max(infillSpeedObj, std::max(solidInfillSpeedObj, std::max(topSolidInfillSpeedObj, std::max(supportSpeedObj, std::max(smallPerimeterSpeedObj, objMaxSpeed)))))));
if (objMaxSpeed <= 0) objMaxSpeed = 250.;
return objMaxSpeed;
}
+1
View File
@@ -1211,6 +1211,7 @@ struct GlobalSpeedMap
double solidInfillSpeed;
double topSolidInfillSpeed;
double supportSpeed;
double smallPerimeterSpeed;
double maxSpeed;
};
+2 -2
View File
@@ -127,11 +127,11 @@ ArrangePolygon get_instance_arrange_poly(ModelInstance* instance, const Slic3r::
const ConfigOptionInts* bed_opt = config.option<ConfigOptionInts>(get_bed_temp_key(curr_bed_type));
if (bed_opt != nullptr)
ap.bed_temp = bed_opt->get_at(ap.extrude_ids.back());
ap.bed_temp = bed_opt->get_at(ap.extrude_ids.back()-1);
const ConfigOptionInts* bed_opt_1st_layer = config.option<ConfigOptionInts>(get_bed_temp_1st_layer_key(curr_bed_type));
if (bed_opt_1st_layer != nullptr)
ap.first_bed_temp = bed_opt_1st_layer->get_at(ap.extrude_ids.back());
ap.first_bed_temp = bed_opt_1st_layer->get_at(ap.extrude_ids.back()-1);
}
if (config.has("nozzle_temperature")) //get the print temperature
+11 -1
View File
@@ -715,6 +715,15 @@ void PerimeterGenerator::process()
++ irun;
}
#endif
// SoftFever: don't filter out tiny gap fills for first and top layer. So that the print looks better :)
if (this->layer_id != 0 && this->upper_slices != nullptr)
{
polylines.erase(std::remove_if(polylines.begin(), polylines.end(),
[&](const ThickPolyline& p) {
return p.length() < scale_(config->filter_out_gap_fill.value);
}), polylines.end());
}
if (! polylines.empty()) {
ExtrusionEntityCollection gap_fill;
@@ -728,7 +737,8 @@ void PerimeterGenerator::process()
//FIXME Vojtech: This grows by a rounded extrusion width, not by line spacing,
// therefore it may cover the area, but no the volume.
last = diff_ex(last, gap_fill.polygons_covered_by_width(10.f));
this->gap_fill->append(std::move(gap_fill.entities));
this->gap_fill->append(std::move(gap_fill.entities));
}
}
+6 -5
View File
@@ -346,6 +346,7 @@ void Preset::normalize(DynamicPrintConfig &config)
}
}
handle_legacy_sla(config);
}
@@ -695,9 +696,9 @@ static std::vector<std::string> s_Preset_print_options {
#ifdef HAS_PRESSURE_EQUALIZER
"max_volumetric_extrusion_rate_slope_positive", "max_volumetric_extrusion_rate_slope_negative",
#endif /* HAS_PRESSURE_EQUALIZER */
"inner_wall_speed", "outer_wall_speed", "sparse_infill_speed", "internal_solid_infill_speed",
"inner_wall_speed", "outer_wall_speed", "small_perimeter_speed", "small_perimeter_threshold", "sparse_infill_speed", "internal_solid_infill_speed",
"top_surface_speed", "support_speed", "support_object_xy_distance", "support_interface_speed",
"bridge_speed", "bridge_angle", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed",
"bridge_speed", "bridge_angle", "filter_out_gap_fill", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed",
"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "travel_acceleration", "skirt_loops", "skirt_distance", "skirt_height", "draft_shield",
"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk",
"brim_width", "brim_object_gap", "brim_type", "enable_support", "support_type", "support_threshold_angle", "enforce_support_layers",
@@ -763,7 +764,7 @@ static std::vector<std::string> s_Preset_printer_options {
"printer_technology",
"printable_area", "bed_exclude_area", "gcode_flavor","z_lift_type",
"single_extruder_multi_material", "machine_start_gcode", "machine_end_gcode", "before_layer_change_gcode", "layer_change_gcode", "change_filament_gcode",
"printer_model", "printer_variant", "printable_height", "extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod",
"printer_model", "printer_variant", "printable_height", "extruder_clearance_radius", "extruder_clearance_max_radius","extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod",
"default_print_profile", "inherits",
"silent_mode",
// BBS
@@ -774,7 +775,7 @@ static std::vector<std::string> s_Preset_printer_options {
"printhost_cafile","printhost_port","printhost_authorization_type",
"printhost_user",
"printhost_password",
"printhost_ssl_ignore_revoke"
"printhost_ssl_ignore_revoke", "thumbnails"
};
static std::vector<std::string> s_Preset_sla_print_options {
@@ -2269,7 +2270,7 @@ inline t_config_option_keys deep_diff(const ConfigBase &config_this, const Confi
if (this_opt != nullptr && other_opt != nullptr && *this_opt != *other_opt)
{
//BBS: add bed_exclude_area
if (opt_key == "printable_area" || opt_key == "bed_exclude_area" || opt_key == "compatible_prints" || opt_key == "compatible_printers") {
if (opt_key == "printable_area" || opt_key == "bed_exclude_area" || opt_key == "compatible_prints" || opt_key == "compatible_printers" || opt_key == "thumbnails") {
// Scalar variable, or a vector variable, which is independent from number of extruders,
// thus the vector is presented to the user as a single input.
diff.emplace_back(opt_key);
+1 -3
View File
@@ -38,9 +38,7 @@ static std::vector<std::string> s_project_options {
"wipe_tower_y",
"wipe_tower_rotation_angle",
"curr_bed_type",
// #if !BBL_RELEASE_TO_PUBLIC
"flush_multiplier",
// #endif
};
//BBS: add BBL as default
@@ -90,7 +88,7 @@ PresetBundle::PresetBundle()
for (size_t i = 0; i < 1; ++i) {
// The following ugly switch is to avoid printers.preset(0) to return the edited instance, as the 0th default is the current one.
Preset &preset = this->printers.default_preset(i);
for (const char *key : {"printer_settings_id", "printer_model", "printer_variant"}) preset.config.optptr(key, true);
for (const char *key : {"printer_settings_id", "printer_model", "printer_variant", "thumbnails"}) preset.config.optptr(key, true);
//if (i == 0) {
preset.config.optptr("default_print_profile", true);
preset.config.option<ConfigOptionStrings>("default_filament_profile", true);
+106 -20
View File
@@ -82,6 +82,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"extruder_clearance_height_to_rod",
"extruder_clearance_height_to_lid",
"extruder_clearance_radius",
"extruder_clearance_max_radius",
"extruder_colour",
"extruder_offset",
"filament_flow_ratio",
@@ -134,7 +135,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"wipe_distance",
"curr_bed_type",
"nozzle_volume",
"chamber_temperature"
"chamber_temperature",
"thumbnails"
};
static std::unordered_set<std::string> steps_ignore;
@@ -397,6 +399,9 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
const PrintInstance *print_instance;
BoundingBox bounding_box;
Polygon hull_polygon;
int index;
double arrange_score;
double height;
};
std::vector<struct print_instance_info> print_instance_with_bounding_box;
{
@@ -474,6 +479,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
}
}
struct print_instance_info print_info {&instance, convex_hull.bounding_box(), convex_hull};
print_info.height = instance.print_object->height();
print_instance_with_bounding_box.push_back(std::move(print_info));
convex_hulls_other.emplace_back(std::move(convex_hull));
}
@@ -488,22 +494,104 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
}
}
//sort the print instance
// calc sort order
double hc1 = scale_(print.config().extruder_clearance_height_to_lid); // height to lid
double hc2 = scale_(print.config().extruder_clearance_height_to_rod); // height to rod
double printable_height = scale_(print.config().printable_height);
auto bed_points = get_bed_shape(print_config);
float bed_width = bed_points[1].x() - bed_points[0].x();
// 如果扩大以后的多边形的距离小于这个值,就需要严格保证从左到右的打印顺序,否则会撞工具头右侧
float unsafe_dist = scale_(print_config.extruder_clearance_max_radius.value - print_config.extruder_clearance_radius.value);
struct VecHash
{
size_t operator()(const Vec2i &n1) const
{
return std::hash<coord_t>()(int(n1(0) * 100 + 100)) + std::hash<coord_t>()(int(n1(1) * 100 + 100)) * 101;
}
};
std::unordered_set<Vec2i, VecHash> left_right_pair; // pairs in this vector must strictly obey the left-right order
for (size_t i = 0; i < print_instance_with_bounding_box.size();i++) {
auto &inst = print_instance_with_bounding_box[i];
inst.index = i;
Point pt = inst.bounding_box.center();
inst.arrange_score = pt.x() / 2 + pt.y(); // we prefer print row-by-row, so cost on x-direction is smaller
}
for (size_t i = 0; i < print_instance_with_bounding_box.size(); i++) {
auto &inst = print_instance_with_bounding_box[i];
auto &l = print_instance_with_bounding_box[i];
for (size_t j = 0; j < print_instance_with_bounding_box.size(); j++) {
if (j != i) {
auto &r = print_instance_with_bounding_box[j];
auto ly1 = l.bounding_box.min.y();
auto ly2 = l.bounding_box.max.y();
auto ry1 = r.bounding_box.min.y();
auto ry2 = r.bounding_box.max.y();
auto lx1 = l.bounding_box.min.x();
auto rx1 = r.bounding_box.min.x();
auto lx2 = l.bounding_box.max.x();
auto rx2 = r.bounding_box.max.x();
auto inter_min = std::max(ly1, ry1);
auto inter_max = std::min(ly2, ry2);
auto inter_y = inter_max - inter_min;
inter_min = std::max(lx1, rx1);
inter_max = std::min(lx2, rx2);
auto inter_x = inter_max - inter_min;
// 如果y方向的重合超过轮廓的膨胀量,说明两个物体在一行,应该先打左边的物体,即先比较二者的x坐标。
if (inter_y > scale_(1)) {
if (std::max(rx1 - lx2, lx1 - rx2) < unsafe_dist) {
if (lx1 > rx1) {
left_right_pair.insert({j, i});
BOOST_LOG_TRIVIAL(debug) << "in-a-row, print_instance " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")"
<< " -> " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")";
} else {
left_right_pair.insert({i, j});
BOOST_LOG_TRIVIAL(debug) << "in-a-row, print_instance " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")"
<< " -> " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")";
}
}
}
if (l.height > hc1 && r.height < hc1) {
// 当前物体超过了顶盖高度,必须后打
left_right_pair.insert({j, i});
BOOST_LOG_TRIVIAL(debug) << "height>hc1, print_instance " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")"
<< " -> " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")";
}
else if (l.height > hc2 && l.height > r.height && l.arrange_score<r.arrange_score) {
// 如果当前物体的高度超过滑杆,且比r高,就给它加一点代价,尽量让高的物体后打(只有物体高度超过滑杆时才有必要按高度来)
l.arrange_score = std::max(l.arrange_score, r.arrange_score + bed_width/2);
BOOST_LOG_TRIVIAL(debug) << "height>hc2, print_instance " << inst.print_instance->model_instance->get_object()->name
<< ", right=" << r.print_instance->model_instance->get_object()->name << ", l.score: " << l.arrange_score
<< ", r.score: " << r.arrange_score;
}
}
}
}
BOOST_LOG_TRIVIAL(debug) << "bed width: " << bed_width << ", unsafe_dist:" << unsafe_dist;
// 多做几次代价传播,因为前一次有些值没有更新。
// TODO 更好的办法是建立一颗树,一步到位。不过我暂时没精力搞,先就这样吧
for (int k=0;k<5;k++)
for (auto p : left_right_pair) {
auto &l = print_instance_with_bounding_box[p(0)];
auto &r = print_instance_with_bounding_box[p(1)];
if(r.arrange_score<l.arrange_score)
r.arrange_score = l.arrange_score + bed_width/2;
}
for (auto p : left_right_pair) {
auto &l = print_instance_with_bounding_box[p(0)];
auto &r = print_instance_with_bounding_box[p(1)];
BOOST_LOG_TRIVIAL(debug) << "print_instance " << l.print_instance->model_instance->get_object()->name << "(" << l.arrange_score << ")"
<< " -> " << r.print_instance->model_instance->get_object()->name << "(" << r.arrange_score << ")";
}
// sort the print instance
std::sort(print_instance_with_bounding_box.begin(), print_instance_with_bounding_box.end(),
[](auto &l, auto &r) {
auto ly1 = l.bounding_box.min.y();
auto ly2 = l.bounding_box.max.y();
auto ry1 = r.bounding_box.min.y();
auto ry2 = r.bounding_box.max.y();
auto inter_min = std::max(ly1, ry1);
auto inter_max = std::min(ly2, ry2);
auto lx = l.bounding_box.min.x();
auto rx = r.bounding_box.min.x();
if (inter_max - inter_min > 0)
return (lx < rx) || ((lx == rx) && (ly1 < ry1));
else
return (ly1 < ry1);
});
[](print_instance_info& l, print_instance_info& r) {return l.arrange_score < r.arrange_score;});
for (auto &inst : print_instance_with_bounding_box)
BOOST_LOG_TRIVIAL(debug) << "after sorting print_instance " << inst.print_instance->model_instance->get_object()->name << ", score: " << inst.arrange_score
<< ", height:"<< inst.height;
// sequential_print_vertical_clearance_valid
{
@@ -534,9 +622,6 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
break;
}*/
double hc1 = scale_(print.config().extruder_clearance_height_to_lid);
double hc2 = scale_(print.config().extruder_clearance_height_to_rod);
double printable_height = scale_(print.config().printable_height);
// if objects are not overlapped on y-axis, they will not collide even if they are taller than extruder_clearance_height_to_rod
int print_instance_count = print_instance_with_bounding_box.size();
@@ -544,7 +629,8 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
for (int k = 0; k < print_instance_count; k++)
{
auto inst = print_instance_with_bounding_box[k].print_instance;
auto bbox = print_instance_with_bounding_box[k].bounding_box;
// 只需要考虑喷嘴到滑杆的偏移量,这个比整个工具头的碰撞半径要小得多
auto bbox = print_instance_with_bounding_box[k].bounding_box.inflated(-scale_(0.5 * print.config().extruder_clearance_radius.value));
auto iy1 = bbox.min.y();
auto iy2 = bbox.max.y();
(const_cast<ModelInstance*>(inst->model_instance))->arrange_order = k+1;
+8 -1
View File
@@ -728,7 +728,11 @@ public:
// Return 4 wipe tower corners in the world coordinates (shifted and rotated), including the wipe tower brim.
std::vector<Point> first_layer_wipe_tower_corners(bool check_wipe_tower_existance=true) const;
protected:
//SoftFever
bool &is_BBL_printer() { return m_isBBLPrinter; }
const bool is_BBL_printer() const { return m_isBBLPrinter; }
protected:
// Invalidates the step, and its depending steps in Print.
bool invalidate_step(PrintStep step);
@@ -750,6 +754,9 @@ private:
PrintRegionConfig m_default_region_config;
PrintObjectPtrs m_objects;
PrintRegionPtrs m_print_regions;
//SoftFever
bool m_isBBLPrinter;
// Ordered collections of extrusion paths to build skirt loops and brim.
ExtrusionEntityCollection m_skirt;
+90 -48
View File
@@ -98,6 +98,7 @@ static t_config_enum_values s_keys_map_GCodeFlavor {
{ "makerware", gcfMakerWare },
{ "marlin2", gcfMarlinFirmware },
{ "sailfish", gcfSailfish },
{ "klipper", gcfKlipper },
{ "smoothie", gcfSmoothie },
{ "mach3", gcfMach3 },
{ "machinekit", gcfMachinekit },
@@ -969,6 +970,27 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(60));
def = this->add("small_perimeter_speed", coFloatOrPercent);
def->label = L("Small perimeters");
def->category = L("Speed");
def->tooltip = L("This separate setting will affect the speed of perimeters having radius <= 6.5mm "
"(usually holes). If expressed as percentage (for example: 80%) it will be calculated "
"on the outer wall speed setting above. Set to zero for auto.");
def->sidetext = L("mm/s or %");
def->ratio_over = "outer_wall_speed";
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("small_perimeter_threshold", coFloat);
def->label = L("Small perimeters threshold");
def->category = L("Speed");
def->tooltip = L("This sets the threshold for small perimeter length. Default threshold is 6.5mm");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(6.5));
def = this->add("wall_infill_order", coEnum);
def->label = L("Order of inner wall/outer wall/infil");
def->category = L("Quality");
@@ -998,12 +1020,12 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("3");
def->enum_labels.push_back("4");
def->enum_labels.push_back("5");
def->mode = comDevelop;
def->mode = comAdvanced;
def = this->add("extruder_clearance_height_to_rod", coFloat);
def->label = L("Height to rod");
def->tooltip = L("Distance of the nozzle tip to the lower rod. "
"Used as input of auto-arranging to avoid collision when printing by object");
"Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
@@ -1013,7 +1035,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_clearance_height_to_lid", coFloat);
def->label = L("Height to lid");
def->tooltip = L("Distance of the nozzle tip to the lid. "
"Used as input of auto-arranging to avoid collision when printing by object");
"Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
@@ -1021,18 +1043,26 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_clearance_radius", coFloat);
def->label = L("Radius");
def->tooltip = L("Clearance radius around extruder. Used as input of auto-arranging to avoid collision when printing by object");
def->tooltip = L("Clearance radius around extruder. Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(40));
def = this->add("extruder_clearance_max_radius", coFloat);
def->label = L("Max Radius");
def->tooltip = L("Max clearance radius around extruder. Used for collision avoidance in by-object printing.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(68));
def = this->add("extruder_colour", coStrings);
def->label = L("Extruder Color");
def->tooltip = L("Only used as a visual help on UI");
def->gui_type = ConfigOptionDef::GUIType::color;
// Empty string means no color assigned yet.
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionStrings { "" });
def = this->add("extruder_offset", coPoints);
@@ -1042,7 +1072,7 @@ void PrintConfigDef::init_fff_params()
// "with respect to the first one. It expects positive coordinates (they will be subtracted "
// "from the XY coordinate).");
def->sidetext = L("mm");
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPoints { Vec2d(0,0) });
def = this->add("filament_flow_ratio", coFloats);
@@ -1055,10 +1085,10 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats { 1. });
def = this->add("enable_pressure_advance", coBool);
def = this->add("enable_pressure_advance", coBools);
def->label = L("Enable pressure advance");
def->tooltip = L("Enable pressure advance, auto calibration result will be overwriten once enabled.");
def->set_default_value(new ConfigOptionBool(false));
def->set_default_value(new ConfigOptionBools{ false });
def = this->add("pressure_advance", coFloats);
def->label = L("Pressure advance");
@@ -1083,7 +1113,7 @@ void PrintConfigDef::init_fff_params()
"at minimum speed to reduce the frequency of starting and stoping");
def->set_default_value(new ConfigOptionBools { false });
def = this->add("fan_cooling_layer_time", coInts);
def = this->add("fan_cooling_layer_time", coFloats);
def->label = L("Layer time");
def->tooltip = L("Part cooling fan will be enabled for layers of which estimated time is shorter than this value. "
"Fan speed is interpolated between the minimum and maximum fan speeds according to layer printing time");
@@ -1091,13 +1121,13 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->max = 1000;
def->mode = comSimple;
def->set_default_value(new ConfigOptionInts { 60 });
def->set_default_value(new ConfigOptionFloats{ 60.0f });
def = this->add("filament_colour", coStrings);
def->label = L("Color");
def->tooltip = L("Only used as a visual help on UI");
def->gui_type = ConfigOptionDef::GUIType::color;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionStrings{ "#00AE42" });
def = this->add("filament_max_volumetric_speed", coFloats);
@@ -1112,13 +1142,13 @@ void PrintConfigDef::init_fff_params()
def = this->add("filament_minimal_purge_on_wipe_tower", coFloats);
def->label = L("Minimal purge on wipe tower");
//def->tooltip = L("After a tool change, the exact position of the newly loaded filament inside "
// "the nozzle may not be known, and the filament pressure is likely not yet stable. "
// "Before purging the print head into an infill or a sacrificial object, Slic3r will always prime "
// "this amount of material into the wipe tower to produce successive infill or sacrificial object extrusions reliably.");
def->tooltip = L("After a tool change, the exact position of the newly loaded filament inside "
"the nozzle may not be known, and the filament pressure is likely not yet stable. "
"Before purging the print head into an infill or a sacrificial object, Slic3r will always prime "
"this amount of material into the wipe tower to produce successive infill or sacrificial object extrusions reliably.");
def->sidetext = L("mm³");
def->min = 0;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats { 15. });
def = this->add("machine_load_filament_time", coFloat);
@@ -1455,7 +1485,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("The width within which to jitter. It's adversed to be below outer wall line width");
def->sidetext = L("mm");
def->min = 0;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.3));
def = this->add("fuzzy_skin_point_distance", coFloat);
@@ -1463,9 +1493,16 @@ void PrintConfigDef::init_fff_params()
def->category = L("Others");
def->tooltip = L("The average diatance between the random points introducded on each line segment");
def->sidetext = L("mm");
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.8));
def = this->add("filter_out_gap_fill", coFloat);
def->label = L("Filter out tiny gaps");
def->category = L("Layers and Perimeters");
def->tooltip = L("Filter out gaps smaller than the threshold specified. This setting won't affact top/bottom layers");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("gap_infill_speed", coFloat);
def->label = L("Gap infill");
def->category = L("Speed");
@@ -1515,13 +1552,13 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Hardened steel"));
def->enum_labels.push_back(L("Stainless steel"));
def->enum_labels.push_back(L("Brass"));
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<NozzleType>(ntUndefine));
def = this->add("auxiliary_fan", coBool);
def->label = L("Auxiliary part cooling fan");
def->tooltip = L("Enable this option if machine has auxiliary part cooling fan");
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("gcode_flavor", coEnum);
@@ -1529,7 +1566,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("What kind of gcode the printer is compatible with");
def->enum_keys_map = &ConfigOptionEnum<GCodeFlavor>::get_enum_values();
def->enum_values.push_back("marlin");
//def->enum_values.push_back("reprap");
def->enum_values.push_back("klipper");
//def->enum_values.push_back("reprapfirmware");
//def->enum_values.push_back("repetier");
//def->enum_values.push_back("teacup");
@@ -1618,13 +1655,13 @@ void PrintConfigDef::init_fff_params()
def->cli = ConfigOptionDef::nocli;
def = this->add("interface_shells", coBool);
//def->label = L("Interface shells");
def->label = L("Interface shells");
def->label = "Interface shells";
//def->tooltip = L("Force the generation of solid shells between adjacent materials/volumes. "
// "Useful for multi-extruder prints with translucent materials or manual soluble "
// "support material");
def->tooltip = L("Force the generation of solid shells between adjacent materials/volumes. "
"Useful for multi-extruder prints with translucent materials or manual soluble "
"support material");
def->category = L("Quality");
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("ironing_type", coEnum);
@@ -1951,7 +1988,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Nozzle volume");
def->tooltip = L("Volume of nozzle between the cutter and the end of nozzle");
def->sidetext = L("mm³");
def->mode = comDevelop;
def->mode = comAdvanced;
def->readonly = true;
def->set_default_value(new ConfigOptionFloat { 0.0 });
@@ -2055,7 +2092,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Z gap between object and raft. Ignored for soluble interface");
def->sidetext = L("mm");
def->min = 0;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0.1));
def = this->add("raft_expansion", coFloat);
@@ -2064,7 +2101,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Expand all raft layers in XY plane");
def->sidetext = L("mm");
def->min = 0;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(1.5));
def = this->add("raft_first_layer_density", coPercent);
@@ -2074,7 +2111,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 10;
def->max = 100;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercent(90));
def = this->add("raft_first_layer_expansion", coFloat);
@@ -2083,7 +2120,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Expand the first raft or support layer to improve bed plate adhesion");
def->sidetext = L("mm");
def->min = 0;
def->mode = comDevelop;
def->mode = comAdvanced;
//BBS: change from 3.0 to 2.0
def->set_default_value(new ConfigOptionFloat(2.0));
@@ -2095,7 +2132,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("layers");
def->min = 0;
def->max = 100;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("resolution", coFloat);
@@ -2118,7 +2155,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Retract amount before wipe");
def->tooltip = L("The length of fast retraction before wipe, relative to retraction length");
def->sidetext = L("%");
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercents { 100 });
def = this->add("retract_when_changing_layer", coBools);
@@ -2157,21 +2194,21 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloats { 0.4 });
def = this->add("retract_restart_extra", coFloats);
//def->label = L("Extra length on restart");
def->label = L("Extra length on restart");
def->label = "Extra length on restart";
//def->tooltip = L("When the retraction is compensated after the travel move, the extruder will push "
// "this additional amount of filament. This setting is rarely needed.");
def->tooltip = L("When the retraction is compensated after the travel move, the extruder will push "
"this additional amount of filament. This setting is rarely needed.");
def->sidetext = L("mm");
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats { 0. });
def = this->add("retract_restart_extra_toolchange", coFloats);
//def->label = L("Extra length on restart");
def->label = L("Extra length on restart");
def->label = "Extra length on restart";
//def->tooltip = L("When the retraction is compensated after changing tool, the extruder will push "
// "this additional amount of filament.");
def->tooltip = L("When the retraction is compensated after changing tool, the extruder will push "
"this additional amount of filament.");
def->sidetext = L("mm");
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats { 0. });
def = this->add("retraction_speed", coFloats);
@@ -2250,7 +2287,7 @@ void PrintConfigDef::init_fff_params()
def->mode = comSimple;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("slow_down_layer_time", coInts);
def = this->add("slow_down_layer_time", coFloats);
def->label = L("Layer time");
def->tooltip = L("The printing speed in exported gcode will be slowed down, when the estimated layer time is shorter than this value, to "
"get better cooling for these layers");
@@ -2258,7 +2295,7 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->max = 1000;
def->mode = comSimple;
def->set_default_value(new ConfigOptionInts { 5 });
def->set_default_value(new ConfigOptionFloats { 5.0f });
def = this->add("minimum_sparse_infill_area", coFloat);
def->label = L("Minimum sparse infill threshold");
@@ -2422,7 +2459,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°");
def->min = 0;
def->max = 359;
def->mode = comDevelop;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("support_on_build_plate_only", coBool);
@@ -2876,7 +2913,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Flush multiplier");
def->tooltip = L("");
def->sidetext = L("");
def->mode = comDevelop;
def->mode = comAdvanced;
def->min = 0;
def->set_default_value(new ConfigOptionFloat(1.0));
@@ -2977,6 +3014,13 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("thumbnails", coPoints);
def->label = L("G-code thumbnails");
def->tooltip = L("Picture sizes to be stored into a .gcode and .sl1 / .sl1s files, in the following format: \"XxY, XxY, ...\"");
def->mode = comAdvanced;
def->gui_type = ConfigOptionDef::GUIType::one_string;
def->set_default_value(new ConfigOptionPoints{Vec2d(300, 300)});
// Declare retract values for filament profile, overriding the printer's extruder profile.
for (const char *opt_key : {
// floats
@@ -2998,8 +3042,6 @@ void PrintConfigDef::init_fff_params()
if ((strcmp(opt_key, "retraction_length") == 0) ||
(strcmp(opt_key, "z_hop") == 0))
def->mode = comSimple;
else if (strcmp(opt_key, "retract_before_wipe") == 0)
def->mode = comDevelop;
else
def->mode = comAdvanced;
switch (def->type) {
@@ -3776,7 +3818,7 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
// BBS
, "support_sharp_tails","remove_small_overhangs", "support_with_sheath",
"tree_support_branch_diameter_angle", "tree_support_collision_resolution",
"small_perimeter_speed", "max_volumetric_speed", "max_print_speed",
"max_volumetric_speed", "max_print_speed",
"support_bottom_z_distance", "support_closing_radius", "slicing_mode",
"remove_freq_sweep", "remove_bed_leveling", "remove_extrusion_calibration",
"support_transition_line_width", "support_transition_speed", "bed_temperature", "bed_temperature_initial_layer",
+17 -7
View File
@@ -32,8 +32,8 @@
namespace Slic3r {
enum GCodeFlavor : unsigned char {
gcfMarlinLegacy, gcfRepRapSprinter, gcfRepRapFirmware, gcfRepetier, gcfTeacup, gcfMakerWare, gcfMarlinFirmware, gcfSailfish, gcfMach3, gcfMachinekit,
gcfSmoothie, gcfNoExtrusion,
gcfMarlinLegacy, gcfKlipper, gcfRepRapSprinter, gcfRepRapFirmware, gcfRepetier, gcfTeacup, gcfMakerWare, gcfMarlinFirmware, gcfSailfish, gcfMach3, gcfMachinekit,
gcfSmoothie, gcfNoExtrusion
};
enum class FuzzySkinType {
@@ -671,12 +671,15 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionEnum<InfillPattern>, bottom_surface_pattern))
((ConfigOptionFloat, outer_wall_line_width))
((ConfigOptionFloat, outer_wall_speed))
((ConfigOptionFloatOrPercent, small_perimeter_speed))
((ConfigOptionFloat, small_perimeter_threshold))
((ConfigOptionFloat, infill_direction))
((ConfigOptionPercent, sparse_infill_density))
((ConfigOptionEnum<InfillPattern>, sparse_infill_pattern))
((ConfigOptionEnum<FuzzySkinType>, fuzzy_skin))
((ConfigOptionFloat, fuzzy_skin_thickness))
((ConfigOptionFloat, fuzzy_skin_point_distance))
((ConfigOptionFloat, filter_out_gap_fill))
((ConfigOptionFloat, gap_infill_speed))
((ConfigOptionInt, sparse_infill_filament))
((ConfigOptionFloat, sparse_infill_line_width))
@@ -757,7 +760,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionString, machine_end_gcode))
((ConfigOptionStrings, filament_end_gcode))
((ConfigOptionFloats, filament_flow_ratio))
((ConfigOptionBool, enable_pressure_advance))
((ConfigOptionBools, enable_pressure_advance))
((ConfigOptionFloats, pressure_advance))
((ConfigOptionFloats, filament_diameter))
((ConfigOptionFloats, filament_density))
@@ -802,6 +805,7 @@ PRINT_CONFIG_CLASS_DEFINE(
//BBS
((ConfigOptionEnum<NozzleType>, nozzle_type))
((ConfigOptionBool, auxiliary_fan))
)
// This object is mapped to Perl as Slic3r::Config::Print.
@@ -837,10 +841,11 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionFloat, extruder_clearance_height_to_rod))//BBs
((ConfigOptionFloat, extruder_clearance_height_to_lid))//BBS
((ConfigOptionFloat, extruder_clearance_radius))
((ConfigOptionFloat, extruder_clearance_max_radius))
((ConfigOptionStrings, extruder_colour))
((ConfigOptionPoints, extruder_offset))
((ConfigOptionBools, reduce_fan_stop_start_freq))
((ConfigOptionInts, fan_cooling_layer_time))
((ConfigOptionFloats, fan_cooling_layer_time))
((ConfigOptionStrings, filament_colour))
((ConfigOptionFloat, outer_wall_acceleration))
((ConfigOptionFloat, inner_wall_acceleration))
@@ -879,7 +884,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionFloat, skirt_distance))
((ConfigOptionInt, skirt_height))
((ConfigOptionInt, skirt_loops))
((ConfigOptionInts, slow_down_layer_time))
((ConfigOptionFloats, slow_down_layer_time))
((ConfigOptionBool, spiral_mode))
((ConfigOptionInt, standby_temperature_delta))
((ConfigOptionInts, nozzle_temperature))
@@ -911,7 +916,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionBool, has_prime_tower))
((ConfigOptionFloat, nozzle_volume))
((ConfigOptionEnum<TimelapseType>, timelapse_type))
((ConfigOptionPoints, thumbnails))
)
// This object is mapped to Perl as Slic3r::Config::Full.
@@ -1279,7 +1284,12 @@ public:
const ConfigOption* option(const t_config_option_key &opt_key) const { return m_data.option(opt_key); }
int opt_int(const t_config_option_key &opt_key) const { return m_data.opt_int(opt_key); }
int extruder() const { return opt_int("extruder"); }
double opt_float(const t_config_option_key &opt_key) const { return m_data.opt_float(opt_key); }
double opt_float(const t_config_option_key &opt_key) const {
return m_data.opt_float(opt_key);
}
double get_abs_value(const t_config_option_key &opt_key) const {
return m_data.get_abs_value(opt_key);
}
std::string opt_serialize(const t_config_option_key &opt_key) const { return m_data.opt_serialize(opt_key); }
// Return an optional timestamp of this object.
+8 -3
View File
@@ -656,6 +656,8 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "brim_type"
// BBS: brim generation depends on printing speed
|| opt_key == "outer_wall_speed"
|| opt_key == "small_perimeter_speed"
|| opt_key == "small_perimeter_threshold"
|| opt_key == "sparse_infill_speed"
|| opt_key == "inner_wall_speed"
|| opt_key == "support_speed"
@@ -671,7 +673,8 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "inner_wall_line_width"
|| opt_key == "infill_wall_overlap") {
steps.emplace_back(posPerimeters);
} else if (opt_key == "gap_infill_speed") {
} else if (opt_key == "gap_infill_speed"
|| opt_key == "filter_out_gap_fill" ) {
// Return true if gap-fill speed has changed from zero value to non-zero or from non-zero value to zero.
auto is_gap_fill_changed_state_due_to_speed = [&opt_key, &old_config, &new_config]() -> bool {
if (opt_key == "gap_infill_speed") {
@@ -685,9 +688,9 @@ bool PrintObject::invalidate_state_by_config_options(
};
// Filtering of unprintable regions in multi-material segmentation depends on if gap-fill is enabled or not.
// So step posSlice is invalidated when gap-fill was enabled/disabled by option "gap_fill_enabled" or by
// So step posSlice is invalidated when gap-fill was enabled/disabled by option "filter_out_gap_fill" or by
// changing "gap_infill_speed" to force recomputation of the multi-material segmentation.
if (this->is_mm_painted() && (opt_key == "gap_infill_speed" && is_gap_fill_changed_state_due_to_speed()))
if (this->is_mm_painted() && (opt_key == "filter_out_gap_fill" && (opt_key == "gap_infill_speed" && is_gap_fill_changed_state_due_to_speed())))
steps.emplace_back(posSlice);
steps.emplace_back(posPerimeters);
} else if (
@@ -830,6 +833,8 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "overhang_4_4_speed"
|| opt_key == "bridge_speed"
|| opt_key == "outer_wall_speed"
|| opt_key == "small_perimeter_speed"
|| opt_key == "small_perimeter_threshold"
|| opt_key == "sparse_infill_speed"
|| opt_key == "inner_wall_speed"
|| opt_key == "internal_solid_infill_speed"
+1 -1
View File
@@ -66,7 +66,7 @@ static constexpr double SPARSE_INFILL_RESOLUTION = 0.04;
static constexpr double SUPPORT_RESOLUTION = 0.05;
#define SCALED_SUPPORT_RESOLUTION (SUPPORT_RESOLUTION / SCALING_FACTOR)
// Maximum perimeter length for the loop to apply the small perimeter speed.
#define SMALL_PERIMETER_LENGTH ((6.5 / SCALING_FACTOR) * 2 * PI)
#define SMALL_PERIMETER_LENGTH(LENGTH) (((LENGTH) / SCALING_FACTOR) * 2 * PI)
static constexpr double INSET_OVERLAP_TOLERANCE = 0.4;
// 3mm ring around the top / bottom / bridging areas.
//FIXME This is quite a lot.
+2
View File
@@ -235,6 +235,8 @@ set(SLIC3R_GUI_SOURCES
GUI/Monitor.hpp
GUI/WebViewDialog.cpp
GUI/WebViewDialog.hpp
GUI/PrinterWebView.cpp
GUI/PrinterWebView.hpp
GUI/WebDownPluginDlg.hpp
GUI/WebDownPluginDlg.cpp
GUI/WebGuideDialog.hpp
+1 -1
View File
@@ -245,7 +245,7 @@ AboutDialog::AboutDialog()
{
vesizer->Add(0, FromDIP(165), 1, wxEXPAND, FromDIP(5));
auto version_string = _L("SoftFever Version") + " " + std::string(SLIC3R_VERSION);
auto version_string = _L("SoftFever Version") + " " + std::string(SoftFever_VERSION);
wxStaticText* version = new wxStaticText(this, wxID_ANY, version_string.c_str(), wxDefaultPosition, wxDefaultSize);
wxFont version_font = GetFont();
#ifdef __WXMSW__
@@ -183,6 +183,13 @@ std::string BackgroundSlicingProcess::output_filepath_for_project(const boost::f
void BackgroundSlicingProcess::process_fff()
{
assert(m_print == m_fff_print);
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
m_fff_print->is_BBL_printer() =
preset_bundle.printers.get_edited_preset().is_bbl_vendor_preset(
&preset_bundle);
//BBS: add the logic to process from an existed gcode file
if (m_print->finished()) {
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: skip slicing, to process previous gcode file")%__LINE__;
+1 -1
View File
@@ -451,7 +451,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
bool have_perimeters = config->opt_int("wall_loops") > 0;
for (auto el : { "detect_thin_wall", "detect_overhang_wall",
"seam_position", "wall_infill_order", "outer_wall_line_width",
"inner_wall_speed", "outer_wall_speed" })
"inner_wall_speed", "outer_wall_speed", "small_perimeter_speed", "small_perimeter_threshold" })
toggle_field(el, have_perimeters);
bool have_infill = config->option<ConfigOptionPercent>("sparse_infill_density")->value > 0;
+1 -1
View File
@@ -2394,7 +2394,7 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
p->load_vendors();
//BBS: add bed exclude areas
p->custom_config.reset(DynamicPrintConfig::new_from_defaults_keys({
"gcode_flavor", "printable_area", "bed_exclude_area", "filament_diameter", "nozzle_temperature", /*"bed_temperature",*/
"gcode_flavor", "printable_area", "bed_exclude_area", "filament_diameter", "nozzle_temperature", "thumbnails"/*"bed_temperature",*/
}));
auto *vsizer = new wxBoxSizer(wxVERTICAL);
+2 -2
View File
@@ -31,8 +31,8 @@ namespace GUI {
DownloadProgressDialog::DownloadProgressDialog(wxString title)
: DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe), wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
{
wxString download_failed_url = wxT("https://wiki.bambulab.com/e/en/software/bambu-studio/failed-to-get-network-plugin");
wxString install_failed_url = wxT("https://wiki.bambulab.com/e/en/software/bambu-studio/failed-to-get-network-plugin");
wxString download_failed_url = wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-get-network-plugin");
wxString install_failed_url = wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-get-network-plugin");
wxString download_failed_msg = _L("Failed to download the plug-in. Please check your firewall settings and vpn software, check and retry.");
wxString install_failed_msg = _L("Failed to install the plug-in. Please check whether it is blocked or deleted by anti-virus software.");
+35 -28
View File
@@ -362,6 +362,7 @@ void GCodeViewer::SequentialView::Marker::render(int canvas_width, int canvas_he
std::string height = ImGui::ColorMarkerStart + _u8L("Height: ") + ImGui::ColorMarkerEnd;
std::string width = ImGui::ColorMarkerStart + _u8L("Width: ") + ImGui::ColorMarkerEnd;
std::string speed = ImGui::ColorMarkerStart + _u8L("Speed: ") + ImGui::ColorMarkerEnd;
std::string fan = ImGui::ColorMarkerStart + _u8L("Fan: ") + ImGui::ColorMarkerEnd;
std::string flow = ImGui::ColorMarkerStart + _u8L("Flow: ") + ImGui::ColorMarkerEnd;
const float item_size = imgui.calc_text_size("X: 000.000 ").x;
const float item_spacing = imgui.get_item_spacing().x;
@@ -411,27 +412,6 @@ void GCodeViewer::SequentialView::Marker::render(int canvas_width, int canvas_he
break;
}
case EViewType::Feedrate: {
sprintf(buf, "%s%.3f", x.c_str(), position.x() - plate->get_origin().x());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
ImGui::SameLine(window_padding + item_size + item_spacing);
sprintf(buf, "%s%.3f", y.c_str(), position.y() - plate->get_origin().y());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
sprintf(buf, "%s%.3f", z.c_str(), position.z());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
ImGui::SameLine(window_padding + item_size + item_spacing);
sprintf(buf, "%s%.2f", speed.c_str(), it->feedrate);
ImGui::PushItemWidth(item_size);
imgui.text(buf);
break;
}
case EViewType::VolumetricRate: {
sprintf(buf, "%s%.3f", x.c_str(), position.x() - plate->get_origin().x());
ImGui::PushItemWidth(item_size);
@@ -453,17 +433,46 @@ void GCodeViewer::SequentialView::Marker::render(int canvas_width, int canvas_he
break;
}
case EViewType::FanSpeed:
sprintf(buf, "%s%.3f", x.c_str(), position.x() - plate->get_origin().x());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
ImGui::SameLine(window_padding + item_size + item_spacing);
sprintf(buf, "%s%.3f", y.c_str(), position.y() - plate->get_origin().y());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
sprintf(buf, "%s%.3f", z.c_str(), position.z());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
ImGui::SameLine(window_padding + item_size + item_spacing);
sprintf(buf, "%s%d", fan.c_str(), int(it->fan_speed + 0.5));
ImGui::PushItemWidth(item_size);
imgui.text(buf);
break;
case EViewType::Feedrate:
default:
sprintf(buf, "%s%.3f", x.c_str(), position.x() - plate->get_origin().x());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
ImGui::SameLine();
ImGui::SameLine(window_padding + item_size + item_spacing);
sprintf(buf, "%s%.3f", y.c_str(), position.y() - plate->get_origin().y());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
ImGui::SameLine();
sprintf(buf, "%s%.3f", z.c_str(), position.z());
ImGui::PushItemWidth(item_size);
imgui.text(buf);
ImGui::SameLine(window_padding + item_size + item_spacing);
sprintf(buf, "%s%.2f", speed.c_str(), it->feedrate);
ImGui::PushItemWidth(item_size);
imgui.text(buf);
}
// force extra frame to automatically update window size
@@ -901,11 +910,9 @@ void GCodeViewer::update_by_mode(ConfigOptionMode mode)
view_type_items.push_back(EViewType::Height);
view_type_items.push_back(EViewType::Width);
view_type_items.push_back(EViewType::VolumetricRate);
if (mode == ConfigOptionMode::comDevelop) {
view_type_items.push_back(EViewType::FanSpeed);
view_type_items.push_back(EViewType::Temperature);
view_type_items.push_back(EViewType::Tool);
}
view_type_items.push_back(EViewType::FanSpeed);
view_type_items.push_back(EViewType::Temperature);
view_type_items.push_back(EViewType::Tool);
for (int i = 0; i < view_type_items.size(); i++) {
view_type_items_str.push_back(get_view_type_string(view_type_items[i]));
+14 -3
View File
@@ -248,7 +248,8 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
return owner.model_instance_id == id;
});
if (it != owners.end())
it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(i + 1);
//it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(i + 1);
it->print_order = std::string((_(L("Sequence"))).ToUTF8()) + "#: " + std::to_string(sorted_instances[i]->arrange_order);
}
}
@@ -6032,10 +6033,20 @@ void GLCanvas3D::_render_overlays()
bool sequential_print = opt != nullptr && (opt->value == PrintSequence::ByObject);
std::vector<const ModelInstance*> sorted_instances;
if (sequential_print) {
for (ModelObject* model_object : m_model->objects)
const Print* print = fff_print();
if (print) {
for (const PrintObject *print_object : print->objects())
{
for (const PrintInstance &instance : print_object->instances())
{
sorted_instances.emplace_back(instance.model_instance);
}
}
}
/*for (ModelObject* model_object : m_model->objects)
for (ModelInstance* model_instance : model_object->instances) {
sorted_instances.emplace_back(model_instance);
}
}*/
}
m_labels.render(sorted_instances);
+1 -1
View File
@@ -197,7 +197,7 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
}
break;
case coPoints:{
if (opt_key == "printable_area" || opt_key == "bed_exclude_area") {
if (opt_key == "printable_area" || opt_key == "bed_exclude_area" || opt_key == "thumbnails") {
config.option<ConfigOptionPoints>(opt_key)->values = boost::any_cast<std::vector<Vec2d>>(value);
break;
}
+5 -1
View File
@@ -1333,7 +1333,7 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
menu->Destroy(item_id);
}
const int filaments_cnt = filaments_count();
int filaments_cnt = filaments_count();
if (filaments_cnt <= 1)
return;
@@ -1345,6 +1345,10 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
std::vector<wxBitmap*> icons = get_extruder_color_icons(true);
if (icons.size() < filaments_cnt) {
BOOST_LOG_TRIVIAL(warning) << boost::format("Warning: icons size %1%, filaments_cnt=%2%")%icons.size()%filaments_cnt;
if (icons.size() <= 1)
return;
else
filaments_cnt = icons.size();
}
wxMenu* extruder_selection_menu = new wxMenu();
const wxString& name = sels.Count() == 1 ? names[0] : names[1];
-1
View File
@@ -816,7 +816,6 @@ void AssembleView::reload_scene(bool refresh_immediately, bool force_full_scene_
m_canvas->render(true);
}
m_canvas->reload_scene(refresh_immediately, force_full_scene_refresh);
m_canvas->reload_scene(refresh_immediately, force_full_scene_refresh);
}
}
+3
View File
@@ -611,6 +611,9 @@ void ModelObjectsInfo::on_update()
if (!get_pool()->get_canvas()->get_model()->objects.empty()) {
m_model_objects = get_pool()->get_canvas()->get_model()->objects;
}
else {
m_model_objects.clear();
}
}
void ModelObjectsInfo::on_release()
+1 -1
View File
@@ -345,7 +345,7 @@ void GLGizmosManager::update(const Linef3& mouse_ray, const Point& mouse_pos)
void GLGizmosManager::update_assemble_view_data()
{
if (m_assemble_view_data) {
if (m_parent.get_canvas_type() != GLCanvas3D::CanvasAssembleView)
if (!wxGetApp().plater()->get_assmeble_canvas3D()->get_wxglcanvas()->IsShown())
m_assemble_view_data->update(AssembleViewDataID(0));
else
m_assemble_view_data->update(AssembleViewDataID((int)AssembleViewDataID::ModelObjectsInfo | (int)AssembleViewDataID::ModelObjectsClipper));
+15 -6
View File
@@ -503,6 +503,9 @@ void ArrangeJob::process()
if (params.is_seq_print)
params.min_obj_distance = std::max(params.min_obj_distance, scaled(params.cleareance_radius));
if (params.avoid_extrusion_cali_region && print.full_print_config().opt_bool("scan_first_layer"))
m_plater->get_partplate_list().preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
double skirt_distance = print.has_skirt() ? print.config().skirt_distance.value : 0;
double brim_max = 0;
std::for_each(m_selected.begin(), m_selected.end(), [&](ArrangePolygon ap) { brim_max = std::max(brim_max, ap.brim_width); });
@@ -514,21 +517,26 @@ void ArrangeJob::process()
params.bed_shrink_y = settings.bed_shrink_y + params.brim_skirt_distance;
// for sequential print, we need to inflate the bed because cleareance_radius is so large
if (params.is_seq_print) {
params.bed_shrink_x -= params.cleareance_radius/2;
params.bed_shrink_y -= params.cleareance_radius/2;
float shift_dist = params.cleareance_radius / 2 - 5;
params.bed_shrink_x -= shift_dist;
params.bed_shrink_y -= shift_dist;
// dont forget to move the excluded region
for (auto& region : m_unselected) {
if (region.is_virt_object)
region.poly.translate(-scaled(params.cleareance_radius/2), -scaled(params.cleareance_radius/2));
region.poly.translate(-scaled(shift_dist), -scaled(shift_dist));
}
}
// do not inflate brim_width. Objects are allowed to have overlapped brim.
std::for_each(m_selected.begin(), m_selected.end(), [&](auto& ap) {ap.inflation = params.min_obj_distance / 2; });
std::for_each(m_unselected.begin(), m_unselected.end(), [&](auto& ap) {ap.inflation = ap.is_virt_object ? scaled(params.brim_skirt_distance) : params.min_obj_distance / 2; });
// For occulusion regions, inflation should be larger to prevent genrating brim on them.
// However, extrusion cali regions are exceptional, since we can allow brim overlaps them.
std::for_each(m_unselected.begin(), m_unselected.end(), [&](auto &ap) {
ap.inflation = !ap.is_virt_object ?
params.min_obj_distance / 2 :
(ap.is_extrusion_cali_object ? scaled(params.cleareance_radius / 2) : scaled(params.brim_skirt_distance + params.cleareance_radius / 2));
});
if (params.avoid_extrusion_cali_region && print.full_print_config().opt_bool("scan_first_layer"))
m_plater->get_partplate_list().preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
m_plater->get_partplate_list().preprocess_exclude_areas(params.excluded_regions, 1);
@@ -567,6 +575,7 @@ void ArrangeJob::process()
<< ", bed_temp: " << selected.first_bed_temp << ", print_temp: " << selected.print_temp;
BOOST_LOG_TRIVIAL(debug) << "items unselected before arrange: ";
for (auto item : m_unselected)
if (!item.is_virt_object)
BOOST_LOG_TRIVIAL(debug) << item.name << ", extruder: " << item.extrude_ids.back() << ", bed: " << item.bed_idx << ", trans: " << item.translation.transpose();
}
+44
View File
@@ -73,6 +73,7 @@ wxDEFINE_EVENT(EVT_USER_LOGIN, wxCommandEvent);
// BBS: backup
wxDEFINE_EVENT(EVT_BACKUP_POST, wxCommandEvent);
wxDEFINE_EVENT(EVT_LOAD_URL, wxCommandEvent);
wxDEFINE_EVENT(EVT_LOAD_PRINTER_URL, wxCommandEvent);
enum class ERescaleTarget
{
@@ -934,6 +935,14 @@ void MainFrame::init_tabpanel()
m_monitor = new MonitorPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_tabpanel->AddPage(m_monitor, _L("Device"), std::string("tab_monitor_active"), std::string("tab_monitor_active"));
m_printer_view = new PrinterWebView(m_tabpanel);
Bind(EVT_LOAD_PRINTER_URL, [this](wxCommandEvent &evt) {
wxString url = evt.GetString();
//select_tab(MainFrame::tpMonitor);
m_printer_view->load_url(url);
});
m_printer_view->Hide();
m_auxiliary = new AuxiliaryPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_tabpanel->AddPage(m_auxiliary, _L("Project"), std::string("tab_auxiliary_avtice"), std::string("tab_auxiliary_avtice"));
@@ -951,6 +960,34 @@ void MainFrame::init_tabpanel()
}
}
// SoftFever
void MainFrame::show_device(bool bBBLPrinter) {
if (m_tabpanel->GetPage(3) != m_monitor &&
m_tabpanel->GetPage(3) != m_printer_view) {
BOOST_LOG_TRIVIAL(error) << "Failed to find device tab";
return;
}
if (bBBLPrinter) {
if (m_tabpanel->GetPage(3) != m_monitor) {
m_tabpanel->RemovePage(3);
m_tabpanel->InsertPage(3, m_monitor, _L("Device"),
std::string("tab_monitor_active"),
std::string("tab_monitor_active"));
}
} else {
if (m_tabpanel->GetPage(3) != m_printer_view) {
m_tabpanel->RemovePage(3);
m_tabpanel->InsertPage(3, m_printer_view, _L("Device"),
std::string("tab_monitor_active"),
std::string("tab_monitor_active"));
m_printer_view->Show();
}
}
}
#ifdef WIN32
void MainFrame::register_win32_callbacks()
{
@@ -2859,6 +2896,13 @@ void MainFrame::load_url(wxString url)
wxQueueEvent(this, evt);
}
void MainFrame::load_printer_url(wxString url)
{
BOOST_LOG_TRIVIAL(trace) << "load_printer_url:" << url;
auto evt = new wxCommandEvent(EVT_LOAD_PRINTER_URL, this->GetId());
evt->SetString(url);
wxQueueEvent(this, evt);
}
void MainFrame::refresh_plugin_tips()
{
if (m_webview != nullptr)
+7
View File
@@ -28,6 +28,8 @@
#include "BBLTopbar.hpp"
#include "PrinterWebView.hpp"
#define ENABEL_PRINT_ALL 0
class Notebook;
@@ -307,9 +309,13 @@ public:
//BBS
void load_url(wxString url);
void load_printer_url(wxString url);
void refresh_plugin_tips();
void RunScript(wxString js);
//SoftFever
void show_device(bool bBBLPrinter);
// BBS. Replace title bar and menu bar with top bar.
BBLTopbar* m_topbar{ nullptr };
PrintHostQueueDialog* printhost_queue_dlg() { return m_printhost_queue_dlg; }
@@ -318,6 +324,7 @@ public:
MonitorPanel* m_monitor{ nullptr };
AuxiliaryPanel* m_auxiliary{ nullptr };
WebViewPanel* m_webview { nullptr };
PrinterWebView* m_printer_view{nullptr};
wxLogWindow* m_log_window { nullptr };
// BBS
//wxBookCtrlBase* m_tabpanel { nullptr };
+13 -1
View File
@@ -670,7 +670,7 @@ void ConfigOptionsGroup::back_to_config_value(const DynamicPrintConfig& config,
else if (m_opt_map.find(opt_key) == m_opt_map.end() ||
// This option don't have corresponded field
opt_key == "printable_area" ||
opt_key == "compatible_printers" || opt_key == "compatible_prints" ) {
opt_key == "compatible_printers" || opt_key == "compatible_prints" || opt_key == "thumbnails" ) {
value = get_config_value(config, opt_key);
this->change_opt_value(opt_key, value);
return;
@@ -950,6 +950,14 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
case coInts:
ret = config.option<ConfigOptionIntsNullable>(opt_key)->get_at(idx);
break;
case coPoints:
if (opt_key == "bed_shape")
ret = config.option<ConfigOptionPoints>(opt_key)->values;
else if (opt_key == "thumbnails")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else
ret = config.option<ConfigOptionPoints>(opt_key)->get_at(idx);
break;
default:
break;
}
@@ -1026,6 +1034,8 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
if (opt_key == "printable_area")
ret = config.option<ConfigOptionPoints>(opt_key)->values;
else if (opt_key == "bed_exclude_area")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else if (opt_key == "thumbnails")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else
ret = config.option<ConfigOptionPoints>(opt_key)->get_at(idx);
@@ -1137,6 +1147,8 @@ boost::any ConfigOptionsGroup::get_config_value2(const DynamicPrintConfig& confi
ret = config.option<ConfigOptionPoints>(opt_key)->values;
else if (opt_key == "bed_exclude_area")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else if (opt_key == "thumbnails")
ret = get_thumbnails_string(config.option<ConfigOptionPoints>(opt_key)->values);
else
ret = config.option<ConfigOptionPoints>(opt_key)->get_at(idx);
break;
+1
View File
@@ -3461,6 +3461,7 @@ bool PartPlateList::preprocess_nonprefered_areas(arrangement::ArrangePolygons& r
ret.translation = Vec2crd(0, 0);
ret.rotation = 0.0f;
ret.is_virt_object = true;
ret.is_extrusion_cali_object = true;
ret.bed_idx = j;
ret.height = 1;
ret.name = "NonpreferedRegion" + std::to_string(index);
+40 -10
View File
@@ -654,9 +654,9 @@ Sidebar::Sidebar(Plater *parent)
std::vector<float> extruders = dlg.get_extruders();
(project_config.option<ConfigOptionFloats>("flush_volumes_matrix"))->values = std::vector<double>(matrix.begin(), matrix.end());
(project_config.option<ConfigOptionFloats>("flush_volumes_vector"))->values = std::vector<double>(extruders.begin(), extruders.end());
#if !BBL_RELEASE_TO_PUBLIC
// #if !BBL_RELEASE_TO_PUBLIC
(project_config.option<ConfigOptionFloat>("flush_multiplier"))->set(new ConfigOptionFloat(dlg.get_flush_multiplier()));
#endif
// #endif
wxGetApp().plater()->update_project_dirty_from_presets();
wxPostEvent(parent, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, parent));
@@ -911,17 +911,34 @@ void Sidebar::update_all_preset_comboboxes()
bool is_bbl_preset = preset_bundle.printers.get_edited_preset().is_bbl_vendor_preset(&preset_bundle);
auto p_mainframe = wxGetApp().mainframe;
p_mainframe->show_device(is_bbl_preset);
if (is_bbl_preset) {
//only show connection button for not-BBL printer
connection_btn->Hide();
//only show sync-ams button for BBL printer
ams_btn->Show();
//update print button default value for bbl or third-party printer
wxGetApp().mainframe->set_print_button_to_default(MainFrame::PrintSelectType::ePrintPlate);
p_mainframe->set_print_button_to_default(MainFrame::PrintSelectType::ePrintPlate);
m_bed_type_list->Enable();
} else {
connection_btn->Show();
ams_btn->Hide();
wxGetApp().mainframe->set_print_button_to_default(MainFrame::PrintSelectType::eSendGcode);
p_mainframe->set_print_button_to_default(MainFrame::PrintSelectType::eSendGcode);
wxString host_url = preset_bundle.printers.get_edited_preset().config.opt_string("print_host");
if(!host_url.empty())
{
if(!host_url.Lower().starts_with("http"))
host_url = wxString::Format("http://%s",host_url);
p_mainframe->load_printer_url(host_url);
}
m_bed_type_list->SelectAndNotify(btPEI);
m_bed_type_list->Disable();
}
// Update the print choosers to only contain the compatible presets, update the dirty flags.
@@ -938,6 +955,8 @@ void Sidebar::update_all_preset_comboboxes()
if (p->combo_printer)
p->combo_printer->update();
p_mainframe->m_tabpanel->SetSelection(p_mainframe->m_tabpanel->GetSelection());
}
void Sidebar::update_presets(Preset::Type preset_type)
@@ -2001,7 +2020,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
//BBS: add bed_exclude_area
, config(Slic3r::DynamicPrintConfig::new_from_defaults_keys({
"printable_area", "bed_exclude_area", "print_sequence",
"extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "skirt_loops", "skirt_distance",
"extruder_clearance_radius", "extruder_clearance_max_radius",
"extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "skirt_loops", "skirt_distance",
"brim_width", "brim_object_gap", "brim_type", "nozzle_diameter", "single_extruder_multi_material",
"enable_prime_tower", "wipe_tower_x", "wipe_tower_y", "prime_tower_width", "prime_tower_brim_width", "prime_volume",
"extruder_colour", "filament_colour", "material_colour", "printable_height", "printer_model", "printer_technology",
@@ -2492,7 +2512,12 @@ void Plater::setPrintSpeedTable(GlobalSpeedMap &printSpeedMap) {
if (printSpeedMap.supportSpeed > printSpeedMap.maxSpeed)
printSpeedMap.maxSpeed = printSpeedMap.supportSpeed;
}
if (config.has("small_perimeter_speed")) {
printSpeedMap.smallPerimeterSpeed = config.get_abs_value("small_perimeter_speed");
if (printSpeedMap.smallPerimeterSpeed > printSpeedMap.maxSpeed)
printSpeedMap.maxSpeed = printSpeedMap.smallPerimeterSpeed;
}
/* "inner_wall_speed", "outer_wall_speed", "sparse_infill_speed", "internal_solid_infill_speed",
"top_surface_speed", "support_speed", "support_object_xy_distance", "support_interface_speed",
"bridge_speed", "gap_infill_speed", "travel_speed", "initial_layer_speed"*/
@@ -4195,7 +4220,7 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0)
return;
show_warning_dialog = true;
show_warning_dialog = false;
if (! output_path.empty()) {
background_process.schedule_export(output_path.string(), output_path_on_removable_media);
notification_manager->push_delayed_notification(NotificationType::ExportOngoing, []() {return true; }, 1000, 0);
@@ -4227,7 +4252,7 @@ void Plater::priv::export_gcode(fs::path output_path, bool output_path_on_remova
if ((state & priv::UPDATE_BACKGROUND_PROCESS_INVALID) != 0)
return;
show_warning_dialog = true;
show_warning_dialog = false;
if (! output_path.empty()) {
background_process.schedule_export(output_path.string(), output_path_on_removable_media);
notification_manager->push_delayed_notification(NotificationType::ExportOngoing, []() {return true; }, 1000, 0);
@@ -7200,7 +7225,7 @@ void Plater::add_model(bool imperial_units/* = false*/)
if (!load_files(paths, strategy, ask_multi).empty()) {
if (get_project_name() == _L("Untitled") && paths.size() > 0) {
p->set_project_filename(wxString(paths[0].string()));
p->set_project_filename(wxString::FromUTF8(paths[0].string()));
}
wxGetApp().mainframe->update_title();
@@ -8333,7 +8358,7 @@ void Plater::export_gcode(bool prefer_removable)
unsigned int state = this->p->update_restart_background_process(false, false);
if (state & priv::UPDATE_BACKGROUND_PROCESS_INVALID)
return;
default_output_file = this->p->background_process.output_filepath_for_project(into_path(get_project_filename(".3mf")));
default_output_file = this->p->background_process.output_filepath_for_project("");
} catch (const Slic3r::PlaceholderParserError &ex) {
// Show the error with monospaced font.
show_error(this, ex.what(), true);
@@ -9057,7 +9082,7 @@ void Plater::send_gcode_legacy(int plate_idx, Export3mfProgressFn proFn, bool up
unsigned int state = this->p->update_restart_background_process(false, false);
if (state & priv::UPDATE_BACKGROUND_PROCESS_INVALID)
return;
default_output_file = this->p->background_process.output_filepath_for_project(into_path(get_project_filename(".3mf")));
default_output_file = this->p->background_process.output_filepath_for_project("");
} catch (const Slic3r::PlaceholderParserError& ex) {
// Show the error with monospaced font.
show_error(this, ex.what(), true);
@@ -9295,6 +9320,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
{
bool update_scheduled = false;
bool bed_shape_changed = false;
bool print_sequence_changed = false;
t_config_option_keys diff_keys = p->config->diff(config);
for (auto opt_key : diff_keys) {
if (opt_key == "filament_colour") {
@@ -9345,6 +9371,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
}
else if (opt_key == "print_sequence") {
update_scheduled = true;
print_sequence_changed = true;
}
else if (opt_key == "printer_model") {
p->reset_gcode_toolpaths();
@@ -9369,6 +9396,9 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
if (seq_print->value == PrintSequence::ByObject) {
std::string info_text = L("Print By Object: \nSuggest to use auto-arrange to avoid collisions when printing.");
notify_manager->bbl_show_seqprintinfo_notification(info_text);
//always show label when switch to sequence print
if (print_sequence_changed)
this->show_view3D_labels(true);
}
else
notify_manager->bbl_close_seqprintinfo_notification();
+1 -1
View File
@@ -103,7 +103,7 @@ std::string PresetHints::maximum_volumetric_flow_description(const PresetBundle
double bridge_flow = print_config.opt_float("bridge_flow");
double inner_wall_speed = print_config.opt_float("inner_wall_speed");
double outer_wall_speed = print_config.get_abs_value("outer_wall_speed", inner_wall_speed);
// double gap_infill_speed = print_config.opt_bool("gap_fill_enabled") ? print_config.opt_float("gap_infill_speed") : 0.;
// double gap_infill_speed = print_config.opt_bool("filter_out_gap_fill") ? print_config.opt_float("gap_infill_speed") : 0.;
double sparse_infill_speed = print_config.opt_float("sparse_infill_speed");
double small_perimeter_speed = print_config.get_abs_value("small_perimeter_speed", inner_wall_speed);
double internal_solid_infill_speed = print_config.opt_float("internal_solid_infill_speed");
+88
View File
@@ -0,0 +1,88 @@
#include "PrinterWebView.hpp"
#include "I18N.hpp"
#include "slic3r/GUI/wxExtensions.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/MainFrame.hpp"
#include "libslic3r_version.h"
#include <wx/sizer.h>
#include <wx/toolbar.h>
#include <wx/textdlg.h>
#include <slic3r/GUI/Widgets/WebView.hpp>
namespace pt = boost::property_tree;
namespace Slic3r {
namespace GUI {
PrinterWebView::PrinterWebView(wxWindow *parent)
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
{
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
// Create the webview
m_browser = WebView::CreateWebView(this, "");
if (m_browser == nullptr) {
wxLogError("Could not init m_browser");
return;
}
SetSizer(topsizer);
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
// Log backend information
if (wxGetApp().get_mode() == comDevelop) {
wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());
wxLogMessage("Backend: %s Version: %s", m_browser->GetClassInfo()->GetClassName(),
wxWebView::GetBackendVersionInfo().ToString());
wxLogMessage("User Agent: %s", m_browser->GetUserAgent());
}
//Zoom
m_zoomFactor = 100;
//Connect the idle events
Bind(wxEVT_CLOSE_WINDOW, &PrinterWebView::OnClose, this);
}
PrinterWebView::~PrinterWebView()
{
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Start";
SetEvtHandlerEnabled(false);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " End";
}
void PrinterWebView::load_url(wxString& url)
{
// this->Show();
// this->Raise();
m_browser->LoadURL(url);
//m_browser->SetFocus();
UpdateState();
}
/**
* Method that retrieves the current state from the web control and updates the
* GUI the reflect this current state.
*/
void PrinterWebView::UpdateState() {
// SetTitle(m_browser->GetCurrentTitle());
}
void PrinterWebView::OnClose(wxCloseEvent& evt)
{
this->Hide();
}
} // GUI
} // Slic3r
+53
View File
@@ -0,0 +1,53 @@
#ifndef slic3r_PrinterWebView_hpp_
#define slic3r_PrinterWebView_hpp_
#include "wx/artprov.h"
#include "wx/cmdline.h"
#include "wx/notifmsg.h"
#include "wx/settings.h"
#include "wx/webview.h"
#if wxUSE_WEBVIEW_EDGE
#include "wx/msw/webview_edge.h"
#endif
#include "wx/webviewarchivehandler.h"
#include "wx/webviewfshandler.h"
#include "wx/numdlg.h"
#include "wx/infobar.h"
#include "wx/filesys.h"
#include "wx/fs_arc.h"
#include "wx/fs_mem.h"
#include "wx/stdpaths.h"
#include <wx/panel.h>
#include <wx/tbarbase.h>
#include "wx/textctrl.h"
#include <wx/timer.h>
namespace Slic3r {
namespace GUI {
class PrinterWebView : public wxPanel {
public:
PrinterWebView(wxWindow *parent);
virtual ~PrinterWebView();
void load_url(wxString& url);
void UpdateState();
void OnClose(wxCloseEvent& evt);
private:
wxWebView* m_browser;
long m_zoomFactor;
// DECLARE_EVENT_TABLE()
};
} // GUI
} // Slic3r
#endif /* slic3r_Tab_hpp_ */
+2
View File
@@ -89,6 +89,7 @@ void ReleaseNoteDialog::update_release_note(wxString release_note, std::string v
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALL, 5);
m_vebview_release_note->SetSizer(sizer_text_release_note);
m_vebview_release_note->Layout();
m_vebview_release_note->Fit();
}
void UpdateVersionDialog::alter_choice(wxCommandEvent& event)
@@ -333,6 +334,7 @@ void UpdateVersionDialog::update_version_info(wxString release_note, wxString ve
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALL, 5);
m_scrollwindows_release_note->SetSizer(sizer_text_release_note);
m_scrollwindows_release_note->Layout();
m_scrollwindows_release_note->Fit();
}
}
+10 -4
View File
@@ -400,7 +400,7 @@ SelectMachinePopup::SelectMachinePopup(wxWindow *parent)
m_scrolledWindow->Layout();
m_sizxer_scrolledWindow->Fit(m_scrolledWindow);
#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
#if defined(__WINDOWS__)
m_sizer_search_bar = new wxBoxSizer(wxVERTICAL);
m_search_bar = new wxSearchCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_search_bar->ShowSearchButton( true );
@@ -574,7 +574,7 @@ void SelectMachinePopup::update_other_devices()
if (i < m_other_list_machine_panel.size()) {
op = m_other_list_machine_panel[i]->mPanel;
op->Show();
#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
#if defined(__WINDOWS__)
if (!search_for_printer(mobj)) {
op->Hide();
}
@@ -643,7 +643,7 @@ void SelectMachinePopup::update_other_devices()
m_placeholder_panel = new wxWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxSize(-1,FromDIP(26)));
wxBoxSizer* placeholder_sizer = new wxBoxSizer(wxVERTICAL);
auto m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
placeholder_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
@@ -691,7 +691,7 @@ void SelectMachinePopup::update_user_devices()
if (i < m_user_list_machine_panel.size()) {
op = m_user_list_machine_panel[i]->mPanel;
op->Show();
#if !BBL_RELEASE_TO_PUBLIC && defined(__WINDOWS__)
#if defined(__WINDOWS__)
if (!search_for_printer(mobj)) {
op->Hide();
}
@@ -860,6 +860,12 @@ void SelectMachinePopup::OnLeftUp(wxMouseEvent &event)
wxPostEvent(p->mPanel, event);
}
}
//hyper link
auto h_rect = m_hyperlink->ClientToScreen(wxPoint(0, 0));
if (mouse_pos.x > h_rect.x && mouse_pos.y > h_rect.y && mouse_pos.x < (h_rect.x + m_hyperlink->GetSize().x) && mouse_pos.y < (h_rect.y + m_hyperlink->GetSize().y)) {
wxLaunchDefaultBrowser(wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"));
}
}
}
+1
View File
@@ -198,6 +198,7 @@ private:
int m_my_devices_count{0};
int m_other_devices_count{0};
wxWindow* m_placeholder_panel{nullptr};
wxHyperlinkCtrl* m_hyperlink{nullptr};
wxBoxSizer * m_sizer_body{nullptr};
wxBoxSizer * m_sizer_my_devices{nullptr};
wxBoxSizer * m_sizer_other_devices{nullptr};
+31 -7
View File
@@ -855,7 +855,7 @@ void TabPrinter::init_options_list()
for (const std::string& opt_key : m_config->keys())
{
if (opt_key == "printable_area" || opt_key == "bed_exclude_area") {
if (opt_key == "printable_area" || opt_key == "bed_exclude_area" | opt_key == "thumbnails") {
m_options_list.emplace(opt_key, m_opt_status_value);
continue;
}
@@ -1806,6 +1806,7 @@ void TabPrint::build()
optgroup->append_single_option_line("sparse_infill_pattern", "fill-patterns#infill types and their properties of sparse");
optgroup->append_single_option_line("top_surface_pattern", "fill-patterns#Infill of the top surface and bottom surface");
optgroup->append_single_option_line("bottom_surface_pattern", "fill-patterns#Infill of the top surface and bottom surface");
optgroup->append_single_option_line("filter_out_gap_fill");
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
optgroup->append_single_option_line("infill_wall_overlap");
@@ -1822,6 +1823,8 @@ void TabPrint::build()
optgroup = page->new_optgroup(L("Other layers speed"), L"param_speed", 15);
optgroup->append_single_option_line("outer_wall_speed");
optgroup->append_single_option_line("inner_wall_speed");
optgroup->append_single_option_line("small_perimeter_speed");
optgroup->append_single_option_line("small_perimeter_threshold");
optgroup->append_single_option_line("sparse_infill_speed");
optgroup->append_single_option_line("internal_solid_infill_speed");
optgroup->append_single_option_line("top_surface_speed");
@@ -2654,6 +2657,12 @@ void TabFilament::toggle_options()
{
if (!m_active_page)
return;
bool is_BBL_printer = false;
if (m_preset_bundle) {
is_BBL_printer =
m_preset_bundle->printers.get_edited_preset().is_bbl_vendor_preset(
m_preset_bundle);
}
if (m_active_page->title() == "Cooling")
{
@@ -2666,8 +2675,12 @@ void TabFilament::toggle_options()
}
if (m_active_page->title() == "Filament")
{
bool pa = m_config->opt_bool("enable_pressure_advance");
bool pa = m_config->opt_bool("enable_pressure_advance", 0);
toggle_option("pressure_advance", pa);
toggle_line("cool_plate_temp_initial_layer", is_BBL_printer);
toggle_line("eng_plate_temp_initial_layer", is_BBL_printer);
toggle_line("textured_plate_temp_initial_layer", is_BBL_printer);
}
if (m_active_page->title() == "Setting Overrides")
update_filament_overrides_page();
@@ -2867,6 +2880,9 @@ void TabPrinter::build_fff()
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
optgroup->append_single_option_line("gcode_flavor");
option = optgroup->get_option("thumbnails");
option.opt.full_width = true;
optgroup->append_single_option_line(option);
optgroup->append_single_option_line("scan_first_layer");
// optgroup->append_single_option_line("spaghetti_detector");
optgroup->append_single_option_line("machine_load_filament_time");
@@ -3130,7 +3146,7 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/)
{
size_t n_before_extruders = 2; // Count of pages before Extruder pages
auto flavor = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
bool is_marlin_flavor = (flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware);
bool is_marlin_flavor = (flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware || flavor == gcfKlipper);
/* ! Freeze/Thaw in this function is needed to avoid call OnPaint() for erased pages
* and be cause of application crash, when try to change Preset in moment,
@@ -3435,6 +3451,12 @@ void TabPrinter::toggle_options()
//BBS: extruder clearance of BBL printer can't be edited.
for (auto el : { "extruder_clearance_radius", "extruder_clearance_height_to_rod", "extruder_clearance_height_to_lid" })
toggle_option(el, !is_BBL_printer);
// SoftFever: hide BBL specific settings
for (auto el :
{"scan_first_layer", "machine_load_filament_time",
"machine_unload_filament_time", "nozzle_type", "bed_exclude_area"})
toggle_line(el, is_BBL_printer);
}
wxString extruder_number;
@@ -3478,9 +3500,9 @@ void TabPrinter::toggle_options()
toggle_option("retract_restart_extra_toolchange", have_multiple_extruders && toolchange_retraction, i);
}
if (m_active_page->title() == "Motion ability") {
assert(m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value == gcfMarlinLegacy
|| m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value == gcfMarlinFirmware);
auto gcf = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
if (m_active_page->title() == "Motion ability") {
assert(gcf == gcfMarlinLegacy || gcf == gcfMarlinFirmware || gcf == gcfKlipper);
bool silent_mode = m_config->opt_bool("silent_mode");
int max_field = silent_mode ? 2 : 1;
//BBS: limits of BBL printer can't be edited.
@@ -3512,7 +3534,9 @@ void TabPrinter::update_fff()
m_use_silent_mode = m_config->opt_bool("silent_mode");
}
bool supports_travel_acceleration = (m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value == gcfMarlinFirmware);
auto gcf_ =
m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
bool supports_travel_acceleration = (gcf_ == gcfMarlinFirmware || gcf_ == gcfMarlinLegacy || gcf_ == gcfKlipper);
if (m_supports_travel_acceleration != supports_travel_acceleration) {
m_rebuild_kinematics_page = true;
m_supports_travel_acceleration = supports_travel_acceleration;
+1 -1
View File
@@ -1315,7 +1315,7 @@ static wxString get_string_value(std::string opt_key, const DynamicPrintConfig&
}
case coPoints: {
//BBS: add bed_exclude_area
if (opt_key == "printable_area") {
if (opt_key == "printable_area" || opt_key == "thumbnails") {
ConfigOptionPoints points = *config.option<ConfigOptionPoints>(opt_key);
//BuildVolume build_volume = {points.values, 0.};
return get_thumbnails_string(points.values);
+6
View File
@@ -73,6 +73,12 @@ void ComboBox::SetSelection(int n)
SetIcon(icons[drop.selection]);
}
void ComboBox::SelectAndNotify(int n) {
SetSelection(n);
sendComboBoxEvent();
}
void ComboBox::Rescale()
{
TextInput::Rescale();
+2
View File
@@ -43,6 +43,8 @@ public:
void SetSelection(int n) override;
void SelectAndNotify(int n);
virtual void Rescale() override;
wxString GetValue() const;
+2 -2
View File
@@ -10,5 +10,5 @@ endif()
if(NOT DEFINED BBL_INTERNAL_TESTING)
set(BBL_INTERNAL_TESTING "1")
endif()
set(SLIC3R_VERSION "01.03.00.12")
set(SoftFever_VERSION "1.3.0")
set(SLIC3R_VERSION "01.03.00.22")
set(SoftFever_VERSION "1.3.2")