Added nozzle_high_flow, nozzle_high_temperature, filament_abrasive. Updated version of libbgcode.

This commit is contained in:
Lukas Matena 2024-07-18 15:33:16 +02:00
parent d384c5a13f
commit 66b8144f3f
7 changed files with 38 additions and 8 deletions

View File

@ -1,8 +1,8 @@
set(LibBGCode_SOURCE_DIR "" CACHE PATH "Optionally specify local LibBGCode source directory") set(LibBGCode_SOURCE_DIR "" CACHE PATH "Optionally specify local LibBGCode source directory")
set(_source_dir_line set(_source_dir_line
URL https://github.com/prusa3d/libbgcode/archive/8ae75bd0eea622f0e34cae311b3bd065b55eae9b.zip URL https://github.com/prusa3d/libbgcode/archive/a21254e7043b9a9e8f1c89a1d702912b36ad3d4c.zip
URL_HASH SHA256=141a8cea3baea6066527389fda734057181414c4fa296d34501ef8f69ea412e9) URL_HASH SHA256=4ce42e5b3129e3cb976d19c7c14ec8c708758297b27908b62657a57ac07e7fb5)
if (LibBGCode_SOURCE_DIR) if (LibBGCode_SOURCE_DIR)
set(_source_dir_line "SOURCE_DIR;${LibBGCode_SOURCE_DIR};BUILD_ALWAYS;ON") set(_source_dir_line "SOURCE_DIR;${LibBGCode_SOURCE_DIR};BUILD_ALWAYS;ON")

View File

