ENH: add note in prepare tab

1. Add filament note,process note,printer note

jira:[NEW]

Signed-off-by: XunZhangBambu <xun.zhang@bambulab.com>
Change-Id: I86241a02cf23b54aecda6bdf94e3452cce2d6973
This commit is contained in:
XunZhangBambu 2024-02-18 20:08:15 +08:00 committed by Lane.Wei
parent 044462f8da
commit 7cd2fee5c5
5 changed files with 86 additions and 3 deletions

24
resources/images/note.svg Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="notes">
<g>
<path fill="#808080" d="M11,2l0,12l-9,0L2,2H11 M11,1H2C1.45,1,1,1.45,1,2V14c0,0.55,0.45,1,1,1H11c0.55,0,1-0.45,1-1V2
C12,1.45,11.55,1,11,1L11,1z"/>
</g>
<path fill="#909292" d="M14,3L14,3c-0.55,0-1,0.45-1,1v10c0,0.55,0.45,1,1,1h0c0.55,0,1-0.45,1-1V4C15,3.45,14.55,3,14,3z"/>
<polygon fill="#909292" points="15,4 13,4 14,1 "/>
<g>
<line fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" x1="3" y1="4" x2="10" y2="4"/>
</g>
<g>
<line fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" x1="3" y1="6" x2="10" y2="6"/>
</g>
<g>
<line fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" x1="3" y1="8" x2="10" y2="8"/>
</g>
<g>
<line fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" x1="3" y1="10" x2="7" y2="10"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -827,7 +827,7 @@ static std::vector<std::string> s_Preset_print_options {
"elefant_foot_compensation", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower",
"prime_tower_width", "prime_tower_brim_width", "prime_volume",
"wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits",
"flush_into_infill", "flush_into_objects", "flush_into_support",
"flush_into_infill", "flush_into_objects", "flush_into_support","process_notes",
// BBS
"tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance",
"tree_support_branch_diameter","tree_support_brim_width",
@ -871,7 +871,7 @@ static std::vector<std::string> s_Preset_filament_options {
"filament_wipe_distance", "additional_cooling_fan_speed",
"nozzle_temperature_range_low", "nozzle_temperature_range_high",
//OrcaSlicer
"enable_pressure_advance", "pressure_advance", "chamber_temperatures"
"enable_pressure_advance", "pressure_advance", "chamber_temperatures","filament_notes"
};
static std::vector<std::string> s_Preset_machine_limits_options {
@ -893,7 +893,7 @@ static std::vector<std::string> s_Preset_printer_options {
// BBS
"scan_first_layer", "machine_load_filament_time", "machine_unload_filament_time", "machine_pause_gcode", "template_custom_gcode",
"nozzle_type","auxiliary_fan", "nozzle_volume","upward_compatible_machine", "z_hop_types","support_chamber_temp_control","support_air_filtration","printer_structure","thumbnail_size",
"best_object_pos","head_wrap_detect_zone",
"best_object_pos","head_wrap_detect_zone","printer_notes",
//OrcaSlicer
"host_type", "print_host", "printhost_apikey",
"print_host_webui",

View File

@ -1340,6 +1340,34 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloats{ 0.02 });
def = this->add("filament_notes",coString);
def->label= L("Filament notes");
def->tooltip = L("You can put your notes regarding the filament here.");
def->multiline = true;
def->full_width = true;
def->height = 13;
def->mode =comAdvanced;
def->set_default_value(new ConfigOptionString(""));
def = this->add("process_notes",coString);
def->label= L("Process notes");
def->tooltip = L("You can put your notes regarding the process here.");
def->multiline =true;
def->full_width = true;
def->height = 13;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionString(""));
def = this->add("printer_notes",coString);
def->label = L("Printer notes");
def->tooltip = L("You can put your notes regarding the printer here.");
def->multiline = true;
def->full_width=true;
def->height = 13;
def->mode=comAdvanced;
def->set_default_value(new ConfigOptionString(""));
def = this->add("line_width", coFloat);
def->label = L("Default");
def->category = L("Quality");

View File

@ -872,6 +872,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBools, filament_soluble))
((ConfigOptionBools, filament_is_support))
((ConfigOptionFloats, filament_cost))
((ConfigOptionString, filament_notes))
((ConfigOptionStrings, default_filament_colour))
((ConfigOptionInts, temperature_vitrification)) //BBS
((ConfigOptionFloats, filament_max_volumetric_speed))
@ -991,6 +992,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionFloats, max_layer_height))
((ConfigOptionInts, fan_min_speed))
((ConfigOptionFloats, min_layer_height))
((ConfigOptionString, printer_notes))
((ConfigOptionFloat, printable_height))
((ConfigOptionPoint, best_object_pos))
((ConfigOptionFloats, slow_down_min_speed))
@ -1000,6 +1002,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionString, filename_format))
((ConfigOptionStrings, post_process))
((ConfigOptionString, printer_model))
((ConfigOptionString, process_notes))
((ConfigOptionFloat, resolution))
((ConfigOptionFloats, retraction_minimum_travel))
((ConfigOptionBools, retract_when_changing_layer))

View File

@ -2125,6 +2125,13 @@ void TabPrint::build()
option.opt.height = 15;
optgroup->append_single_option_line(option);
optgroup = page->new_optgroup(L("Notes"),"note");
optgroup->label_width = 0;
option = optgroup->get_option("process_notes");
option.opt.full_width = true;
option.opt.height = 25;
optgroup->append_single_option_line(option);
#if 0
//page = add_options_page(L("Dependencies"), "advanced.png");
// optgroup = page->new_optgroup(L("Profile dependencies"));
@ -3074,6 +3081,7 @@ void TabFilament::build()
#endif
const int gcode_field_height = 15; // 150
const int notes_field_height = 25; // 250
page = add_options_page(L("Advanced"), "advanced");
optgroup = page->new_optgroup(L("Filament start G-code"), L"param_gcode", 0);
@ -3095,6 +3103,15 @@ void TabFilament::build()
option.opt.is_code = true;
option.opt.height = gcode_field_height;// 150;
optgroup->append_single_option_line(option);
page = add_options_page(L("Notes"), "note");
optgroup = page->new_optgroup(L("Notes"),"note");
optgroup->label_width = 0;
option = optgroup->get_option("filament_notes");
option.opt.full_width = true;
option.opt.height = notes_field_height;
optgroup->append_single_option_line(option);
//BBS
#if 0
//page = add_options_page(L("Dependencies"), "advanced");
@ -3427,6 +3444,8 @@ void TabPrinter::build_fff()
optgroup->append_single_option_line("support_air_filtration");
const int gcode_field_height = 15; // 150
const int notes_field_height = 25; // 250
page = add_options_page(L("Machine gcode"), "cog");
optgroup = page->new_optgroup(L("Machine start G-code"), L"param_gcode", 0);
optgroup->m_on_change = [this, optgroup](const t_config_option_key& opt_key, const boost::any& value) {
@ -3524,6 +3543,15 @@ void TabPrinter::build_fff()
// build_preset_description_line(optgroup.get());
#endif
page = add_options_page(L("Notes"),"note");
optgroup = page->new_optgroup(L("Notes"),"note");
optgroup->label_width = 0;
option = optgroup->get_option("printer_notes");
option.opt.full_width = true;
option.opt.height = notes_field_height;
optgroup->append_single_option_line(option);
build_unregular_pages(true);
}