support profile notes

This commit is contained in:
SoftFever 2023-08-30 23:38:09 +08:00
parent 0c3802ac4c
commit 4564945b48
6 changed files with 69 additions and 4 deletions

View file

@ -0,0 +1,9 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="4.5" y="2.5" width="20" height="22.7097" rx="2.5" stroke="#6B6B6B" stroke-linejoin="round"/>
<path d="M8.06458 8.09668H17.5484" stroke="#6B6B6B" stroke-width="2" stroke-linecap="round"/>
<path d="M20.9354 8.09668H21.6128" stroke="#6B6B6B" stroke-width="2" stroke-linecap="round"/>
<path d="M20.9354 14.1936H21.6128" stroke="#6B6B6B" stroke-width="2" stroke-linecap="round"/>
<path d="M20.9354 20.2905H21.6128" stroke="#6B6B6B" stroke-width="2" stroke-linecap="round"/>
<path d="M8.06458 14.1936H17.5484" stroke="#6B6B6B" stroke-width="2" stroke-linecap="round"/>
<path d="M8.06458 20.2905H17.5484" stroke="#6B6B6B" stroke-width="2" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 769 B

View file

@ -765,7 +765,7 @@ static std::vector<std::string> s_Preset_print_options {
"sparse_infill_acceleration", "internal_solid_infill_acceleration", "tree_support_adaptive_layer_height", "tree_support_auto_brim",
"tree_support_brim_width", "gcode_comments", "gcode_label_objects",
"initial_layer_travel_speed", "exclude_object", "slow_down_layers", "infill_anchor", "infill_anchor_max",
"make_overhang_printable", "make_overhang_printable_angle", "make_overhang_printable_hole_size"
"make_overhang_printable", "make_overhang_printable_angle", "make_overhang_printable_hole_size" ,"notes"
};
@ -790,7 +790,7 @@ static std::vector<std::string> s_Preset_filament_options {
"filament_wipe_distance", "additional_cooling_fan_speed",
"bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high",
//SoftFever
"enable_pressure_advance", "pressure_advance","chamber_temperature", "filament_shrink", "support_material_interface_fan_speed" /*,"filament_seam_gap"*/
"enable_pressure_advance", "pressure_advance","chamber_temperature", "filament_shrink", "support_material_interface_fan_speed", "filament_notes" /*,"filament_seam_gap"*/
};
static std::vector<std::string> s_Preset_machine_limits_options {
@ -817,7 +817,7 @@ static std::vector<std::string> s_Preset_printer_options {
"print_host_webui",
"printhost_cafile","printhost_port","printhost_authorization_type",
"printhost_user", "printhost_password", "printhost_ssl_ignore_revoke", "thumbnails",
"use_firmware_retraction", "use_relative_e_distances"};
"use_firmware_retraction", "use_relative_e_distances", "printer_notes"};
static std::vector<std::string> s_Preset_sla_print_options {
"layer_height",

View file

@ -107,6 +107,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
"filament_diameter",
"filament_density",
"filament_cost",
"filament_notes",
"outer_wall_acceleration",
"inner_wall_acceleration",
"initial_layer_acceleration",

View file

@ -1338,6 +1338,16 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionStrings{ "#F2754E" });
// PS
def = this->add("filament_notes", coStrings);
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 ConfigOptionStrings { "" });
//bbs
def = this->add("required_nozzle_HRC", coInts);
def->label = L("Required nozzle HRC");
@ -2405,6 +2415,16 @@ void PrintConfigDef::init_fff_params()
def->max = 100;
def->set_default_value(new ConfigOptionFloats { 0.4 });
def = this->add("notes", coString);
def->label = L("Configuration notes");
def->tooltip = L("You can put here your personal notes. This text will be added to the G-code "
"header comments.");
def->multiline = true;
def->full_width = true;
def->height = 13;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionString(""));
def = this->add("host_type", coEnum);
def->label = L("Host Type");
def->tooltip = L("Slic3r can upload G-code files to a printer host. This field must contain "
@ -2569,6 +2589,15 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionString());
def->cli = ConfigOptionDef::nocli;
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("printer_variant", coString);
//def->label = L("Printer variant");
def->label = "Printer variant";

View file

@ -1039,6 +1039,11 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionBool, gcode_comments))
((ConfigOptionInt, slow_down_layers))
((ConfigOptionInts, support_material_interface_fan_speed))
// Orca: notes for profiles from PrusaSlicer
((ConfigOptionStrings, filament_notes))
((ConfigOptionString, notes))
((ConfigOptionString, printer_notes))
)

View file

@ -2100,6 +2100,12 @@ void TabPrint::build()
option.opt.is_code = true;
option.opt.height = 15;
optgroup->append_single_option_line(option);
page = add_options_page(L("Notes"), "note");
optgroup = page->new_optgroup(L("Notes"), "note", 0);
option = optgroup->get_option("notes");
option.opt.full_width = true;
option.opt.height = 25;//250;
optgroup->append_single_option_line(option);
#if 0
//page = add_options_page(L("Dependencies"), "advanced.png");
@ -2807,6 +2813,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);
@ -2828,7 +2835,14 @@ void TabFilament::build()
option.opt.is_code = true;
option.opt.height = gcode_field_height;// 150;
optgroup->append_single_option_line(option);
//BBS
page = add_options_page(L("Notes"), "note");
optgroup = page->new_optgroup(L("Notes"),"note", 0);
optgroup->label_width = 0;
option = optgroup->get_option("filament_notes");
option.opt.full_width = true;
option.opt.height = notes_field_height;// 250;
optgroup->append_single_option_line(option);
#if 0
//page = add_options_page(L("Dependencies"), "advanced");
// optgroup = page->new_optgroup(L("Profile dependencies"));
@ -3145,6 +3159,7 @@ void TabPrinter::build_fff()
optgroup->append_single_option_line("auxiliary_fan");
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) {
@ -3214,6 +3229,12 @@ void TabPrinter::build_fff()
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", 0);
option = optgroup->get_option("printer_notes");
option.opt.full_width = true;
option.opt.height = notes_field_height;//250;
optgroup->append_single_option_line(option);
#if 0
//page = add_options_page(L("Dependencies"), "advanced");
// optgroup = page->new_optgroup(L("Profile dependencies"));