@ -957,8 +957,8 @@ void GCodeGenerator::_do_export(Print& print, GCodeOutputStream &file, Thumbnail
// printer data - this section contains duplicates from the slicer metadata // printer data - this section contains duplicates from the slicer metadata
// that we just created. Find and copy the entries that we want to duplicate. // that we just created. Find and copy the entries that we want to duplicate.
const auto& slicer_metadata = binary_data.slicer_metadata.raw_data; const auto& slicer_metadata = binary_data.slicer_metadata.raw_data;
const std::vector<std::string> keys_to_duplicate = { "printer_model", "filament_type", "nozzle_diameter", "bed_temperature", const std::vector<std::string> keys_to_duplicate = { "printer_model", "filament_type", "filament_abrasive", "nozzle_diameter", "nozzle_high_flow", "nozzle_high_temperature", "bed_temperature",
"brim_width", "fill_density", "layer_height", "temperature", "ironing", "support_material", "extruder_colour" }; "brim_width", "fill_density", "layer_height", "temperature", "ironing", "support_material", "extruder_colour"};
assert(std::is_sorted(slicer_metadata.begin(), slicer_metadata.end(), assert(std::is_sorted(slicer_metadata.begin(), slicer_metadata.end(),
[](const auto& a, const auto& b) { return a.first < b.first; })); [](const auto& a, const auto& b) { return a.first < b.first; }));
for (const std::string& key : keys_to_duplicate) { for (const std::string& key : keys_to_duplicate) {

View File

@ -493,7 +493,7 @@ static std::vector<std::string> s_Preset_print_options {
}; };
static std::vector<std::string> s_Preset_filament_options { static std::vector<std::string> s_Preset_filament_options {
"filament_colour", "filament_diameter", "filament_type", "filament_soluble", "filament_notes", "filament_max_volumetric_speed", "filament_infill_max_speed", "filament_infill_max_crossing_speed", "filament_colour", "filament_diameter", "filament_type", "filament_soluble", "filament_abrasive", "filament_notes", "filament_max_volumetric_speed", "filament_infill_max_speed", "filament_infill_max_crossing_speed",
"extrusion_multiplier", "filament_density", "filament_cost", "filament_spool_weight", "filament_loading_speed", "filament_loading_speed_start", "filament_load_time", "extrusion_multiplier", "filament_density", "filament_cost", "filament_spool_weight", "filament_loading_speed", "filament_loading_speed_start", "filament_load_time",
"filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", "filament_stamping_loading_speed", "filament_stamping_distance", "filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", "filament_stamping_loading_speed", "filament_stamping_distance",
"filament_cooling_initial_speed", "filament_purge_multiplier", "filament_cooling_final_speed", "filament_ramming_parameters", "filament_minimal_purge_on_wipe_tower", "filament_cooling_initial_speed", "filament_purge_multiplier", "filament_cooling_final_speed", "filament_ramming_parameters", "filament_minimal_purge_on_wipe_tower",
@ -532,7 +532,8 @@ static std::vector<std::string> s_Preset_printer_options {
"cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "multimaterial_purging", "cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "multimaterial_purging",
"max_print_height", "default_print_profile", "inherits", "max_print_height", "default_print_profile", "inherits",
"remaining_times", "silent_mode", "remaining_times", "silent_mode",
"machine_limits_usage", "thumbnails", "thumbnails_format" "machine_limits_usage", "thumbnails", "thumbnails_format",
"nozzle_high_flow", "nozzle_high_temperature",
}; };
static std::vector<std::string> s_Preset_sla_print_options { static std::vector<std::string> s_Preset_sla_print_options {

View File

@ -114,6 +114,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"fan_always_on", "fan_always_on",
"fan_below_layer_time", "fan_below_layer_time",
"full_fan_speed_layer", "full_fan_speed_layer",
"filament_abrasive",
"filament_colour", "filament_colour",
"filament_diameter", "filament_diameter",
"filament_density", "filament_density",
@ -126,6 +127,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"first_layer_speed_over_raft", "first_layer_speed_over_raft",
"gcode_comments", "gcode_comments",
"gcode_label_objects", "gcode_label_objects",
"nozzle_high_flow",
"nozzle_high_temperature",
"infill_acceleration", "infill_acceleration",
"layer_gcode", "layer_gcode",
"min_fan_speed", "min_fan_speed",

View File

@ -1370,6 +1370,12 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBools { false }); def->set_default_value(new ConfigOptionBools { false });
def = this->add("filament_abrasive", coBools);
def->label = L("Abrasive material");
def->tooltip = L("TODO");
def->mode = comExpert;
def->set_default_value(new ConfigOptionBools { false });
def = this->add("filament_cost", coFloats); def = this->add("filament_cost", coFloats);
def->label = L("Cost"); def->label = L("Cost");
def->tooltip = L("Enter your filament cost per kg here. This is only for statistical information."); def->tooltip = L("Enter your filament cost per kg here. This is only for statistical information.");
@ -2550,6 +2556,18 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionBools{false}); def->set_default_value(new ConfigOptionBools{false});
def = this->add("nozzle_high_flow", coBools);
def->label = L("High flow nozzle");
def->tooltip = L("TODO");
def->mode = comExpert;
def->set_default_value(new ConfigOptionBools{false});
def = this->add("nozzle_high_temperature", coBools);
def->label = L("High temperature nozzle");
def->tooltip = L("TODO");
def->mode = comExpert;
def->set_default_value(new ConfigOptionBools{false});
def = this->add("retract_lift", coFloats); def = this->add("retract_lift", coFloats);
def->label = L("Lift height"); def->label = L("Lift height");
def->tooltip = L("Lift height applied before travel."); def->tooltip = L("Lift height applied before travel.");
@ -3715,7 +3733,7 @@ void PrintConfigDef::init_extruder_option_keys()
"retract_before_wipe", "retract_restart_extra", "retract_before_travel", "wipe", "retract_before_wipe", "retract_restart_extra", "retract_before_travel", "wipe",
"travel_slope", "travel_max_lift", "travel_ramping_lift", "travel_lift_before_obstacle", "travel_slope", "travel_max_lift", "travel_ramping_lift", "travel_lift_before_obstacle",
"retract_layer_change", "retract_length_toolchange", "retract_restart_extra_toolchange", "extruder_colour", "retract_layer_change", "retract_length_toolchange", "retract_restart_extra_toolchange", "extruder_colour",
"default_filament_profile" "default_filament_profile", "nozzle_high_flow", "nozzle_high_temperature"
}; };
m_extruder_retract_keys = { m_extruder_retract_keys = {

View File

@ -782,6 +782,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloats, filament_density)) ((ConfigOptionFloats, filament_density))
((ConfigOptionStrings, filament_type)) ((ConfigOptionStrings, filament_type))
((ConfigOptionBools, filament_soluble)) ((ConfigOptionBools, filament_soluble))
((ConfigOptionBools, filament_abrasive))
((ConfigOptionFloats, filament_cost)) ((ConfigOptionFloats, filament_cost))
((ConfigOptionFloats, filament_spool_weight)) ((ConfigOptionFloats, filament_spool_weight))
((ConfigOptionFloats, filament_max_volumetric_speed)) ((ConfigOptionFloats, filament_max_volumetric_speed))
@ -825,6 +826,8 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloats, travel_max_lift)) ((ConfigOptionFloats, travel_max_lift))
((ConfigOptionFloats, travel_slope)) ((ConfigOptionFloats, travel_slope))
((ConfigOptionBools, travel_lift_before_obstacle)) ((ConfigOptionBools, travel_lift_before_obstacle))
((ConfigOptionBools, nozzle_high_flow))
((ConfigOptionBools, nozzle_high_temperature))
((ConfigOptionPercents, retract_before_wipe)) ((ConfigOptionPercents, retract_before_wipe))
((ConfigOptionFloats, retract_length)) ((ConfigOptionFloats, retract_length))
((ConfigOptionFloats, retract_length_toolchange)) ((ConfigOptionFloats, retract_length_toolchange))

View File

@ -2227,6 +2227,7 @@ void TabFilament::build()
option.opt.width = Field::def_width(); option.opt.width = Field::def_width();
optgroup->append_single_option_line(option); optgroup->append_single_option_line(option);
optgroup->append_single_option_line("filament_soluble"); optgroup->append_single_option_line("filament_soluble");
optgroup->append_single_option_line("filament_abrasive");
optgroup = page->new_optgroup(L("Print speed override")); optgroup = page->new_optgroup(L("Print speed override"));
optgroup->append_single_option_line("filament_max_volumetric_speed", "max-volumetric-speed_127176"); optgroup->append_single_option_line("filament_max_volumetric_speed", "max-volumetric-speed_127176");
@ -3132,7 +3133,7 @@ const std::vector<std::string> extruder_options = {
"retract_length", "retract_lift", "retract_lift_above", "retract_lift_below", "retract_length", "retract_lift", "retract_lift_above", "retract_lift_below",
"retract_speed", "deretract_speed", "retract_restart_extra", "retract_before_travel", "retract_speed", "deretract_speed", "retract_restart_extra", "retract_before_travel",
"retract_layer_change", "wipe", "retract_before_wipe", "travel_ramping_lift", "retract_layer_change", "wipe", "retract_before_wipe", "travel_ramping_lift",
"travel_slope", "travel_max_lift", "travel_lift_before_obstacle", "travel_slope", "travel_max_lift", "travel_lift_before_obstacle", "nozzle_high_flow", "nozzle_high_temperature",
"retract_length_toolchange", "retract_restart_extra_toolchange", "retract_length_toolchange", "retract_restart_extra_toolchange",
}; };
@ -3195,6 +3196,10 @@ void TabPrinter::build_extruder_pages(size_t n_before_extruders)
update(); update();
}; };
optgroup->append_single_option_line("nozzle_high_flow", "", extruder_idx);
optgroup->append_single_option_line("nozzle_high_temperature", "", extruder_idx);
optgroup = page->new_optgroup(L("Preview")); optgroup = page->new_optgroup(L("Preview"));
auto reset_to_filament_color = [this, extruder_idx](wxWindow*parent) { auto reset_to_filament_color = [this, extruder_idx](wxWindow*parent) {