Profile rework (#4)

* default BBL profile

* voron

* wip

* Voron profile

* Prusa MK3S

* add Prusa mk3s

* fix an issue that print_host value was not retrieved.

* add chamber temperature option for filament

* slightly adjust thumbernail angle

* Revert "slightly adjust thumbernail angle"

This reverts commit 6ad38efb36.

* add `one wall on first layer` option

* save preset for connection

* remove unused options

* set default 3000 accl for MK3S

* tweak profile

* update Voron logo

* UI twwaks

* Readme update

* change abs default nozzle temp

* misc

* tweak profiles

* Update README
This commit is contained in:
SoftFever 2022-08-24 15:40:43 +08:00 committed by GitHub
parent 488b1cd8f5
commit a3b3b368e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
138 changed files with 3317 additions and 461 deletions

View file

@ -1510,6 +1510,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_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("chamber_temperature",new ConfigOptionInt(m_config.chamber_temperature));
//BBS: calculate the volumetric speed of outer wall. Ignore pre-object setting and multi-filament, and just use the default setting
{

View file

@ -394,7 +394,10 @@ void PerimeterGenerator::process()
for (const Surface &surface : this->slices->surfaces) {
// detect how many perimeters must be generated for this island
int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops
//BBS: force the topmost layer to be one wall
if (this->layer_id == 0 && this->config->only_one_wall_first_layer)
loop_number = 0;
// BBS: force the topmost layer to be one wall
if (loop_number > 0 && this->upper_slices == nullptr)
loop_number = 0;

View file

@ -682,14 +682,14 @@ static std::vector<std::string> s_Preset_print_options {
"detect_narrow_internal_solid_infill",
"gcode_add_line_number", "enable_arc_fitting", "infill_combination", "adaptive_layer_height",
"support_bottom_interface_spacing", "enable_overhang_speed", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed",
"initial_layer_infill_speed", "only_one_wall_top",
"initial_layer_infill_speed", "only_one_wall_top", "only_one_wall_first_layer",
"timelapse_no_toolhead"
};
static std::vector<std::string> s_Preset_filament_options {
/*"filament_colour", */"filament_diameter", "filament_type", "filament_soluble", "filament_is_support", "filament_max_volumetric_speed",
"filament_flow_ratio", "filament_density", "filament_cost", "filament_minimal_purge_on_wipe_tower",
"nozzle_temperature", "nozzle_temperature_initial_layer",
"chamber_temperature", "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",
// "bed_type",
@ -726,7 +726,7 @@ static std::vector<std::string> s_Preset_printer_options {
"scan_first_layer", "machine_load_filament_time", "machine_unload_filament_time", "machine_pause_gcode",
"nozzle_type", "auxiliary_fan", "nozzle_volume",
//SoftFever
"connection_moonraker_url","connection_port", "host_type", "print_host", "printhost_apikey",
"host_type", "print_host", "printhost_apikey",
"printhost_cafile","printhost_port","printhost_authorization_type",
"printhost_user",
"printhost_password",

View file

@ -2788,7 +2788,7 @@ std::pair<PresetsConfigSubstitutions, size_t> PresetBundle::load_vendor_configs_
//parse error
std::string subfile_path = path + "/" + vendor_name + "/" + subfile.second;
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(", got error when parse process setting from %1%") % subfile_path;
throw ConfigurationError((boost::format("Failed loading configuration file %1%\nSuggest cleaning the directory %2% firstly") % subfile_path %vendor_system_path).str());
throw ConfigurationError((boost::format("Failed loading configuration file %1%\nSuggest cleaning the directory %2% firstly.\nReason: %3%") % subfile_path %vendor_system_path %reason).str());
}
}

View file

@ -126,7 +126,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
// BBS
"wipe_distance",
"curr_bed_type",
"nozzle_volume"
"nozzle_volume",
"chamber_temperature"
};
static std::unordered_set<std::string> steps_ignore;
@ -163,6 +164,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
} else if (
opt_key == "print_sequence"
|| opt_key == "filament_type"
|| opt_key == "chamber_temperature"
|| opt_key == "nozzle_temperature_initial_layer"
|| opt_key == "filament_minimal_purge_on_wipe_tower"
|| opt_key == "filament_max_volumetric_speed"

View file

@ -322,21 +322,6 @@ void PrintConfigDef::init_common_params()
def->mode = comDevelop;
def->set_default_value(new ConfigOptionStrings());
//SoftFever
def = this->add("connection_moonraker_url", coString);
def->label = L("Moonraker URL");
//def->tooltip = L("Names of presets related to the physical printer");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionString("http://"));
def = this->add("connection_port", coString);
def->label = L("Connection port");
//def->tooltip = L("Names of presets related to the physical printer");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionString("7125"));
def = this->add("print_host", coString);
def->label = L("Hostname, IP or URL");
def->tooltip = L("Slic3r can upload G-code files to a printer host. This field should contain "
@ -602,6 +587,12 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Use only one wall on flat top surface, to give more space to the top infill pattern");
def->set_default_value(new ConfigOptionBool(true));
def = this->add("only_one_wall_first_layer", coBool);
def->label = L("Only one wall on first layer");
def->category = L("Quality");
def->tooltip = L("Use only one wall on first layer, to give more space to the bottom infill pattern");
def->set_default_value(new ConfigOptionBool(false));
def = this->add("enable_overhang_speed", coBool);
def->label = L("Slow down for overhang");
def->category = L("Speed");
@ -2476,6 +2467,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("chamber_temperature", coInt);
def->label = L("Chamber temperature");
def->tooltip = L("Target chamber temperature");
def->sidetext = L("°C");
def->full_label = L("Chamber temperature");
def->min = 0;
def->max = max_temp;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("nozzle_temperature", coInts);
def->label = L("Other layers");
def->tooltip = L("Nozzle temperature for layers after the initial one");

View file

@ -682,6 +682,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, overhang_3_4_speed))
((ConfigOptionFloat, overhang_4_4_speed))
((ConfigOptionBool, only_one_wall_top))
((ConfigOptionBool, only_one_wall_first_layer))
)
PRINT_CONFIG_CLASS_DEFINE(
@ -766,10 +767,6 @@ PRINT_CONFIG_CLASS_DEFINE(
//BBS
((ConfigOptionEnum<NozzleType>, nozzle_type))
((ConfigOptionBool, auxiliary_fan))
//SoftFever
((ConfigOptionString, connection_moonraker_url))
((ConfigOptionString, connection_port))
)
// This object is mapped to Perl as Slic3r::Config::Print.
@ -839,6 +836,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionBool, spiral_mode))
((ConfigOptionInt, standby_temperature_delta))
((ConfigOptionInts, nozzle_temperature))
((ConfigOptionInt , chamber_temperature))
((ConfigOptionBools, wipe))
// BBS
((ConfigOptionInts, bed_temperature_difference))

