diff --git a/resources/images/note.svg b/resources/images/note.svg new file mode 100644 index 0000000000..b02fc4b9bf --- /dev/null +++ b/resources/images/note.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index b2a3af767d..b278d1529e 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -765,7 +765,7 @@ static std::vector 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 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 s_Preset_machine_limits_options { @@ -817,7 +817,7 @@ static std::vector 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 s_Preset_sla_print_options { "layer_height", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index bea38502c6..131706c9b7 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -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", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 8a4ac9e013..cf0724c998 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -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"; diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 2507fe7408..37c72e8baf 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -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)) + ) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 666c0fcb57..73f9b101e3 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -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"));