mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
ENH: modify chamber_temperature to array
Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I8c1afc85ff91ebf4458871fecba5f2f1f1e32f1d
This commit is contained in:
parent
947f870b32
commit
6ce4a6c5f2
6 changed files with 13 additions and 11 deletions
|
@ -1777,6 +1777,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||||
{
|
{
|
||||||
int curr_bed_type = m_config.curr_bed_type.getInt();
|
int curr_bed_type = m_config.curr_bed_type.getInt();
|
||||||
|
|
||||||
|
int max_chamber_temp = *std::max_element(m_config.chamber_temperatures.values.begin(), m_config.chamber_temperatures.values.end());
|
||||||
|
|
||||||
std::string first_layer_bed_temp_str;
|
std::string first_layer_bed_temp_str;
|
||||||
const ConfigOptionInts* first_bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_1st_layer_key((BedType)curr_bed_type));
|
const ConfigOptionInts* first_bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_1st_layer_key((BedType)curr_bed_type));
|
||||||
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key((BedType)curr_bed_type));
|
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key((BedType)curr_bed_type));
|
||||||
|
@ -1785,7 +1787,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||||
m_placeholder_parser.set("bed_temperature", new ConfigOptionInts(*bed_temp_opt));
|
m_placeholder_parser.set("bed_temperature", new ConfigOptionInts(*bed_temp_opt));
|
||||||
m_placeholder_parser.set("bed_temperature_initial_layer_single", new ConfigOptionInt(first_bed_temp_opt->get_at(initial_extruder_id)));
|
m_placeholder_parser.set("bed_temperature_initial_layer_single", new ConfigOptionInt(first_bed_temp_opt->get_at(initial_extruder_id)));
|
||||||
m_placeholder_parser.set("bed_temperature_initial_layer_vector", new ConfigOptionString(""));
|
m_placeholder_parser.set("bed_temperature_initial_layer_vector", new ConfigOptionString(""));
|
||||||
m_placeholder_parser.set("chamber_temperature", new ConfigOptionInt(m_config.chamber_temperature));
|
m_placeholder_parser.set("chamber_temperature", new ConfigOptionInts({max_chamber_temp}));
|
||||||
|
|
||||||
//support variables `first_layer_temperature` and `first_layer_bed_temperature`
|
//support variables `first_layer_temperature` and `first_layer_bed_temperature`
|
||||||
m_placeholder_parser.set("first_layer_bed_temperature", new ConfigOptionInts(*first_bed_temp_opt));
|
m_placeholder_parser.set("first_layer_bed_temperature", new ConfigOptionInts(*first_bed_temp_opt));
|
||||||
|
|
|
@ -811,7 +811,7 @@ static std::vector<std::string> s_Preset_filament_options {
|
||||||
"filament_wipe_distance", "additional_cooling_fan_speed",
|
"filament_wipe_distance", "additional_cooling_fan_speed",
|
||||||
"bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high",
|
"bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high",
|
||||||
//OrcaSlicer
|
//OrcaSlicer
|
||||||
"enable_pressure_advance", "pressure_advance", "chamber_temperature"
|
"enable_pressure_advance", "pressure_advance", "chamber_temperatures"
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::vector<std::string> s_Preset_machine_limits_options {
|
static std::vector<std::string> s_Preset_machine_limits_options {
|
||||||
|
|
|
@ -145,7 +145,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||||
"wipe_distance",
|
"wipe_distance",
|
||||||
"curr_bed_type",
|
"curr_bed_type",
|
||||||
"nozzle_volume",
|
"nozzle_volume",
|
||||||
"chamber_temperature",
|
"chamber_temperatures",
|
||||||
"required_nozzle_HRC",
|
"required_nozzle_HRC",
|
||||||
"upward_compatible_machine",
|
"upward_compatible_machine",
|
||||||
//OrcaSlicer
|
//OrcaSlicer
|
||||||
|
@ -198,7 +198,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||||
osteps.emplace_back(posSlice);
|
osteps.emplace_back(posSlice);
|
||||||
} else if (
|
} else if (
|
||||||
opt_key == "print_sequence"
|
opt_key == "print_sequence"
|
||||||
|| opt_key == "chamber_temperature"
|
|| opt_key == "chamber_temperatures"
|
||||||
|| opt_key == "filament_type"
|
|| opt_key == "filament_type"
|
||||||
|| opt_key == "nozzle_temperature_initial_layer"
|
|| opt_key == "nozzle_temperature_initial_layer"
|
||||||
|| opt_key == "filament_minimal_purge_on_wipe_tower"
|
|| opt_key == "filament_minimal_purge_on_wipe_tower"
|
||||||
|
|
|
@ -3050,14 +3050,14 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionFloat(0));
|
def->set_default_value(new ConfigOptionFloat(0));
|
||||||
|
|
||||||
def = this->add("chamber_temperature", coInt);
|
def = this->add("chamber_temperatures", coInts);
|
||||||
def->label = L("Chamber temperature");
|
def->label = L("Chamber temperature");
|
||||||
def->tooltip = L("Target chamber temperature");
|
def->tooltip = L("Target chamber temperature");
|
||||||
def->sidetext = L("°C");
|
def->sidetext = L("°C");
|
||||||
def->full_label = L("Chamber temperature");
|
def->full_label = L("Chamber temperature");
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
def->max = max_temp;
|
def->max = 60;
|
||||||
def->set_default_value(new ConfigOptionInt(0));
|
def->set_default_value(new ConfigOptionInts{0});
|
||||||
|
|
||||||
def = this->add("nozzle_temperature", coInts);
|
def = this->add("nozzle_temperature", coInts);
|
||||||
def->label = L("Other layers");
|
def->label = L("Other layers");
|
||||||
|
@ -4238,7 +4238,7 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
|
||||||
"remove_freq_sweep", "remove_bed_leveling", "remove_extrusion_calibration",
|
"remove_freq_sweep", "remove_bed_leveling", "remove_extrusion_calibration",
|
||||||
"support_transition_line_width", "support_transition_speed", "bed_temperature", "bed_temperature_initial_layer",
|
"support_transition_line_width", "support_transition_speed", "bed_temperature", "bed_temperature_initial_layer",
|
||||||
"can_switch_nozzle_type", "can_add_auxiliary_fan", "extra_flush_volume", "spaghetti_detector", "adaptive_layer_height",
|
"can_switch_nozzle_type", "can_add_auxiliary_fan", "extra_flush_volume", "spaghetti_detector", "adaptive_layer_height",
|
||||||
"z_hop_type","nozzle_hrc"
|
"z_hop_type","nozzle_hrc","chamber_temperature"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ignore.find(opt_key) != ignore.end()) {
|
if (ignore.find(opt_key) != ignore.end()) {
|
||||||
|
|
|
@ -946,7 +946,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
|
||||||
((ConfigOptionBool, spiral_mode))
|
((ConfigOptionBool, spiral_mode))
|
||||||
((ConfigOptionInt, standby_temperature_delta))
|
((ConfigOptionInt, standby_temperature_delta))
|
||||||
((ConfigOptionInts, nozzle_temperature))
|
((ConfigOptionInts, nozzle_temperature))
|
||||||
((ConfigOptionInt, chamber_temperature))
|
((ConfigOptionInts, chamber_temperatures))
|
||||||
((ConfigOptionBools, wipe))
|
((ConfigOptionBools, wipe))
|
||||||
// BBS
|
// BBS
|
||||||
((ConfigOptionInts, bed_temperature_difference))
|
((ConfigOptionInts, bed_temperature_difference))
|
||||||
|
|
|
@ -2645,7 +2645,7 @@ void TabFilament::build()
|
||||||
optgroup->append_single_option_line("bed_temperature_difference");
|
optgroup->append_single_option_line("bed_temperature_difference");
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Print temperature"), L"param_temperature");
|
optgroup = page->new_optgroup(L("Print temperature"), L"param_temperature");
|
||||||
optgroup->append_single_option_line("chamber_temperature");
|
optgroup->append_single_option_line("chamber_temperatures");
|
||||||
|
|
||||||
line = { L("Nozzle"), L("Nozzle temperature when printing") };
|
line = { L("Nozzle"), L("Nozzle temperature when printing") };
|
||||||
line.append_option(optgroup->get_option("nozzle_temperature_initial_layer"));
|
line.append_option(optgroup->get_option("nozzle_temperature_initial_layer"));
|
||||||
|
@ -2862,7 +2862,7 @@ void TabFilament::toggle_options()
|
||||||
toggle_line("pressure_advance", true);
|
toggle_line("pressure_advance", true);
|
||||||
toggle_option("pressure_advance", m_config->opt_bool("enable_pressure_advance", 0));
|
toggle_option("pressure_advance", m_config->opt_bool("enable_pressure_advance", 0));
|
||||||
}
|
}
|
||||||
toggle_line("chamber_temperature", !is_BBL_printer);
|
toggle_line("chamber_temperatures", !is_BBL_printer);
|
||||||
for (auto el :
|
for (auto el :
|
||||||
{"cool_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp", "eng_plate_temp_initial_layer", "textured_plate_temp", "textured_plate_temp_initial_layer"})
|
{"cool_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp", "eng_plate_temp_initial_layer", "textured_plate_temp", "textured_plate_temp_initial_layer"})
|
||||||
toggle_line(el, is_BBL_printer);
|
toggle_line(el, is_BBL_printer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue