Skip to content

Commit

Permalink
Raft changes, GUI part
Browse files Browse the repository at this point in the history
  • Loading branch information
nemart69 authored Feb 9, 2021
1 parent 69aae4a commit 08131f0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
toggle_field("support_material_extruder", have_support_material || have_skirt);
toggle_field("support_material_speed", have_support_material || have_brim || have_skirt);

for (auto el : { "raft_xy_size_compensation", "raft_size_adjust" })
toggle_field(el, have_raft);
for (auto el : { "raft_overhangs", "raft_contact_distance" })
toggle_field(el, have_raft && !have_support_soluble);

bool has_ironing = config->opt_bool("ironing");
for (auto el : { "ironing_type", "ironing_flowrate", "ironing_spacing", "ironing_speed" })
toggle_field(el, has_ironing);
Expand Down
2 changes: 2 additions & 0 deletions src/slic3r/GUI/Field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,8 @@ boost::any& Choice::get_value()
m_value = static_cast<SLAPillarConnectionMode>(ret_enum);
else if (m_opt_id == "printhost_authorization_type")
m_value = static_cast<AuthorizationType>(ret_enum);
else if (m_opt_id == "raft_size_adjust")
m_value = static_cast<RaftSizeAdjust>(ret_enum);
}
else if (m_opt.gui_type == "f_enum_open") {
const int ret_enum = field->GetSelection();
Expand Down
2 changes: 2 additions & 0 deletions src/slic3r/GUI/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
config.set_key_value(opt_key, new ConfigOptionEnum<SLAPillarConnectionMode>(boost::any_cast<SLAPillarConnectionMode>(value)));
else if(opt_key == "printhost_authorization_type")
config.set_key_value(opt_key, new ConfigOptionEnum<AuthorizationType>(boost::any_cast<AuthorizationType>(value)));
else if (opt_key == "raft_size_adjust")
config.set_key_value(opt_key, new ConfigOptionEnum<RaftSizeAdjust>(boost::any_cast<RaftSizeAdjust>(value)));
}
break;
case coPoints:{
Expand Down
3 changes: 3 additions & 0 deletions src/slic3r/GUI/OptionsGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,9 @@ boost::any ConfigOptionsGroup::get_config_value(const DynamicPrintConfig& config
else if (opt_key == "printhost_authorization_type") {
ret = static_cast<int>(config.option<ConfigOptionEnum<AuthorizationType>>(opt_key)->value);
}
else if (opt_key == "raft_size_adjust") {
ret = static_cast<int>(config.option<ConfigOptionEnum<RaftSizeAdjust>>(opt_key)->value);
}
}
break;
case coPoints:
Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
// These values are necessary to construct SlicingParameters by the Canvas3D variable layer height editor.
"layer_height", "first_layer_height", "min_layer_height", "max_layer_height",
"brim_width", "perimeters", "perimeter_extruder", "fill_density", "infill_extruder", "top_solid_layers",
"support_material", "support_material_extruder", "support_material_interface_extruder", "support_material_contact_distance", "raft_layers"
"support_material", "support_material_extruder", "support_material_interface_extruder", "support_material_contact_distance", "raft_layers",
"raft_overhangs", "raft_contact_distance", "raft_xy_size_compensation", "raft_size_adjust"
}))
, sidebar(new Sidebar(q))
, m_ui_jobs(this)
Expand Down
6 changes: 5 additions & 1 deletion src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,11 @@ void TabPrint::build()

optgroup = page->new_optgroup(L("Raft"));
optgroup->append_single_option_line("raft_layers", category_path + "raft-layers");
// # optgroup->append_single_option_line(get_option_("raft_contact_distance");
// RaftingEdition
optgroup->append_single_option_line("raft_overhangs");
optgroup->append_single_option_line("raft_contact_distance");
optgroup->append_single_option_line("raft_xy_size_compensation");
optgroup->append_single_option_line("raft_size_adjust");

optgroup = page->new_optgroup(L("Options for support material and raft"));
optgroup->append_single_option_line("support_material_contact_distance", category_path + "contact-z-distance");
Expand Down

0 comments on commit 08131f0

Please sign in to comment.