Skip to content

Commit

Permalink
move heating zone to extruder
Browse files Browse the repository at this point in the history
  • Loading branch information
GiacomoGuaresi committed Dec 17, 2024
1 parent 6624d3e commit 0e26294
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3785,7 +3785,7 @@ LayerResult GCode::process_layer(
continue;

// Set temperature foreach zone in multi-zone mode
for (int zone = print.config().multi_zone_number.value; zone > 0; zone--) {
for (int zone = print.config().multi_zone_number.get_at(extruder.id()); zone > 0; zone--) {
std::string key = "multi_zone_" + std::to_string(zone) + "_temperature";
//TODO: change this switch with something smart
int temperature = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2842,13 +2842,13 @@ void PrintConfigDef::init_fff_params()
def->mode = comSimple;
def->set_default_value(new ConfigOptionBool(false));

def = this->add("multi_zone_number", coInt);
def = this->add("multi_zone_number", coInts);
def->label = L("Zones");
def->tooltip = L("Number of heating zones");
def->mode = comSimple;
def->mode = comAdvanced;
def->min = 1;
def->max = 10;
def->set_default_value(new ConfigOptionInt(1));
def->set_default_value(new ConfigOptionInts{1});

def = this->add("support_multi_bed_types", coBool);
def->label = L("Support multi bed types");
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(

//Multi zone temps
((ConfigOptionBool, multi_zone))
((ConfigOptionInt, multi_zone_number))
((ConfigOptionInts, multi_zone_number))
((ConfigOptionInts, multi_zone_1_temperature))
((ConfigOptionInts, multi_zone_1_initial_layer))
((ConfigOptionInts, multi_zone_2_temperature))
Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3764,7 +3764,6 @@ void TabPrinter::build_fff()
optgroup->append_single_option_line("gcode_flavor");
optgroup->append_single_option_line("pellet_modded_printer", "pellet-flow-coefficient");
optgroup->append_single_option_line("multi_zone");
optgroup->append_single_option_line("multi_zone_number");
optgroup->append_single_option_line("bbl_use_printhost");
optgroup->append_single_option_line("disable_m73");
option = optgroup->get_option("thumbnails");
Expand Down Expand Up @@ -4331,6 +4330,8 @@ if (is_marlin_flavor)
update();
};

optgroup->append_single_option_line("multi_zone_number");

optgroup = page->new_optgroup(L("Layer height limits"), L"param_layer_height");
optgroup->append_single_option_line("min_layer_height", "", extruder_idx);
optgroup->append_single_option_line("max_layer_height", "", extruder_idx);
Expand Down

0 comments on commit 0e26294

Please sign in to comment.