Skip to content

Commit

Permalink
Add support for textured cool plate (#6860)
Browse files Browse the repository at this point in the history
support textured cool plate
  • Loading branch information
SoftFever authored Sep 22, 2024
1 parent c28fd55 commit 99d4d09
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 3 deletions.
98 changes: 98 additions & 0 deletions resources/images/orca_bed_pct_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,8 @@ static BambuBedType to_bambu_bed_type(BedType type)
bambu_bed_type = bbtHighTemperaturePlate;
else if (type == btPTE)
bambu_bed_type = bbtTexturedPEIPlate;
else if (type == btPCT)
bambu_bed_type = bbtCoolPlate;

return bambu_bed_type;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ static std::vector<std::string> 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", "textured_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp_initial_layer", "hot_plate_temp_initial_layer","textured_plate_temp_initial_layer",
"cool_plate_temp", "textured_cool_plate_temp", "eng_plate_temp", "hot_plate_temp", "textured_plate_temp", "cool_plate_temp_initial_layer", "textured_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","dont_slow_down_outer_wall", "slow_down_for_layer_cooling", "fan_min_speed",
Expand Down
4 changes: 3 additions & 1 deletion src/libslic3r/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"bridge_acceleration",
"travel_acceleration",
"sparse_infill_acceleration",
"internal_solid_infill_acceleration"
"internal_solid_infill_acceleration",
// BBS
"cool_plate_temp_initial_layer",
"textured_cool_plate_temp_initial_layer",
"eng_plate_temp_initial_layer",
"hot_plate_temp_initial_layer",
"textured_plate_temp_initial_layer",
Expand Down Expand Up @@ -270,6 +271,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "single_extruder_multi_material"
|| opt_key == "nozzle_temperature"
|| opt_key == "cool_plate_temp"
|| opt_key == "textured_cool_plate_temp"
|| opt_key == "eng_plate_temp"
|| opt_key == "hot_plate_temp"
|| opt_key == "textured_plate_temp"
Expand Down
25 changes: 24 additions & 1 deletion src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ static const t_config_enum_values s_keys_map_BedType = {
{ "Cool Plate", btPC },
{ "Engineering Plate", btEP },
{ "High Temp Plate", btPEI },
{ "Textured PEI Plate", btPTE }
{ "Textured PEI Plate", btPTE },
{ "Textured Cool Plate", btPCT }
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(BedType)

Expand Down Expand Up @@ -665,6 +666,16 @@ void PrintConfigDef::init_fff_params()
def->max = 300;
def->set_default_value(new ConfigOptionInts{ 35 });

def = this->add("textured_cool_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 Cool Plate");
def->sidetext = L("°C");
def->full_label = L("Bed temperature");
def->min = 0;
def->max = 300;
def->set_default_value(new ConfigOptionInts{ 40 });

def = this->add("eng_plate_temp", coInts);
def->label = L("Other layers");
def->tooltip = L("Bed temperature for layers except the initial one. "
Expand Down Expand Up @@ -705,6 +716,16 @@ void PrintConfigDef::init_fff_params()
def->max = 120;
def->set_default_value(new ConfigOptionInts{ 35 });

def = this->add("textured_cool_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 Cool Plate");
def->sidetext = L("°C");
def->min = 0;
def->max = 120;
def->set_default_value(new ConfigOptionInts{ 40 });

def = this->add("eng_plate_temp_initial_layer", coInts);
def->label = L("Initial layer");
def->full_label = L("Initial layer bed temperature");
Expand Down Expand Up @@ -740,10 +761,12 @@ void PrintConfigDef::init_fff_params()
def->mode = comSimple;
def->enum_keys_map = &s_keys_map_BedType;
def->enum_values.emplace_back("Cool Plate");
def->enum_values.emplace_back("Textured 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("Textured Cool Plate"));
def->enum_labels.emplace_back(L("Engineering Plate"));
def->enum_labels.emplace_back(L("Smooth PEI Plate / High Temp Plate"));
def->enum_labels.emplace_back(L("Textured PEI Plate"));
Expand Down
12 changes: 12 additions & 0 deletions src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ enum BedType {
btEP,
btPEI,
btPTE,
btPCT,
btCount
};

Expand Down Expand Up @@ -324,6 +325,9 @@ static std::string bed_type_to_gcode_string(const BedType type)
case btPC:
type_str = "cool_plate";
break;
case btPCT:
type_str = "textured_cool_plate";
break;
case btEP:
type_str = "eng_plate";
break;
Expand All @@ -346,6 +350,9 @@ static std::string get_bed_temp_key(const BedType type)
if (type == btPC)
return "cool_plate_temp";

if (type == btPCT)
return "textured_cool_plate_temp";

if (type == btEP)
return "eng_plate_temp";

Expand All @@ -363,6 +370,9 @@ static std::string get_bed_temp_1st_layer_key(const BedType type)
if (type == btPC)
return "cool_plate_temp_initial_layer";

if (type == btPCT)
return "textured_cool_plate_temp_initial_layer";

if (type == btEP)
return "eng_plate_temp_initial_layer";

Expand Down Expand Up @@ -1172,10 +1182,12 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionString, bed_custom_model))
((ConfigOptionEnum<BedType>, curr_bed_type))
((ConfigOptionInts, cool_plate_temp))
((ConfigOptionInts, textured_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, textured_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))
Expand Down
3 changes: 3 additions & 0 deletions src/slic3r/GUI/PartPlate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5513,6 +5513,7 @@ void PartPlateList::BedTextureInfo::reset()

void PartPlateList::init_bed_type_info()
{
BedTextureInfo::TexturePart pct_part_left(10, 130, 10, 110, "orca_bed_pct_left.svg");
BedTextureInfo::TexturePart pc_part1(10, 130, 10, 110, "bbl_bed_pc_left.svg");
BedTextureInfo::TexturePart pc_part2(74, -10, 148, 12, "bbl_bed_pc_bottom.svg");
BedTextureInfo::TexturePart ep_part1(7.5, 90, 12.5, 150, "bbl_bed_ep_left.svg");
Expand All @@ -5527,6 +5528,8 @@ void PartPlateList::init_bed_type_info()
}
bed_texture_info[btPC].parts.push_back(pc_part1);
bed_texture_info[btPC].parts.push_back(pc_part2);
bed_texture_info[btPCT].parts.push_back(pct_part_left);
bed_texture_info[btPCT].parts.push_back(pc_part2);
bed_texture_info[btEP].parts.push_back(ep_part1);
bed_texture_info[btEP].parts.push_back(ep_part2);
bed_texture_info[btPEI].parts.push_back(pei_part1);
Expand Down
6 changes: 6 additions & 0 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3315,6 +3315,11 @@ void TabFilament::build()
line.append_option(optgroup->get_option("cool_plate_temp"));
optgroup->append_line(line);

line = { L("Textured Cool plate"), L("Bed temperature when cool plate is installed. Value 0 means the filament does not support to print on the Textured Cool Plate") };
line.append_option(optgroup->get_option("textured_cool_plate_temp_initial_layer"));
line.append_option(optgroup->get_option("textured_cool_plate_temp"));
optgroup->append_line(line);

line = { L("Engineering plate"), L("Bed temperature when engineering plate is installed. Value 0 means the filament does not support to print on the Engineering Plate") };
line.append_option(optgroup->get_option("eng_plate_temp_initial_layer"));
line.append_option(optgroup->get_option("eng_plate_temp"));
Expand Down Expand Up @@ -3578,6 +3583,7 @@ void TabFilament::toggle_options()
toggle_option("pressure_advance", pa);
auto support_multi_bed_types = is_BBL_printer || cfg.opt_bool("support_multi_bed_types");
toggle_line("cool_plate_temp_initial_layer", support_multi_bed_types );
toggle_line("textured_cool_plate_temp_initial_layer", support_multi_bed_types);
toggle_line("eng_plate_temp_initial_layer", support_multi_bed_types);
toggle_line("textured_plate_temp_initial_layer", support_multi_bed_types);

Expand Down

1 comment on commit 99d4d09

@shyblower
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUG: When I save a project which has the engineering plate configured, the textured cool plate is selected when I read it back again.

Please sign in to comment.