View file

@ -630,6 +630,7 @@ bool PrintObject::invalidate_state_by_config_options(
} else if (
opt_key == "wall_loops"
|| opt_key == "only_one_wall_top"
|| opt_key == "only_one_wall_first_layer"
|| opt_key == "initial_layer_line_width"
|| opt_key == "inner_wall_line_width"
|| opt_key == "infill_wall_overlap") {

View file

@ -1115,7 +1115,7 @@ bool MainFrame::can_send_gcode() const
{
if (m_plater && !m_plater->model().objects.empty())
{
auto cfg = wxGetApp().preset_bundle->printers.get_selected_preset().config;
auto cfg = wxGetApp().preset_bundle->printers.get_edited_preset().config;
if (const auto *print_host_opt = cfg.option<ConfigOptionString>("print_host"); print_host_opt)
return !print_host_opt->value.empty();
}
@ -1309,6 +1309,18 @@ wxBoxSizer* MainFrame::create_side_tools()
p->Dismiss();
});
SideButton* send_gcode_btn = new SideButton(p, _L("Send"), "");
send_gcode_btn->SetCornerRadius(0);
send_gcode_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Send to print"));
m_print_select = eSendGcode;
if (m_print_enable)
m_print_enable = get_enable_print_status() && can_send_gcode();
m_print_btn->Enable(m_print_enable);
this->Layout();
p->Dismiss();
});
SideButton* export_sliced_file_3mf_btn = new SideButton(p, _L("Export sliced file (.3mf)"), "");
export_sliced_file_3mf_btn->SetCornerRadius(0);
export_sliced_file_3mf_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
@ -1332,25 +1344,14 @@ wxBoxSizer* MainFrame::create_side_tools()
this->Layout();
p->Dismiss();
});
SideButton* send_gcode_btn = new SideButton(p, _L("Send sliced file (.gcode)"), "");
send_gcode_btn->SetCornerRadius(0);
send_gcode_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Send Sliced File (.gcode)"));
m_print_select = eSendGcode;
if (m_print_enable)
m_print_enable = get_enable_print_status() && can_send_gcode();
m_print_btn->Enable(m_print_enable);
this->Layout();
p->Dismiss();
});
#if ENABEL_PRINT_ALL
p->append_button(print_all_btn);
#endif
p->append_button(print_plate_btn);
p->append_button(send_gcode_btn);
p->append_button(export_sliced_file_3mf_btn);
p->append_button(export_sliced_file_gcode_btn);
p->append_button(send_gcode_btn);
p->Popup(m_print_btn);
}
);

View file

@ -395,7 +395,8 @@ void PhysicalPrinterDialog::on_dpi_changed(const wxRect& suggested_rect)
void PhysicalPrinterDialog::OnOK(wxEvent& event)
{
event.Skip();
wxGetApp().get_tab(Preset::TYPE_PRINTER)->save_preset();
event.Skip();
}
}} // namespace Slic3r::GUI

View file

@ -37,7 +37,7 @@ static const char *CONFIG_KEY_PATH = "printhost_path";
static const char *CONFIG_KEY_GROUP = "printhost_group";
PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUploadActions post_actions, const wxArrayString &groups)
: MsgDialog(static_cast<wxWindow*>(wxGetApp().mainframe), _L("Send G-Code to printer host"), _L("Upload to Printer Host with the following filename:"),0)
: MsgDialog(static_cast<wxWindow*>(wxGetApp().mainframe), _L("Send to print"), _L("Upload to Printer Host with the following filename:"),0)
, txt_filename(new wxTextCtrl(this, wxID_ANY))
, combo_groups(!groups.IsEmpty() ? new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, groups, wxCB_READONLY) : nullptr)
, post_upload_action(PrintHostPostUploadAction::None)

View file

@ -1745,6 +1745,7 @@ void TabPrint::build()
optgroup->append_single_option_line("wall_infill_order");
optgroup->append_single_option_line("bridge_flow");
optgroup->append_single_option_line("only_one_wall_top");
optgroup->append_single_option_line("only_one_wall_first_layer");
optgroup->append_single_option_line("detect_overhang_wall");
optgroup->append_single_option_line("reduce_crossing_wall");
optgroup->append_single_option_line("max_travel_detour_distance");
@ -2413,6 +2414,10 @@ void TabFilament::build()
optgroup = page->new_optgroup(L("Print temperature"));
optgroup->split_multi_line = true;
optgroup->option_label_at_right = true;
line = { L("Chamber temperature"), L("Chamber temperature") };
line.append_option(optgroup->get_option("chamber_temperature"));
optgroup->append_line(line);
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"));