From 0ab13a6abb3a863aa677568097a7769474184843 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Wed, 24 Aug 2022 15:06:25 +0800 Subject: [PATCH] ENH: Add Textured PEI Plate Change-Id: I08178e86a8ccb23844cca00bc9d265df7507f910 (cherry picked from commit 8f101963ecab1352e2721ead83928b327d6c0dbd) --- .../BBL/filament/Bambu Support W @base.json | 6 +++++ .../BBL/filament/fdm_filament_abs.json | 6 +++++ .../BBL/filament/fdm_filament_asa.json | 6 +++++ .../BBL/filament/fdm_filament_common.json | 6 +++++ .../BBL/filament/fdm_filament_pa.json | 6 +++++ .../BBL/filament/fdm_filament_pc.json | 6 +++++ .../BBL/filament/fdm_filament_pet.json | 6 +++++ .../BBL/filament/fdm_filament_pla.json | 6 +++++ .../BBL/filament/fdm_filament_pva.json | 6 +++++ .../BBL/filament/fdm_filament_tpu.json | 6 +++++ src/libslic3r/GCode.cpp | 3 +++ src/libslic3r/Preset.cpp | 2 +- src/libslic3r/Print.cpp | 2 ++ src/libslic3r/PrintConfig.cpp | 27 ++++++++++++++++--- src/libslic3r/PrintConfig.hpp | 11 ++++++++ src/slic3r/GUI/Tab.cpp | 8 ++++++ 16 files changed, 109 insertions(+), 4 deletions(-) diff --git a/resources/profiles/BBL/filament/Bambu Support W @base.json b/resources/profiles/BBL/filament/Bambu Support W @base.json index 6dce96695c..8a5f3fbbc5 100644 --- a/resources/profiles/BBL/filament/Bambu Support W @base.json +++ b/resources/profiles/BBL/filament/Bambu Support W @base.json @@ -20,12 +20,18 @@ "hot_plate_temp": [ "40" ], + "textured_plate_temp": [ + "40" + ], "cool_plate_temp_initial_layer": [ "40" ], "hot_plate_temp_initial_layer": [ "40" ], + "textured_plate_temp_initial_layer": [ + "40" + ], "filament_cost": [ "29.99" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_abs.json b/resources/profiles/BBL/filament/fdm_filament_abs.json index 1c601318d9..a760f31ea7 100644 --- a/resources/profiles/BBL/filament/fdm_filament_abs.json +++ b/resources/profiles/BBL/filament/fdm_filament_abs.json @@ -13,6 +13,9 @@ "hot_plate_temp" : [ "90" ], + "textured_plate_temp" : [ + "90" + ], "cool_plate_temp_initial_layer" : [ "90" ], @@ -22,6 +25,9 @@ "hot_plate_temp_initial_layer" : [ "90" ], + "textured_plate_temp_initial_layer" : [ + "90" + ], "slow_down_for_layer_cooling": [ "1" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_asa.json b/resources/profiles/BBL/filament/fdm_filament_asa.json index 3eeac3e3a4..6fe3caf560 100644 --- a/resources/profiles/BBL/filament/fdm_filament_asa.json +++ b/resources/profiles/BBL/filament/fdm_filament_asa.json @@ -13,6 +13,9 @@ "hot_plate_temp" : [ "90" ], + "textured_plate_temp" : [ + "90" + ], "cool_plate_temp_initial_layer" : [ "90" ], @@ -22,6 +25,9 @@ "hot_plate_temp_initial_layer" : [ "90" ], + "textured_plate_temp_initial_layer" : [ + "90" + ], "slow_down_for_layer_cooling": [ "1" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_common.json b/resources/profiles/BBL/filament/fdm_filament_common.json index f8dc0a70ca..208d6ac175 100644 --- a/resources/profiles/BBL/filament/fdm_filament_common.json +++ b/resources/profiles/BBL/filament/fdm_filament_common.json @@ -12,6 +12,9 @@ "hot_plate_temp" : [ "60" ], + "textured_plate_temp" : [ + "60" + ], "cool_plate_temp_initial_layer" : [ "60" ], @@ -21,6 +24,9 @@ "hot_plate_temp_initial_layer" : [ "60" ], + "textured_plate_temp_initial_layer" : [ + "60" + ], "overhang_fan_threshold": [ "95%" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_pa.json b/resources/profiles/BBL/filament/fdm_filament_pa.json index 67c8ff050f..ce1b3d653c 100644 --- a/resources/profiles/BBL/filament/fdm_filament_pa.json +++ b/resources/profiles/BBL/filament/fdm_filament_pa.json @@ -13,6 +13,9 @@ "hot_plate_temp" : [ "100" ], + "textured_plate_temp" : [ + "100" + ], "cool_plate_temp_initial_layer" : [ "0" ], @@ -22,6 +25,9 @@ "hot_plate_temp_initial_layer" : [ "100" ], + "textured_plate_temp_initial_layer" : [ + "100" + ], "slow_down_for_layer_cooling": [ "1" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_pc.json b/resources/profiles/BBL/filament/fdm_filament_pc.json index 9174d53530..dd46925585 100644 --- a/resources/profiles/BBL/filament/fdm_filament_pc.json +++ b/resources/profiles/BBL/filament/fdm_filament_pc.json @@ -13,6 +13,9 @@ "hot_plate_temp" : [ "110" ], + "textured_plate_temp" : [ + "110" + ], "cool_plate_temp_initial_layer" : [ "0" ], @@ -22,6 +25,9 @@ "hot_plate_temp_initial_layer" : [ "110" ], + "textured_plate_temp_initial_layer" : [ + "110" + ], "slow_down_for_layer_cooling": [ "1" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_pet.json b/resources/profiles/BBL/filament/fdm_filament_pet.json index b7f725968a..e32da82499 100644 --- a/resources/profiles/BBL/filament/fdm_filament_pet.json +++ b/resources/profiles/BBL/filament/fdm_filament_pet.json @@ -13,6 +13,9 @@ "hot_plate_temp" : [ "80" ], + "textured_plate_temp" : [ + "80" + ], "cool_plate_temp_initial_layer" : [ "60" ], @@ -22,6 +25,9 @@ "hot_plate_temp_initial_layer" : [ "80" ], + "textured_plate_temp_initial_layer" : [ + "80" + ], "slow_down_for_layer_cooling": [ "1" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_pla.json b/resources/profiles/BBL/filament/fdm_filament_pla.json index a93a17cb9c..2337f68bbb 100644 --- a/resources/profiles/BBL/filament/fdm_filament_pla.json +++ b/resources/profiles/BBL/filament/fdm_filament_pla.json @@ -28,6 +28,9 @@ "hot_plate_temp" : [ "45" ], + "textured_plate_temp" : [ + "45" + ], "cool_plate_temp_initial_layer" : [ "35" ], @@ -37,6 +40,9 @@ "hot_plate_temp_initial_layer" : [ "45" ], + "textured_plate_temp_initial_layer" : [ + "45" + ], "nozzle_temperature_initial_layer": [ "220" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_pva.json b/resources/profiles/BBL/filament/fdm_filament_pva.json index d8bb1b18c7..9556fbd3f3 100644 --- a/resources/profiles/BBL/filament/fdm_filament_pva.json +++ b/resources/profiles/BBL/filament/fdm_filament_pva.json @@ -13,6 +13,9 @@ "hot_plate_temp" : [ "45" ], + "textured_plate_temp" : [ + "45" + ], "cool_plate_temp_initial_layer" : [ "35" ], @@ -22,6 +25,9 @@ "hot_plate_temp_initial_layer" : [ "45" ], + "textured_plate_temp_initial_layer" : [ + "45" + ], "fan_cooling_layer_time": [ "100" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_tpu.json b/resources/profiles/BBL/filament/fdm_filament_tpu.json index 39597c7a56..19444ec0a7 100644 --- a/resources/profiles/BBL/filament/fdm_filament_tpu.json +++ b/resources/profiles/BBL/filament/fdm_filament_tpu.json @@ -13,6 +13,9 @@ "hot_plate_temp" : [ "35" ], + "textured_plate_temp" : [ + "35" + ], "cool_plate_temp_initial_layer" : [ "30" ], @@ -22,6 +25,9 @@ "hot_plate_temp_initial_layer" : [ "35" ], + "textured_plate_temp_initial_layer" : [ + "35" + ], "fan_cooling_layer_time": [ "100" ], diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 21ffc94d82..bf96a3d64a 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1262,6 +1262,7 @@ enum BambuBedType { bbtCoolPlate = 1, bbtEngineeringPlate = 2, bbtHighTemperaturePlate = 3, + bbtTexturedPEIPlate = 4, }; static BambuBedType to_bambu_bed_type(BedType type) @@ -1273,6 +1274,8 @@ static BambuBedType to_bambu_bed_type(BedType type) bambu_bed_type = bbtEngineeringPlate; else if (type == btPEI) bambu_bed_type = bbtHighTemperaturePlate; + else if (type == btPTE) + bambu_bed_type = bbtTexturedPEIPlate; return bambu_bed_type; } diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index a1c981535d..c71f4b7710 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -691,7 +691,7 @@ static std::vector s_Preset_filament_options { "filament_flow_ratio", "filament_density", "filament_cost", "filament_minimal_purge_on_wipe_tower", "nozzle_temperature", "nozzle_temperature_initial_layer", // BBS - "cool_plate_temp", "eng_plate_temp", "hot_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp_initial_layer", "hot_plate_temp_initial_layer", + "cool_plate_temp", "eng_plate_temp", "hot_plate_temp", "textured_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp_initial_layer", "hot_plate_temp_initial_layer","textured_plate_temp_initial_layer", // "bed_type", //BBS:temperature_vitrification "temperature_vitrification", "reduce_fan_stop_start_freq", "slow_down_for_layer_cooling", "fan_min_speed", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 9737f7742f..e56223216c 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -96,6 +96,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "cool_plate_temp_initial_layer", "eng_plate_temp_initial_layer", "hot_plate_temp_initial_layer", + "textured_plate_temp_initial_layer", "gcode_add_line_number", "layer_change_gcode", "fan_min_speed", @@ -173,6 +174,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n || opt_key == "cool_plate_temp" || opt_key == "eng_plate_temp" || opt_key == "hot_plate_temp" + || opt_key == "textured_plate_temp" || opt_key == "enable_prime_tower" || opt_key == "prime_tower_width" || opt_key == "prime_tower_brim_width" diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 25d6b671d2..e2c6e46773 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -213,7 +213,8 @@ static const t_config_enum_values s_keys_map_OverhangFanThreshold = { static const t_config_enum_values s_keys_map_BedType = { { "Cool Plate", btPC }, { "Engineering Plate", btEP }, - { "High Temp Plate", btPEI } + { "High Temp Plate", btPEI }, + { "Textured PEI Plate", btPTE } }; CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(BedType) @@ -367,6 +368,16 @@ void PrintConfigDef::init_fff_params() def->max = 120; def->set_default_value(new ConfigOptionInts{ 45 }); + def = this->add("textured_plate_temp", coInts); + def->label = L("Other layers"); + def->tooltip = L("Bed temperature for layers except the initial one. " + "Value 0 means the filament does not support to print on the Textured PEI Plate"); + def->sidetext = L("°C"); + def->full_label = L("Bed temperature"); + def->min = 0; + def->max = 120; + def->set_default_value(new ConfigOptionInts{45}); + def = this->add("cool_plate_temp_initial_layer", coInts); def->label = L("Initial layer"); def->full_label = L("Initial layer bed temperature"); @@ -397,6 +408,15 @@ void PrintConfigDef::init_fff_params() def->max = 120; def->set_default_value(new ConfigOptionInts{ 45 }); + def = this->add("textured_plate_temp_initial_layer", coInts); + def->label = L("Initial layer"); + def->full_label = L("Initial layer bed temperature"); + def->tooltip = L("Bed temperature of the initial layer. " + "Value 0 means the filament does not support to print on the Textured PEI Plate"); + def->sidetext = L("°C"); + def->max = 0; + def->max = 120; + def->set_default_value(new ConfigOptionInts{45}); def = this->add("curr_bed_type", coEnums); def->label = L("Bed type"); @@ -406,9 +426,11 @@ void PrintConfigDef::init_fff_params() def->enum_values.emplace_back("Cool Plate"); def->enum_values.emplace_back("Engineering Plate"); def->enum_values.emplace_back("High Temp Plate"); + def->enum_values.emplace_back("Textured PEI Plate"); def->enum_labels.emplace_back(L("Cool Plate")); def->enum_labels.emplace_back(L("Engineering Plate")); def->enum_labels.emplace_back(L("High Temp Plate")); + def->enum_labels.emplace_back(L("Textured PEI Plate")); def->set_default_value(new ConfigOptionEnum(btPC)); def = this->add("before_layer_change_gcode", coString); @@ -2283,8 +2305,7 @@ void PrintConfigDef::init_fff_params() def = this->add("independent_support_layer_height", coBool); def->label = L("Independent support layer height"); def->category = L("Support"); - def->tooltip = L("Support layer uses layer height independent with object layer. This is to support custom support gap," - "but may cause extra filament switches if support is specified as different extruder with object"); + def->tooltip = L("Support layer uses layer height independent with object layer. This is to support customizing z-gap and save print time."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(true)); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index b2963e57c2..bef719e9ab 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -152,6 +152,7 @@ enum BedType { btPC = 0, btEP, btPEI, + btPTE, btCount }; @@ -177,6 +178,8 @@ static std::string bed_type_to_gcode_string(const BedType type) case btPEI: type_str = "high_temp_plate"; break; + case btPTE: + type_str = "frosted_plate"; default: type_str = "unknown"; break; @@ -196,6 +199,9 @@ static std::string get_bed_temp_key(const BedType type) if (type == btPEI) return "hot_plate_temp"; + if (type == btPTE) + return "textured_plate_temp"; + return ""; } @@ -210,6 +216,9 @@ static std::string get_bed_temp_1st_layer_key(const BedType type) if (type == btPEI) return "hot_plate_temp_initial_layer"; + if (type == btPTE) + return "textured_plate_temp_initial_layer"; + return ""; } @@ -774,9 +783,11 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionInts, cool_plate_temp)) ((ConfigOptionInts, eng_plate_temp)) ((ConfigOptionInts, hot_plate_temp)) // hot is short for high temperature + ((ConfigOptionInts, textured_plate_temp)) ((ConfigOptionInts, cool_plate_temp_initial_layer)) ((ConfigOptionInts, eng_plate_temp_initial_layer)) ((ConfigOptionInts, hot_plate_temp_initial_layer)) // hot is short for high temperature + ((ConfigOptionInts, textured_plate_temp_initial_layer)) ((ConfigOptionBools, enable_overhang_bridge_fan)) ((ConfigOptionInts, overhang_fan_speed)) ((ConfigOptionEnumsGeneric, overhang_fan_threshold)) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 95cd3af6ba..f4081b1aab 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2468,6 +2468,11 @@ void TabFilament::build() line.append_option(optgroup->get_option("hot_plate_temp")); optgroup->append_line(line); + line = {L("Textured PEI Plate"), L("Bed temperature when Textured PEI Plate is installed. Value 0 means the filament does not support to print on the Textured PEI Plate")}; + line.append_option(optgroup->get_option("textured_plate_temp_initial_layer")); + line.append_option(optgroup->get_option("textured_plate_temp")); + optgroup->append_line(line); + optgroup->m_on_change = [this, optgroup](t_config_option_key opt_key, boost::any value) { DynamicPrintConfig& filament_config = wxGetApp().preset_bundle->filaments.get_edited_preset().config; @@ -2482,6 +2487,9 @@ void TabFilament::build() else if (opt_key == "hot_plate_temp" || opt_key == "hot_plate_temp_initial_layer") { m_config_manipulation.check_bed_temperature_difference(BedType::btPEI, &filament_config); } + else if (opt_key == "textured_plate_temp" || opt_key == "textured_plate_temp_initial_layer") { + m_config_manipulation.check_bed_temperature_difference(BedType::btPTE, &filament_config); + } else if (opt_key == "nozzle_temperature") { m_config_manipulation.check_nozzle_temperature_range(&filament_config); }