Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2022-02-19 21:08:10 +0300
committersupermerill <merill@free.fr>2022-02-21 14:39:48 +0300
commitdd468a5f4671b97b9eb3246cb3473239ee54197d (patch)
tree034ae8941267c10c1e203dc48cb8c8f270783630
parent9c568f80e57368bea1f2ec101e02b7ab943cce50 (diff)
Change mode into tag
- add prusa /susi tags - add missing sla option - fix text color
-rw-r--r--resources/ui_layout/colors.ini7
-rw-r--r--resources/ui_layout/print.as6
-rw-r--r--resources/ui_layout/printer_sla.ui11
-rw-r--r--src/libslic3r/AppConfig.cpp76
-rw-r--r--src/libslic3r/AppConfig.hpp19
-rw-r--r--src/libslic3r/Config.cpp2
-rw-r--r--src/libslic3r/Config.hpp38
-rw-r--r--src/libslic3r/Preset.cpp4
-rw-r--r--src/libslic3r/PrintConfig.cpp1282
-rw-r--r--src/libslic3r/PrintConfig.hpp2
-rw-r--r--src/slic3r/CMakeLists.txt2
-rw-r--r--src/slic3r/GUI/BitmapCache.cpp76
-rw-r--r--src/slic3r/GUI/BitmapCache.hpp1
-rw-r--r--src/slic3r/GUI/GUI_App.cpp34
-rw-r--r--src/slic3r/GUI/GUI_App.hpp4
-rw-r--r--src/slic3r/GUI/GUI_Tags.cpp235
-rw-r--r--src/slic3r/GUI/GUI_Tags.hpp91
-rw-r--r--src/slic3r/GUI/ImGuiWrapper.cpp5
-rw-r--r--src/slic3r/GUI/MainFrame.cpp2
-rw-r--r--src/slic3r/GUI/Notebook.cpp13
-rw-r--r--src/slic3r/GUI/Notebook.hpp8
-rw-r--r--src/slic3r/GUI/OG_CustomCtrl.cpp19
-rw-r--r--src/slic3r/GUI/OptionsGroup.cpp22
-rw-r--r--src/slic3r/GUI/Plater.cpp4
-rw-r--r--src/slic3r/GUI/Preferences.cpp2
-rw-r--r--src/slic3r/GUI/Search.cpp53
-rw-r--r--src/slic3r/GUI/Search.hpp6
-rw-r--r--src/slic3r/GUI/Tab.cpp36
-rw-r--r--src/slic3r/GUI/Tab.hpp1
-rw-r--r--src/slic3r/GUI/wxExtensions.cpp147
-rw-r--r--src/slic3r/GUI/wxExtensions.hpp75
31 files changed, 1303 insertions, 980 deletions
diff --git a/resources/ui_layout/colors.ini b/resources/ui_layout/colors.ini
index 9a39bce6b..9c615365c 100644
--- a/resources/ui_layout/colors.ini
+++ b/resources/ui_layout/colors.ini
@@ -24,3 +24,10 @@ splash_screen_editor = cars.jpg
splash_screen_gcodeviewer = prusa-gcodepreview.jpg
Gui_plater = 3C3C3C
Gui_plater_grid = D0D0D0
+Tag_Simple = 7DF028
+Tag_Advanced = FFDC00
+Tag_Expert = E70000
+Tag_SuSi = 2172eb
+Tag_Prusa = ED6B21
+#Tag_Teal = 00E7E7
+#Tag_Pink = E700D7
diff --git a/resources/ui_layout/print.as b/resources/ui_layout/print.as
index 17b03de36..83a06432e 100644
--- a/resources/ui_layout/print.as
+++ b/resources/ui_layout/print.as
@@ -149,6 +149,12 @@ void s_not_thick_bridge_set(bool set)
}
}
+//TODO to replicate prusa:
+// brim_type
+// cooling
+// xy compensation (both)
+// seam position
+
//test:
// setting:script:bool:easy:depends$enforce_full_fill_volume:label$fullfill-lol:s_fullfill
diff --git a/resources/ui_layout/printer_sla.ui b/resources/ui_layout/printer_sla.ui
index 8cebba6c6..0619cdc10 100644
--- a/resources/ui_layout/printer_sla.ui
+++ b/resources/ui_layout/printer_sla.ui
@@ -1,7 +1,5 @@
page:General:printer
-group:Output Method
- setting:output_format
group:Size and coordinates
bed_shape
setting:max_print_height
@@ -26,9 +24,9 @@ group:Tilt
setting:area_fill
group:Corrections
line:Printer scaling correction
- setting:label$X:id$0:relative_correction
- setting:label$Y:id$1:relative_correction
- setting:label$Z:id$2:relative_correction
+ setting:label$X:relative_correction_x
+ setting:label$Y:relative_correction_y
+ setting:label$Z:relative_correction_z
end_line
setting:absolute_correction
setting:first_layer_size_compensation
@@ -39,6 +37,9 @@ group:Exposure
setting:max_exposure_time
setting:min_initial_exposure_time
setting:max_initial_exposure_time
+group:Output
+ setting:output_format
+ setting:sla_output_precision
group:Thumbnails
line:Size for Gcode
setting:id$0:label$Small:thumbnails
diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp
index 2ef250bcf..e018b89ef 100644
--- a/src/libslic3r/AppConfig.cpp
+++ b/src/libslic3r/AppConfig.cpp
@@ -47,19 +47,7 @@ void AppConfig::reset()
set_defaults();
};
-typedef struct {
- double r; // a fraction between 0 and 1
- double g; // a fraction between 0 and 1
- double b; // a fraction between 0 and 1
-} rgb;
-
-typedef struct {
- double h; // angle in degrees
- double s; // a fraction between 0 and 1
- double v; // a fraction between 0 and 1
-} hsv;
-
-hsv rgb2hsv(rgb in)
+AppConfig::hsv AppConfig::rgb2hsv(AppConfig::rgb in)
{
hsv out;
double min, max, delta;
@@ -104,7 +92,7 @@ hsv rgb2hsv(rgb in)
}
-rgb hsv2rgb(hsv in)
+AppConfig::rgb AppConfig::hsv2rgb(AppConfig::hsv in)
{
double hh, p, q, t, ff;
long i;
@@ -162,9 +150,47 @@ rgb hsv2rgb(hsv in)
return out;
}
-uint32_t AppConfig::create_color(float saturation, float value, EAppColorType color_template)
+uint32_t AppConfig::hex2int(const std::string& hex)
{
uint32_t int_color;
+ if (hex.empty() || !(hex.size() == 6 || hex.size() == 7)) {
+ int_color = 0x2172eb;
+ } else {
+ std::stringstream ss;
+ ss << std::hex << (hex[0] == '#' ? hex.substr(1) : hex);
+ ss >> int_color;
+ }
+ return int_color;
+}
+
+std::string AppConfig::int2hex(uint32_t int_color)
+{
+ std::stringstream ss;
+ ss << std::hex << ((int_color & 0xFF0000) >> 16);
+ ss << std::hex << ((int_color & 0xFF00) >> 8) ;
+ ss << std::hex << ((int_color & 0xFF));
+ return ss.str();
+}
+
+AppConfig::rgb AppConfig::int2rgb(uint32_t int_color)
+{
+ return AppConfig::rgb{
+ ((int_color & 0xFF0000) >> 16) / 255.,
+ ((int_color & 0xFF00) >> 8) / 255.,
+ ((int_color & 0xFF)) / 255.,
+ };
+}
+uint32_t AppConfig::rgb2int(AppConfig::rgb rgb_color)
+{
+ uint32_t int_color = 0;
+ int_color |= std::min(255, int(rgb_color.r * 255));
+ int_color |= std::min(255, int(rgb_color.g * 255)) << 8;
+ int_color |= std::min(255, int(rgb_color.b * 255)) << 16;
+ return int_color;
+}
+
+uint32_t AppConfig::create_color(float saturation, float value, EAppColorType color_template)
+{
std::string hex_str;
switch (color_template) {
case EAppColorType::Highlight:
@@ -179,18 +205,8 @@ uint32_t AppConfig::create_color(float saturation, float value, EAppColorType co
break;
}
- if (hex_str.empty() || hex_str.size() != 6) {
- int_color = 0x2172eb;
- } else {
- std::stringstream ss;
- ss << std::hex << hex_str;
- ss >> int_color;
- }
- rgb rgb_color = {
- ((int_color & 0xFF0000) >> 16) / 255.,
- ((int_color & 0xFF00) >> 8) / 255.,
- ((int_color & 0xFF)) / 255.,
- };
+ uint32_t int_color = hex2int(hex_str);
+ rgb rgb_color = int2rgb(int_color);
hsv hsv_color = rgb2hsv(rgb_color);
//modify h& v
@@ -202,11 +218,7 @@ uint32_t AppConfig::create_color(float saturation, float value, EAppColorType co
rgb_color = hsv2rgb(hsv_color);
//use the other endian style
- int_color = 0;
- int_color |= std::min(255, int(rgb_color.r * 255));
- int_color |= std::min(255, int(rgb_color.g * 255)) << 8;
- int_color |= std::min(255, int(rgb_color.b * 255)) << 16;
- return int_color;
+ return rgb2int(rgb_color);
}
// Override missing or keys with their defaults.
diff --git a/src/libslic3r/AppConfig.hpp b/src/libslic3r/AppConfig.hpp
index 946680ea6..e814374cd 100644
--- a/src/libslic3r/AppConfig.hpp
+++ b/src/libslic3r/AppConfig.hpp
@@ -28,6 +28,18 @@ public:
Highlight,
};
+ typedef struct {
+ double r; // a fraction between 0 and 1
+ double g; // a fraction between 0 and 1
+ double b; // a fraction between 0 and 1
+ } rgb;
+
+ typedef struct {
+ double h; // angle in degrees
+ double s; // a fraction between 0 and 1
+ double v; // a fraction between 0 and 1
+ } hsv;
+
explicit AppConfig(EAppMode mode) :
m_mode(mode)
{
@@ -135,6 +147,13 @@ public:
// create color
uint32_t create_color(float saturation, float value, EAppColorType color_template = EAppColorType::Main);
+ //utility color methods
+ static hsv rgb2hsv(rgb in);
+ static rgb hsv2rgb(hsv in);
+ static uint32_t hex2int(const std::string& hex);
+ static std::string int2hex(uint32_t int_color);
+ static rgb int2rgb(uint32_t int_color);
+ static uint32_t rgb2int(rgb rgb_color);
// reset the current print / filament / printer selections, so that
// the PresetBundle::load_selections(const AppConfig &config) call will select
diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp
index 018428154..72afd3ec7 100644
--- a/src/libslic3r/Config.cpp
+++ b/src/libslic3r/Config.cpp
@@ -67,6 +67,8 @@ std::string toString(OptionCategory opt) {
return "error";
}
+std::map<std::string, ConfigOptionMode> ConfigOptionDef::names_2_tag_mode = { {"Simple",comSimple},{"Advanced",comAdvanced},{"Expert",comExpert},{"Prusa",comPrusa},{"SuSi",comSuSi} };
+
// Escape \n, \r and backslash
std::string escape_string_cstyle(const std::string &str)
{
diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp
index b65fa25b8..d05aca283 100644
--- a/src/libslic3r/Config.hpp
+++ b/src/libslic3r/Config.hpp
@@ -242,11 +242,34 @@ enum ConfigOptionType : uint16_t{
coEnum = 9,
};
-enum ConfigOptionMode {
- comSimple = 0,
- comAdvanced,
- comExpert
+enum ConfigOptionMode : uint64_t {
+ comNone = 0,
+ comSimple = 1,
+ comAdvanced = 1 << 1,
+ comExpert = 1 << 2,
+ comAdvancedE = comAdvanced | comExpert,
+ comSimpleAE = comSimple | comAdvanced | comExpert,
+ comPrusa = 1 << 3,
+ comSuSi = 1 << 4,
+ comHidden = 1 << 5,
+
};
+//note: you have to add ConfigOptionMode into the ConfigOptionDef::names_2_tag_mode (in the .cpp)
+inline ConfigOptionMode operator|(ConfigOptionMode a, ConfigOptionMode b) {
+ return static_cast<ConfigOptionMode>(static_cast<uint64_t>(a) | static_cast<uint64_t>(b));
+}
+inline ConfigOptionMode operator&(ConfigOptionMode a, ConfigOptionMode b) {
+ return static_cast<ConfigOptionMode>(static_cast<uint64_t>(a) & static_cast<uint64_t>(b));
+}
+inline ConfigOptionMode operator^(ConfigOptionMode a, ConfigOptionMode b) {
+ return static_cast<ConfigOptionMode>(static_cast<uint64_t>(a) ^ static_cast<uint64_t>(b));
+}
+inline ConfigOptionMode operator|=(ConfigOptionMode& a, ConfigOptionMode b) {
+ a = a | b; return a;
+}
+inline ConfigOptionMode operator&=(ConfigOptionMode& a, ConfigOptionMode b) {
+ a = a & b; return a;
+}
enum PrinterTechnology : uint8_t
{
@@ -1949,7 +1972,8 @@ public:
FloatOrPercent max_literal = FloatOrPercent{ 0., false };
// max precision after the dot, only for display
int precision = 6;
- ConfigOptionMode mode = comSimple;
+ // flags for which it can appear (64b flags)
+ ConfigOptionMode mode = comNone;
// Legacy names for this configuration option.
// Used when parsing legacy configuration file.
std::vector<t_config_option_key> aliases;
@@ -1986,6 +2010,10 @@ public:
// Assign this key to cli to disable CLI for this option.
static const constexpr char *nocli = "~~~noCLI";
+
+
+ static std::map<std::string, ConfigOptionMode> names_2_tag_mode;
+ //static void init_mode();
};
inline bool operator<(const ConfigSubstitution &lhs, const ConfigSubstitution &rhs) throw() {
diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp
index 6e2163913..1b08ab055 100644
--- a/src/libslic3r/Preset.cpp
+++ b/src/libslic3r/Preset.cpp
@@ -714,7 +714,6 @@ static std::vector<std::string> s_Preset_filament_options {
"filament_dip_extraction_speed", //skinnydip params end
"temperature", "first_layer_temperature", "bed_temperature", "first_layer_bed_temperature",
"full_fan_speed_layer",
- "cooling",
"fan_always_on",
"min_fan_speed",
"max_fan_speed",
@@ -880,7 +879,6 @@ static std::vector<std::string> s_Preset_sla_material_options {
static std::vector<std::string> s_Preset_sla_printer_options {
"printer_technology",
- "output_format",
"bed_shape", "bed_custom_texture", "bed_custom_model", "max_print_height",
"display_width", "display_height", "display_pixels_x", "display_pixels_y",
"display_mirror_x", "display_mirror_y",
@@ -896,6 +894,8 @@ static std::vector<std::string> s_Preset_sla_printer_options {
"gamma_correction",
"min_exposure_time", "max_exposure_time",
"min_initial_exposure_time", "max_initial_exposure_time",
+ "output_format",
+ "sla_output_precision",
//FIXME the print host keys are left here just for conversion from the Printer preset to Physical Printer preset.
"print_host", "printhost_apikey", "printhost_cafile", "printhost_port",
"printer_custom_variables", // only for scripted widgets
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp
index 81a0d384a..08d3a0c71 100644
--- a/src/libslic3r/PrintConfig.cpp
+++ b/src/libslic3r/PrintConfig.cpp
@@ -338,6 +338,7 @@ void PrintConfigDef::init_common_params()
def->tooltip = L("Printer technology");
def->category = OptionCategory::general;
def->enum_keys_map = &ConfigOptionEnum<PrinterTechnology>::get_enum_values();
+ def->mode = comSimpleAE | comPrusa;
def->enum_values.push_back("FFF");
def->enum_values.push_back("SLA");
def->set_default_value(new ConfigOptionEnum<PrinterTechnology>(ptFFF));
@@ -345,25 +346,25 @@ void PrintConfigDef::init_common_params()
def = this->add("bed_shape", coPoints);
def->label = L("Bed shape");
def->category = OptionCategory::general;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionPoints{ Vec2d(0, 0), Vec2d(200, 0), Vec2d(200, 200), Vec2d(0, 200) });
def = this->add("bed_custom_texture", coString);
def->label = L("Bed custom texture");
def->category = OptionCategory::general;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("bed_custom_model", coString);
def->label = L("Bed custom model");
def->category = OptionCategory::general;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("thumbnails", coPoints);
def->label = L("Thumbnails size");
def->tooltip = L("Picture sizes to be stored into a .gcode and .sl1 / .sl1s files, in the following format: \"XxY, XxY, ...\"");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->min = 0;
def->max = 2048;
//def->gui_type = ConfigOptionDef::GUIType::one_string; // i prefer two boxes
@@ -375,33 +376,33 @@ void PrintConfigDef::init_common_params()
def->category = OptionCategory::filament;
def->tooltip = L("This is the color that will be enforced on objects in the thumbnails.");
def->gui_type = ConfigOptionDef::GUIType::color;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionString("#018aff"));
def = this->add("thumbnails_custom_color", coBool);
def->label = L("Enforce thumbnail color");
def->tooltip = L("Enforce a specific color on thumbnails."
" If not enforced, their color will be the one defined by the filament.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("thumbnails_end_file", coBool);
def->label = L("Print at the end");
def->tooltip = L("Print the thumbnail code at the end of the gcode file instead of the front."
"\nBe careful! Most firmwares expect it at the front, so be sure that your firmware support it.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("thumbnails_with_bed", coBool);
def->label = L("Bed on thumbnail");
def->tooltip = L("Show the bed texture on the thumbnail picture.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("thumbnails_format", coEnum);
def->label = L("Format of G-code thumbnails");
def->tooltip = L("Format of G-code thumbnails: PNG for best quality, JPG for smallest size, QOI for low memory firmware");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->enum_keys_map = &ConfigOptionEnum<GCodeThumbnailsFormat>::get_enum_values();
def->enum_values.push_back("PNG");
def->enum_values.push_back("JPG");
@@ -416,7 +417,7 @@ void PrintConfigDef::init_common_params()
def = this->add("thumbnails_with_support", coBool);
def->label = L("Support on thumbnail");
def->tooltip = L("Show the supports (and pads) on the thumbnail picture.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("layer_height", coFloat);
@@ -426,7 +427,7 @@ void PrintConfigDef::init_common_params()
"Thinner layers give better accuracy but take more time to print.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.2));
def = this->add("max_print_height", coFloat);
@@ -435,7 +436,7 @@ void PrintConfigDef::init_common_params()
def->tooltip = L("Set this to the maximum height that can be reached by your extruder while printing.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(200.0));
def = this->add("slice_closing_radius", coFloat);
@@ -446,7 +447,7 @@ void PrintConfigDef::init_common_params()
def->sidetext = L("mm");
def->min = 0;
def->precision = 8;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.049));
def = this->add("print_host", coString);
@@ -456,7 +457,7 @@ void PrintConfigDef::init_common_params()
"the hostname, IP address or URL of the printer host instance. "
"Print host behind HAProxy with basic auth enabled can be accessed by putting the user name and password into the URL "
"in the following format: https://username:password@your-octopi-address/");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
@@ -465,7 +466,7 @@ void PrintConfigDef::init_common_params()
def->category = OptionCategory::general;
def->tooltip = L("Slic3r can upload G-code files to a printer host. This field should contain "
"the API Key or the password required for authentication.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
@@ -473,7 +474,7 @@ void PrintConfigDef::init_common_params()
def->label = L("Printer");
def->tooltip = L("Name of the printer");
def->gui_type = ConfigOptionDef::GUIType::select_open;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
@@ -482,7 +483,7 @@ void PrintConfigDef::init_common_params()
def->category = OptionCategory::general;
def->tooltip = L("Custom CA certificate file can be specified for HTTPS OctoPrint connections, in crt/pem format. "
"If left blank, the default OS CA certificate repository is used.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
@@ -491,7 +492,7 @@ void PrintConfigDef::init_common_params()
def->category = OptionCategory::general;
def->tooltip = L("Custom Client certificate file can be specified for 2-way ssl authentication, in p12/pfx format. "
"If left blank, no client certificate is used.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionString(""));
// Options used by physical printers
@@ -499,14 +500,14 @@ void PrintConfigDef::init_common_params()
def = this->add("printhost_user", coString);
def->label = L("User");
// def->tooltip = L("");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
def = this->add("printhost_password", coString);
def->label = L("Password");
// def->tooltip = L("");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionString(""));
@@ -515,14 +516,14 @@ void PrintConfigDef::init_common_params()
def->label = L("Ignore HTTPS certificate revocation checks");
def->tooltip = L("Ignore HTTPS certificate revocation checks in case of missing or offline distribution points. "
"One may want to enable this option for self signed certificates if connection fails.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("preset_names", coStrings);
def->label = L("Printer preset names");
def->tooltip = L("Names of presets related to the physical printer");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionStrings{});
def = this->add("printhost_authorization_type", coEnum);
@@ -533,7 +534,7 @@ void PrintConfigDef::init_common_params()
def->enum_values.push_back("user");
def->enum_labels.push_back(L("API key"));
def->enum_labels.push_back(L("HTTP digest"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionEnum<AuthorizationType>(atKeyPassword));
@@ -556,7 +557,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Allow empty layers");
def->category = OptionCategory::slicing;
def->tooltip = L("Prevent the gcode builder from triggering an exception if a full layer is empty, and allow the print to start from thin air afterward.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("avoid_crossing_perimeters", coBool);
@@ -565,7 +566,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Optimize travel moves in order to minimize the crossing of perimeters. "
"This is mostly useful with Bowden extruders which suffer from oozing. "
"This feature slows down both the print and the G-code generation.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("avoid_crossing_not_first_layer", coBool);
@@ -573,7 +574,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Don't avoid crossing on 1st layer");
def->category = OptionCategory::perimeter;
def->tooltip = L("Disable 'Avoid crossing perimeters' for the first layer.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("avoid_crossing_perimeters_max_detour", coFloatOrPercent);
@@ -585,7 +586,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm or % (zero to disable)");
def->min = 0;
def->max_literal = { 1000, false };
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0., false));
def = this->add("bed_temperature", coInts);
@@ -599,6 +600,7 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->max = 300;
def->is_vector_extruder = true;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInts { 0 });
def = this->add("before_layer_gcode", coString);
@@ -610,7 +612,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 5;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("between_objects_gcode", coString);
@@ -620,7 +622,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("bottom_solid_layers", coInt);
@@ -628,7 +630,9 @@ void PrintConfigDef::init_fff_params()
def->label = L("Bottom");
def->category = OptionCategory::perimeter;
def->tooltip = L("Number of solid layers to generate on bottom surfaces.");
- def->full_label = L("Bottom solid layers"); def->min = 0;
+ def->full_label = L("Bottom solid layers");
+ def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInt(3));
def = this->add("bottom_solid_min_thickness", coFloat);
@@ -640,6 +644,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Minimum bottom shell thickness");
def->sidetext = L("mm");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.));
def = this->add("bridge_acceleration", coFloatOrPercent);
@@ -653,7 +658,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "default_acceleration";
def->min = 0;
def->max_literal = { -220, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("bridge_internal_acceleration", coFloatOrPercent);
@@ -667,7 +672,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "bridge_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("bridge_angle", coFloat);
@@ -679,7 +684,7 @@ void PrintConfigDef::init_fff_params()
"Use 180° for zero angle.");
def->sidetext = L("°");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.));
def = this->add("bridge_fan_speed", coInts);
@@ -691,7 +696,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = -1;
def->max = 100;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts{ 100 });
@@ -705,7 +710,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = -1;
def->max = 100;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts{ -1 });
@@ -729,24 +734,10 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Keep current flow"));
def->min = -1;
def->max = 100;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionEnum<BridgeType>{ BridgeType::btFromNozzle });
- def = this->add("top_fan_speed", coInts);
- def->label = L("Top fan speed");
- def->category = OptionCategory::cooling;
- def->tooltip = L("This fan speed is enforced during all top fills."
- "\nSet to 1 to disable the fan."
- "\nSet to -1 to disable this override."
- "\nCan only be overriden by disable_fan_first_layers.");
- def->sidetext = L("%");
- def->min = -1;
- def->max = 100;
- def->mode = comAdvanced;
- def->is_vector_extruder = true;
- def->set_default_value(new ConfigOptionInts{ -1 });
-
def = this->add("bridge_flow_ratio", coPercent);
def->label = L("Bridge");
def->full_label = L("Bridge flow ratio");
@@ -759,7 +750,7 @@ void PrintConfigDef::init_fff_params()
"\nFor reference, the default bridge flow is (in mm3/mm): (nozzle diameter) * (nozzle diameter) * PI/4");
def->min = 2;
def->max = 1000;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("over_bridge_flow_ratio", coPercent);
@@ -772,7 +763,7 @@ void PrintConfigDef::init_fff_params()
" You can increase it slightly to pull the top layer at the correct height. Recommended maximum: 120%.");
def->min = 2;
def->max = 1000;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("bridge_overlap_min", coPercent);
@@ -785,7 +776,7 @@ void PrintConfigDef::init_fff_params()
"\nDefault to 87.5% to allow a little void between the lines.");
def->min = 2;
def->max = 2000;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(80));
def = this->add("bridge_overlap", coPercent);
@@ -797,7 +788,7 @@ void PrintConfigDef::init_fff_params()
" A value of 50% will create two times less lines, and a value of 200% will create two time more lines that overlap each other.");
def->min = 2;
def->max = 2000;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(90));
def = this->add("bridge_speed", coFloatOrPercent);
@@ -811,7 +802,7 @@ void PrintConfigDef::init_fff_params()
def->aliases = { "bridge_feed_rate" };
def->ratio_over = "default_speed";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(60, true));
def = this->add("bridge_speed_internal", coFloatOrPercent);
@@ -822,7 +813,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "bridge_speed";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(150,true));
def = this->add("brim_inside_holes", coBool);
@@ -830,7 +821,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Brim inside holes");
def->category = OptionCategory::skirtBrim;
def->tooltip = L("Allow to create a brim over an island when it's inside a hole (or surrounded by an object).");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("brim_width", coFloat);
@@ -840,7 +831,7 @@ void PrintConfigDef::init_fff_params()
"\nWhen raft is used, no brim is generated (use raft_first_layer_expansion).");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("brim_width_interior", coFloat);
@@ -849,7 +840,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Horizontal width of the brim that will be printed inside each object on the first layer.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("brim_ears", coBool);
@@ -857,7 +848,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Brim ears");
def->category = OptionCategory::skirtBrim;
def->tooltip = L("Only draw brim over the sharp edges of the model.");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("brim_ears_max_angle", coFloat);
@@ -868,7 +859,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°");
def->min = 0;
def->max = 180;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(125));
def = this->add("brim_ears_detection_length", coFloat);
@@ -879,7 +870,7 @@ void PrintConfigDef::init_fff_params()
"\n0 to deactivate");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(1));
def = this->add("brim_ears_pattern", coEnum);
@@ -893,7 +884,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("rectilinear");
def->enum_labels.push_back(L("Concentric"));
def->enum_labels.push_back(L("Rectilinear"));
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipConcentric));
def = this->add("brim_separation", coFloat);
@@ -903,7 +894,7 @@ void PrintConfigDef::init_fff_params()
"\nIt's subtracted to brim_width and brim_width_interior, so it has to be lower than them. The offset is applied after the first layer XY compensation (elephant foot).");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def->aliases = { "brim_offset" }; // from superslicer 2.3
@@ -921,7 +912,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.emplace_back(L("Outer brim only"));
def->enum_labels.emplace_back(L("Inner brim only"));
def->enum_labels.emplace_back(L("Outer and inner brim"));
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionEnum<BrimType>(btOuterOnly));
#endif
@@ -933,7 +924,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°C");
def->min = 0;
def->max = 300;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts{ 0 });
@@ -943,7 +934,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("When printing multi-material objects, this settings will make Slic3r "
"to clip the overlapping object parts one by the other "
"(2nd part will be clipped by the 1st, 3rd part will be clipped by the 1st and 2nd etc).");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("colorprint_heights", coFloats);
@@ -954,7 +945,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("compatible_printers", coStrings);
def->label = L("Compatible printers");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionStrings());
def->cli = ConfigOptionDef::nocli;
@@ -963,13 +954,13 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("A boolean expression using the configuration values of an active printer profile. "
"If this expression evaluates to true, this profile is considered compatible "
"with the active printer profile.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString());
def->cli = ConfigOptionDef::nocli;
def = this->add("compatible_prints", coStrings);
def->label = L("Compatible print profiles");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionStrings());
def->cli = ConfigOptionDef::nocli;
@@ -978,7 +969,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("A boolean expression using the configuration values of an active print profile. "
"If this expression evaluates to true, this profile is considered compatible "
"with the active print profile.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString());
def->cli = ConfigOptionDef::nocli;
@@ -998,7 +989,7 @@ void PrintConfigDef::init_fff_params()
"each object before moving onto next one (and starting it from its bottom layer). "
"This feature is useful to avoid the risk of ruined prints. "
"Slic3r should warn and prevent you from extruder collisions, but beware.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("complete_objects_one_skirt", coBool);
@@ -1006,7 +997,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::output;
def->tooltip = L("When using 'Complete individual objects', the default behavior is to draw the skirt around each object."
" if you prefer to have only one skirt for the whole platter, use this option.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("complete_objects_one_brim", coBool);
@@ -1014,7 +1005,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::output;
def->tooltip = L("When using 'Complete individual objects', the default behavior is to draw the brim at the beginning of each object."
" if you prefer to have more place for you objects, you can print all the brims at the beginning, so ther is less problem with collision.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("complete_objects_sort", coEnum);
@@ -1024,7 +1015,7 @@ void PrintConfigDef::init_fff_params()
"\nObject will sort them by the order of the right panel."
"\nLowest Y will sort them by their lowest Y point. Useful for printers with a X-bar."
"\nLowest Z will sort them by their height, useful for delta printers.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->enum_keys_map = &ConfigOptionEnum<CompleteObjectSort>::get_enum_values();
def->enum_values.push_back("object");
def->enum_values.push_back("lowy");
@@ -1034,15 +1025,17 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("lowest Z"));
def->set_default_value(new ConfigOptionEnum<CompleteObjectSort>(cosObject));
+#if 0
//not used anymore, to remove !! @DEPRECATED
def = this->add("cooling", coBools);
def->label = L("Enable auto cooling");
def->category = OptionCategory::cooling;
def->tooltip = L("This flag enables the automatic cooling logic that adjusts print speed "
"and fan speed according to layer printing time.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools { true });
+#endif
def = this->add("cooling_tube_retraction", coFloat);
def->label = L("Cooling tube position");
@@ -1050,7 +1043,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Distance of the center-point of the cooling tube from the extruder tip.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(91.5f));
def = this->add("cooling_tube_length", coFloat);
@@ -1059,9 +1052,65 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Length of the cooling tube to limit space for cooling moves inside it.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(5.f));
+ def = this->add("curve_smoothing_angle_convex", coFloat);
+ def->label = L("Min convex angle");
+ def->full_label = L("Curve smoothing minimum angle (convex)");
+ def->category = OptionCategory::slicing;
+ def->tooltip = L("Minimum (convex) angle at a vertex to enable smoothing"
+ " (trying to create a curve around the vertex). "
+ "180 : nothing will be smooth, 0 : all angles will be smoothened.");
+ def->sidetext = L("°");
+ def->aliases = { "curve_smoothing_angle" };
+ def->cli = "curve-smoothing-angle-convex=f";
+ def->min = 0;
+ def->max = 180;
+ def->mode = comAdvancedE | comSuSi;
+ def->set_default_value(new ConfigOptionFloat(0));
+
+ def = this->add("curve_smoothing_angle_concave", coFloat);
+ def->label = L("Min concave angle");
+ def->full_label = L("Curve smoothing minimum angle (concave)");
+ def->category = OptionCategory::slicing;
+ def->tooltip = L("Minimum (concave) angle at a vertex to enable smoothing"
+ " (trying to create a curve around the vertex). "
+ "180 : nothing will be smooth, 0 : all angles will be smoothened.");
+ def->sidetext = L("°");
+ def->cli = "curve-smoothing-angle-concave=f";
+ def->min = 0;
+ def->max = 180;
+ def->mode = comAdvancedE | comSuSi;
+ def->set_default_value(new ConfigOptionFloat(0));
+
+ def = this->add("curve_smoothing_precision", coFloat);
+ def->label = L("Precision");
+ def->full_label = L("Curve smoothing precision");
+ def->category = OptionCategory::slicing;
+ def->tooltip = L("These parameters allow the slicer to smooth the angles in each layer. "
+ "The precision will be at least the new precision of the curve. Set to 0 to deactivate."
+ "\nNote: as it uses the polygon's edges and only works in the 2D planes, "
+ "you must have a very clean or hand-made 3D model."
+ "\nIt's really only useful to smoothen functional models or very wide angles.");
+ def->sidetext = L("mm");
+ def->min = 0;
+ def->precision = 8;
+ def->cli = "curve-smoothing-precision=f";
+ def->mode = comAdvancedE | comSuSi;
+ def->set_default_value(new ConfigOptionFloat(0));
+
+ def = this->add("curve_smoothing_cutoff_dist", coFloat);
+ def->label = L("cutoff");
+ def->full_label = L("Curve smoothing cutoff dist");
+ def->category = OptionCategory::slicing;
+ def->tooltip = L("Maximum distance between two points to allow adding new ones. Allow to avoid distorting long strait areas.\nSet zero to disable.");
+ def->sidetext = L("mm");
+ def->min = 0;
+ def->cli = "curve-smoothing-cutoff-dist=f";
+ def->mode = comAdvancedE | comSuSi;
+ def->set_default_value(new ConfigOptionFloat(2));
+
def = this->add("default_acceleration", coFloatOrPercent);
def->label = L("Default");
def->category = OptionCategory::speed;
@@ -1074,7 +1123,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "machine_max_acceleration_x";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false));
def = this->add("default_filament_profile", coStrings);
@@ -1101,7 +1150,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "machine_max_feedrate_x";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(100, false));
def = this->add("disable_fan_first_layers", coInts);
@@ -1112,7 +1161,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("layers");
def->min = 0;
def->max = 1000;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 1 });
@@ -1121,7 +1170,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::support;
def->tooltip = L("Experimental option for preventing support material from being generated "
"under bridged areas.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("draft_shield", coEnum);
@@ -1138,7 +1187,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Disabled"));
def->enum_labels.push_back(L("Limited"));
def->enum_labels.push_back(L("Enabled"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<DraftShield>(dsDisabled));
def = this->add("duplicate_distance", coFloat);
@@ -1148,6 +1197,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm");
def->aliases = { "multiply_distance" };
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(6));
def = this->add("end_gcode", coString);
@@ -1158,7 +1208,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString("M104 S0 ; turn off temperature\nG28 X0 ; home X axis\nM84 ; disable motors\n"));
def = this->add("end_filament_gcode", coStrings);
@@ -1172,7 +1222,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 120;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings { "; Filament-specific end gcode \n;END gcode for filament\n" });
@@ -1182,7 +1232,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Add solid infill near sloping surfaces to guarantee the vertical shell thickness "
"(top+bottom solid layers)."
"\n!! solid_over_perimeters may erase these surfaces !!");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("top_fill_pattern", coEnum);
@@ -1214,6 +1264,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Octagram Spiral"));
def->enum_labels.push_back(L("Sawtooth"));
def->enum_labels.push_back(L("Ironing"));
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipMonotonic));
def = this->add("bottom_fill_pattern", coEnum);
@@ -1241,7 +1292,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Archimedean Chords"));
def->enum_labels.push_back(L("Octagram Spiral"));
def->enum_labels.push_back(L("Ironing"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipMonotonic));
def = this->add("solid_fill_pattern", coEnum);
@@ -1268,7 +1319,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Hilbert Curve"));
def->enum_labels.push_back(L("Archimedean Chords"));
def->enum_labels.push_back(L("Octagram Spiral"));
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipRectilinearWGapFill));
def = this->add("enforce_full_fill_volume", coBool);
@@ -1278,7 +1329,7 @@ void PrintConfigDef::init_fff_params()
"(it generally changes the flow from -7% to +4%, depending on the size of the surface to fill and the overlap parameters, "
"but it can go as high as +50% for infill in very small areas where rectilinear doesn't have good coverage). It has the advantage "
"to remove the over-extrusion seen in thin infill areas, from the overlap ratio");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("external_infill_margin", coFloatOrPercent);
@@ -1290,7 +1341,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "perimeter_extrusion_width";
def->min = 0;
def->max_literal = { 50, true };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(150, true));
def = this->add("bridged_infill_margin", coFloatOrPercent);
@@ -1302,7 +1353,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "external_perimeter_extrusion_width";
def->min = 0;
def->max_literal = { 50, true };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(200, true));
def = this->add("external_perimeter_extrusion_width", coFloatOrPercent);
@@ -1320,7 +1371,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(105, true, false));
def = this->add("external_perimeter_extrusion_spacing", coFloatOrPercent);
@@ -1337,7 +1388,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, true));
def = this->add("external_perimeter_cut_corners", coPercent);
@@ -1348,7 +1399,7 @@ void PrintConfigDef::init_fff_params()
" 100% is activated, 0% is deactivated and 50% is half-activated."
"\nNote: At 100% this changes the flow by ~5% over a very small distance (~nozzle diameter), so it shouldn't be noticeable unless you have a very big nozzle and a very precise printer.");
def->sidetext = L("%");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(0));
def = this->add("external_perimeter_fan_speed", coInts);
@@ -1361,7 +1412,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = -1;
def->max = 100;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { -1 });
@@ -1374,7 +1425,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("external_perimeter_acceleration", coFloatOrPercent);
@@ -1388,7 +1439,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "perimeter_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("external_perimeter_speed", coFloatOrPercent);
@@ -1401,7 +1452,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "perimeter_speed";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("external_perimeters_first", coBool);
@@ -1410,7 +1461,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::perimeter;
def->tooltip = L("Print contour perimeters from the outermost one to the innermost one "
"instead of the default inverse order.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("external_perimeters_vase", coBool);
@@ -1422,7 +1473,7 @@ void PrintConfigDef::init_fff_params()
" \nNote that it will use min_layer_height from your hardware setting as the base height (it doesn't start at 0)"
", so be sure to put here the lowest value your printer can handle."
" if it's not lower than two times the current layer height, it falls back to the normal algorithm, as there is not enough room to do two loops.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("external_perimeters_nothole", coBool);
@@ -1430,7 +1481,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Ext peri first for outer side");
def->category = OptionCategory::perimeter;
def->tooltip = L("Only do the vase trick on the external side. Useful when the thickness is too low.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("external_perimeters_hole", coBool);
@@ -1438,7 +1489,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("ext peri first for inner side");
def->category = OptionCategory::perimeter;
def->tooltip = L("Only do the vase trick on the external side. Useful when you only want to remove seam from screw hole.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("extra_perimeters", coBool);
@@ -1450,7 +1501,7 @@ void PrintConfigDef::init_fff_params()
"is supported."
"\nIf you succeed in triggering the algorithm behind this setting, please send me a message."
" Personally, I think it's useless.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("extra_perimeters_overhangs", coBool);
@@ -1461,7 +1512,7 @@ void PrintConfigDef::init_fff_params()
"Slic3r keeps adding perimeters until all overhangs are filled."
"\n!! this is a very slow algorithm !!"
"\nIf you use this setting, strongly consider also using overhangs_reverse.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("extra_perimeters_odd_layers", coBool);
@@ -1470,25 +1521,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::perimeter;
def->tooltip = L("Add one perimeter every odd layer. With this, infill is taken into the sandwich"
" and you may be able to reduce drastically the infill/perimeter overlap setting. ");
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionBool(false));
-
- def = this->add("only_one_perimeter_first_layer", coBool);
- def->label = L("Only one perimeter on First layer");
- def->category = OptionCategory::perimeter;
- def->tooltip = L("Use only one perimeter on first layer, to give more space to the top infill pattern.");
- def->set_default_value(new ConfigOptionBool(false));
-
- def = this->add("only_one_perimeter_top", coBool);
- def->label = L("Only one perimeter on Top surfaces");
- def->category = OptionCategory::perimeter;
- def->tooltip = L("Use only one perimeter 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_perimeter_top_other_algo", coBool);
- def->label = L("Only one peri - other algo");
- def->category = OptionCategory::perimeter;
- def->tooltip = L("If you have some problem with the 'Only one perimeter on Top surfaces' option, you can try to activate this on the problematic layer.");
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("extruder", coInt);
@@ -1536,7 +1569,7 @@ void PrintConfigDef::init_fff_params()
"other printed objects."); // TODO: "peek?" is this the correct word?
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(20));
def = this->add("extruder_clearance_radius", coFloat);
@@ -1550,7 +1583,7 @@ void PrintConfigDef::init_fff_params()
"\nSet zero to disable clearance checking.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(20));
def = this->add("extruder_colour", coStrings);
@@ -1559,7 +1592,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("This is only used in Slic3r interface as a visual help.");
def->gui_type = ConfigOptionDef::GUIType::color;
// Empty string means no color assigned yet.
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings{ "" });
@@ -1571,7 +1604,7 @@ void PrintConfigDef::init_fff_params()
"with respect to the first one. It expects positive coordinates (they will be subtracted "
"from the XY coordinate).");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionPoints{ Vec2d(0,0) });
@@ -1582,7 +1615,7 @@ void PrintConfigDef::init_fff_params()
"\nNote that you should set 'M104 S{first_layer_temperature{initial_extruder} + extruder_temperature_offset{initial_extruder}}'"
"\ninstead of 'M104 S{first_layer_temperature}' in the start_gcode");
def->sidetext = L("°C");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 0 });
@@ -1591,7 +1624,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("This offset wil be added to all fan values set in the filament properties. It won't make them go higher than 100% nor lower than 0%.");
def->sidetext = L("%");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionPercents{ 0 });
@@ -1610,7 +1643,7 @@ void PrintConfigDef::init_fff_params()
"this setting to get nice surface finish and correct single wall widths. "
"Usual values are between 0.9 and 1.1. If you think you need to change this more, "
"check filament diameter and your firmware E steps.");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->max = 2;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 1. });
@@ -1625,7 +1658,7 @@ void PrintConfigDef::init_fff_params()
" This print setting is multiplied against the extrusion_multiplier from the filament tab."
" Its only purpose is to offer the same functionality but on a per-object basis."); // TODO: replace "against" with "with"?
def->sidetext = L("%");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comSuSi;
def->min = 2;
def->set_default_value(new ConfigOptionPercent(100));
@@ -1645,7 +1678,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, true));
def = this->add("extrusion_spacing", coFloatOrPercent);
@@ -1661,7 +1694,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, false));
def = this->add("fan_always_on", coBools);
@@ -1669,7 +1702,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::cooling;
def->tooltip = L("If this is enabled, fan will continuously run at base speed if no other setting overrides that speed."
" Useful for PLA, harmful for ABS.");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools{ true });
@@ -1682,7 +1715,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("approximate seconds");
def->min = 0;
def->max = 1000;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 60 });
@@ -1692,7 +1725,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::filament;
def->tooltip = L("This is only used in the Slic3r interface as a visual help.");
def->gui_type = ConfigOptionDef::GUIType::color;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings{ "#29B2B2" });
@@ -1712,7 +1745,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 13;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings{ "" });
@@ -1723,7 +1756,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 13;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings { "" });
@@ -1735,7 +1768,7 @@ void PrintConfigDef::init_fff_params()
"Set zero for no limit.");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 0. });
@@ -1747,7 +1780,7 @@ void PrintConfigDef::init_fff_params()
"Set zero for no limit.");
def->sidetext = L("mm³/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 0. });
@@ -1765,7 +1798,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 400;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0 });
@@ -1774,7 +1807,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Speed used for loading the filament on the wipe tower. ");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 28. });
@@ -1782,21 +1815,21 @@ void PrintConfigDef::init_fff_params()
def = this->add("filament_enable_toolchange_temp", coBools);
def->label = L("Toolchange temperature enabled");
def->tooltip = L("Determines whether toolchange temperatures will be applied");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools { false });
def = this->add("filament_use_fast_skinnydip", coBools);
def->label = L("Fast mode");
def->tooltip = L("Experimental: drops nozzle temperature during cooling moves instead of prior to extraction to reduce wait time.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools { false });
def = this->add("filament_enable_toolchange_part_fan", coBools);
def->label = L("Use part fan to cool hotend");
def->tooltip = L("Experimental setting. May enable the hotend to cool down faster during toolchanges");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools { false });
@@ -1806,14 +1839,14 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 50 });
def = this->add("filament_use_skinnydip", coBools);
def->label = L("Enable Skinnydip string reduction");
def->tooltip = L("Skinnydip performs a secondary dip into the meltzone to burn off fine strings of filament");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools { false });
@@ -1822,7 +1855,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Stay in melt zone for this amount of time before extracting the filament. Not usually necessary.");
def->sidetext = L("milliseconds");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 0 });
@@ -1831,7 +1864,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Can be useful to avoid bondtech gears deforming hot tips, but not ordinarily needed");
def->sidetext = L("milliseconds");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 0 });
@@ -1840,7 +1873,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("usually not necessary to change this");
def->sidetext = L("mm/sec");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 33. });
@@ -1849,7 +1882,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("usually not necessary to change this");
def->sidetext = L("mm/sec");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 70. });
@@ -1858,7 +1891,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("To further reduce stringing, it can be helpful to set a lower temperature just prior to extracting filament from the hotend.");
def->sidetext = L("°C");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 200 });
@@ -1867,7 +1900,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("For stock extruders, usually 40-42mm. For bondtech extruder upgrade, usually 30-32mm. Start with a low value and gradually increase it until strings are gone. If there are blobs on your wipe tower, your value is too high.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 31. });
//skinnydip section ends
@@ -1877,7 +1910,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Speed used at the very beginning of loading phase. ");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 3. });
@@ -1887,7 +1920,7 @@ void PrintConfigDef::init_fff_params()
" initial part of unloading just after ramming). ");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 90. });
@@ -1896,7 +1929,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Speed used for unloading the tip of the filament immediately after ramming. ");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 100. });
@@ -1907,7 +1940,7 @@ void PrintConfigDef::init_fff_params()
"that may need more time to shrink to original dimensions. ");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -1917,7 +1950,7 @@ void PrintConfigDef::init_fff_params()
"cooling tubes. Specify desired number of these moves.");
def->max = 0;
def->max = 20;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 4 });
@@ -1926,7 +1959,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Cooling moves are gradually accelerated, starting at this speed. ");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 2.2 });
@@ -1938,7 +1971,7 @@ void PrintConfigDef::init_fff_params()
"this amount of material into the wipe tower to produce successive infill or sacrificial object extrusions reliably.");
def->sidetext = L("mm³");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 15. });
@@ -1947,7 +1980,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Cooling moves are gradually accelerated towards this speed. ");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 3.4 });
@@ -1956,14 +1989,14 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Time for the printer firmware (or the Multi Material Unit 2.0) to load a new filament during a tool change (when executing the T code). This time is added to the total print time by the G-code time estimator.");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0.0 });
def = this->add("filament_ramming_parameters", coStrings);
def->label = L("Ramming parameters");
def->tooltip = L("This string is edited by RammingDialog and contains ramming specific parameters.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings { "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0|"
" 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6" });
@@ -1973,7 +2006,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Time for the printer firmware (or the Multi Material Unit 2.0) to unload a filament during a tool change (when executing the T code). This time is added to the total print time by the G-code time estimator.");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0.0 });
@@ -1983,7 +2016,7 @@ void PrintConfigDef::init_fff_params()
"and do multiple measurements along the filament, then compute the average.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 1.75 });
@@ -1996,7 +2029,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->ratio_over = "";
def->min = 10;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionPercents{ 100 });
@@ -2008,7 +2041,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "";
def->min = 0;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionPercents{ 100 });
@@ -2020,7 +2053,7 @@ void PrintConfigDef::init_fff_params()
"of the length to volume. Better is to calculate the volume directly through displacement.");
def->sidetext = L("g/cm³");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 0. });
@@ -2049,17 +2082,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("PSU");
def->enum_values.push_back("PVDF");
def->enum_values.push_back("SCAFF");
- def->enum_values.push_back("other0");
- def->enum_values.push_back("other1");
- def->enum_values.push_back("other2");
- def->enum_values.push_back("other3");
- def->enum_values.push_back("other4");
- def->enum_values.push_back("other5");
- def->enum_values.push_back("other6");
- def->enum_values.push_back("other7");
- def->enum_values.push_back("other8");
- def->enum_values.push_back("other9");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings { "PLA" });
@@ -2067,7 +2090,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Soluble material");
def->category = OptionCategory::filament;
def->tooltip = L("Soluble material is most likely used for a soluble support.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools { false });
@@ -2079,6 +2102,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("money/kg");
def->min = 0;
def->is_vector_extruder = true;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloats { 0. });
def = this->add("filament_spool_weight", coFloats);
@@ -2091,6 +2115,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("g");
def->min = 0;
def->is_vector_extruder = true;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloats { 0. });
def = this->add("filament_settings_id", coStrings);
@@ -2111,7 +2136,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°");
def->min = 0;
def->max = 360;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(45));
def = this->add("fill_angle_increment", coFloat);
@@ -2124,7 +2149,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°");
def->min = 0;
def->max = 360;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("fill_density", coPercent);
@@ -2162,6 +2187,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("55");
def->enum_labels.push_back("75");
def->enum_labels.push_back("100");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionPercent(18));
def = this->add("fill_pattern", coEnum);
@@ -2212,6 +2238,7 @@ void PrintConfigDef::init_fff_params()
#if HAS_LIGHTNING_INFILL
def->enum_labels.push_back(L("Lightning"));
#endif // HAS_LIGHTNING_INFILL
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value( new ConfigOptionEnum<InfillPattern>(ipStars));
def = this->add("fill_top_flow_ratio", coPercent);
@@ -2221,7 +2248,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::width;
def->tooltip = L("You can increase this to over-extrude on the top layer if there is not enough plastic to make a good fill.");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("first_layer_flow_ratio", coPercent);
@@ -2233,7 +2260,7 @@ void PrintConfigDef::init_fff_params()
"\nNote: DON'T USE THIS if your only problem is bed leveling, LEVEL YOUR BED!"
" Use this setting only as last resort after all calibrations failed.");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("first_layer_size_compensation", coFloat);
@@ -2243,7 +2270,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("The first layer will be grown / shrunk in the XY plane by the configured value "
"to compensate for the 1st layer squish aka an Elephant Foot effect. (should be negative = inwards)");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("first_layer_size_compensation_layers", coInt);
@@ -2256,7 +2283,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("layers");
def->min = 1;
def->max = 30;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("fill_smooth_width", coFloatOrPercent);
@@ -2270,7 +2297,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "top_infill_extrusion_width";
def->min = 0;
def->max_literal = { 1, true };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->sidetext = L("mm/%");
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
@@ -2283,7 +2310,7 @@ void PrintConfigDef::init_fff_params()
"A value too low and your extruder will eat the filament. A value too high and the first pass won't print well.");
//def->min = 0;
//def->max = 0.9;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->sidetext = L("%");
def->set_default_value(new ConfigOptionPercent(10));
@@ -2298,7 +2325,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "depends";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false));
def = this->add("first_layer_acceleration_over_raft", coFloatOrPercent);
@@ -2309,7 +2336,7 @@ void PrintConfigDef::init_fff_params()
"\nSet zero to disable acceleration control for first layer of object above raft interface.");
def->sidetext = L("mm/s²");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false));
def = this->add("first_layer_bed_temperature", coInts);
@@ -2322,6 +2349,7 @@ void PrintConfigDef::init_fff_params()
def->max = 0;
def->max = 300;
def->is_vector_extruder = true;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInts { 0 });
def = this->add("first_layer_extrusion_width", coFloatOrPercent);
@@ -2341,7 +2369,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(140, true, false));
def = this->add("first_layer_extrusion_spacing", coFloatOrPercent);
@@ -2357,7 +2385,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, true));
def = this->add("first_layer_height", coFloatOrPercent);
@@ -2371,7 +2399,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "nozzle_diameter";
def->min = 0;
def->max_literal = { 20, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(75, true));
def = this->add("first_layer_speed", coFloatOrPercent);
@@ -2384,7 +2412,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "depends";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(30, false));
def = this->add("first_layer_speed_over_raft", coFloatOrPercent);
@@ -2397,7 +2425,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "depends";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(30, false));
def = this->add("first_layer_infill_speed", coFloatOrPercent);
@@ -2411,7 +2439,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "depends";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(30, false));
def = this->add("first_layer_min_speed", coFloat);
@@ -2422,7 +2450,7 @@ void PrintConfigDef::init_fff_params()
"\nSet zero to disable.");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("first_layer_temperature", coInts);
@@ -2435,6 +2463,7 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->max = max_temp;
def->is_vector_extruder = true;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInts { 200 });
def = this->add("full_fan_speed_layer", coInts);
@@ -2446,7 +2475,7 @@ void PrintConfigDef::init_fff_params()
"the fan will be running at maximum allowed speed at layer \"disable_fan_first_layers\" + 1.");
def->min = 0;
def->max = 1000;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 4 });
@@ -2461,7 +2490,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("None"));
def->enum_labels.push_back(L("Outside walls"));
def->enum_labels.push_back(L("All walls"));
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionEnum<FuzzySkinType>(FuzzySkinType::None));
def = this->add("fuzzy_skin_thickness", coFloatOrPercent);
@@ -2472,7 +2501,7 @@ void PrintConfigDef::init_fff_params()
"\nCan be a % of the nozzle diameter.");
def->sidetext = L("mm or %");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(150, true));
def = this->add("fuzzy_skin_point_dist", coFloatOrPercent);
@@ -2483,7 +2512,7 @@ void PrintConfigDef::init_fff_params()
"\nCan be a % of the nozzle diameter.");
def->sidetext = L("mm or %");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(200, true));
def = this->add("gap_fill_enabled", coBool);
@@ -2492,7 +2521,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::perimeter;
def->tooltip = L("Enable gap fill algorithm. It will extrude small lines between perimeters "
"when there is not enough space for another perimeter or an infill.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->aliases = { "gap_fill" }; //superslicer 2.3 or older
def->set_default_value(new ConfigOptionBool(true));
@@ -2507,7 +2536,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "perimeter_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("gap_fill_last", coBool);
@@ -2515,7 +2544,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Gapfill after last perimeter");
def->category = OptionCategory::perimeter;
def->tooltip = L("All gaps, between the last perimeter and the infill, which are thinner than a perimeter will be filled by gapfill.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("gap_fill_min_area", coFloatOrPercent);
@@ -2525,7 +2554,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("This setting represents the minimum mm² for a gapfill extrusion to be created.\nCan be a % of (perimeter width)²");
def->ratio_over = "perimeter_width_square";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent{100, true });
def = this->add("gap_fill_overlap", coPercent);
@@ -2538,7 +2567,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("gap_fill_speed", coFloatOrPercent);
@@ -2552,7 +2581,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "perimeter_speed";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(50,true));
def = this->add("gcode_comments", coBool);
@@ -2561,7 +2590,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Enable this to get a commented G-code file, with each line explained by descriptive text. "
"If you print from an SD card, the additional weight of the file could make your firmware "
"slow down.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(0));
def = this->add("gcode_filename_illegal_char", coString);
@@ -2570,7 +2599,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::output;
def->tooltip = L("All characters that are written here will be replaced by '_' when writing the gcode file name."
"\nIf the first charater is '[' or '(', then this field will be considered as a regexp (enter '[^a-zA-Z0-9]' to only use ascii char).");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionString("[<>:\"/\\\\|?*]"));
def = this->add("gcode_flavor", coEnum);
@@ -2608,18 +2637,9 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("Sprinter");
def->enum_labels.push_back("Lerdge");
def->enum_labels.push_back(L("No extrusion"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<GCodeFlavor>(gcfMarlinLegacy));
- def = this->add("gcode_filename_illegal_char", coString);
- def->label = L("Illegal characters");
- def->full_label = L("Illegal characters for filename");
- def->category = OptionCategory::output;
- def->tooltip = L("All characters that are written here will be replaced by '_' when writing the gcode file name."
- "\nIf the first charater is '[' or '(', then this field will be considered as a regexp (enter '[^a-zA-Z]' to only use ascii char).");
- def->mode = comExpert;
- def->set_default_value(new ConfigOptionString(""));
-
def = this->add("gcode_label_objects", coBool);
def->label = L("Label objects");
def->category = OptionCategory::output;
@@ -2627,27 +2647,27 @@ void PrintConfigDef::init_fff_params()
" which is useful for the Octoprint CancelObject plugin. This settings is NOT compatible with "
"Single Extruder Multi Material setup and Wipe into Object / Wipe into Infill.");
def->aliases = { "label_printed_objects" };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(1));
def = this->add("gcode_precision_xyz", coInt);
def->label = L("xyz decimals");
def->category = OptionCategory::output;
def->tooltip = L("Choose how many digits after the dot for xyz coordinates.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionInt(3));
def = this->add("gcode_precision_e", coInt);
def->label = L("Extruder decimals");
def->category = OptionCategory::output;
def->tooltip = L("Choose how many digits after the dot for extruder moves.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionInt(5));
def = this->add("gcode_substitutions", coStrings);
def->label = L("G-code substitutions");
def->tooltip = L("Find / replace patterns in G-code lines and substitute them.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionStrings());
def = this->add("high_current_on_filament_swap", coBool);
@@ -2656,7 +2676,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("It may be beneficial to increase the extruder motor current during the filament exchange"
" sequence to allow for rapid ramming feed rates and to overcome resistance when loading"
" a filament with an ugly shaped tip.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(0));
def = this->add("infill_acceleration", coFloatOrPercent);
@@ -2670,7 +2690,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "solid_infill_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("infill_every_layers", coInt);
@@ -2681,7 +2701,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("layers");
def->full_label = L("Combine infill every n layers");
def->min = 1;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(1));
auto def_infill_anchor_min = def = this->add("infill_anchor", coFloatOrPercent);
@@ -2708,7 +2728,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("5 mm");
def->enum_labels.push_back("10 mm");
def->enum_labels.push_back(L("1000 (unlimited)"));
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(600, true));
def = this->add("infill_anchor_max", coFloatOrPercent);
@@ -2730,18 +2750,9 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("5 mm");
def->enum_labels.push_back("10 mm");
def->enum_labels.push_back(L("1000 (unlimited)"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false));
- def = this->add("infill_dense", coBool);
- def->label = L("Dense infill layer");
- def->full_label = L("Dense infill layer");
- def->category = OptionCategory::infill;
- def->tooltip = L("Enables the creation of a support layer under the first solid layer. This allows you to use a lower infill ratio without compromising the top quality."
- " The dense infill is laid out with a 50% infill density.");
- def->mode = comSimple;
- def->set_default_value(new ConfigOptionBool(false));
-
def = this->add("infill_connection", coEnum);
def->label = L("Connection of sparse infill lines");
def->category = OptionCategory::infill;
@@ -2757,7 +2768,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Connected to hole perimeters"));
def->enum_labels.push_back(L("Connected to outer perimeters"));
def->enum_labels.push_back(L("Not connected"));
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionEnum<InfillConnection>(icConnected));
def = this->add("infill_connection_top", coEnum);
@@ -2775,7 +2786,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Connected to hole perimeters"));
def->enum_labels.push_back(L("Connected to outer perimeters"));
def->enum_labels.push_back(L("Not connected"));
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionEnum<InfillConnection>(icConnected));
def = this->add("infill_connection_bottom", coEnum);
@@ -2793,7 +2804,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Connected to hole perimeters"));
def->enum_labels.push_back(L("Connected to outer perimeters"));
def->enum_labels.push_back(L("Not connected"));
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionEnum<InfillConnection>(icConnected));
def = this->add("infill_connection_solid", coEnum);
@@ -2811,8 +2822,17 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Connected to hole perimeters"));
def->enum_labels.push_back(L("Connected to outer perimeters"));
def->enum_labels.push_back(L("Not connected"));
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionEnum<InfillConnection>(icConnected));
+
+ def = this->add("infill_dense", coBool);
+ def->label = L("Dense infill layer");
+ def->full_label = L("Dense infill layer");
+ def->category = OptionCategory::infill;
+ def->tooltip = L("Enables the creation of a support layer under the first solid layer. This allows you to use a lower infill ratio without compromising the top quality."
+ " The dense infill is laid out with a 50% infill density.");
+ def->mode = comSimpleAE | comSuSi;
+ def->set_default_value(new ConfigOptionBool(false));
def = this->add("infill_dense_algo", coEnum);
def->label = L("Algorithm");
@@ -2832,7 +2852,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Automatic, only for small areas"));
def->enum_labels.push_back(L("Automatic, or anchored if too big"));
def->enum_labels.push_back(L("Anchored"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionEnum<DenseInfillAlgo>(dfaAutoOrEnlarged));
def = this->add("infill_extruder", coInt);
@@ -2840,7 +2860,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("The extruder to use when printing infill.");
def->min = 1;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("infill_extrusion_width", coFloatOrPercent);
@@ -2859,7 +2879,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, true));
def = this->add("infill_extrusion_spacing", coFloatOrPercent);
@@ -2875,14 +2895,14 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true, false));
def = this->add("infill_first", coBool);
def->label = L("Infill before perimeters");
def->category = OptionCategory::infill;
def->tooltip = L("This option will switch the print order of perimeters and infill, making the latter first.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("infill_only_where_needed", coBool);
@@ -2891,7 +2911,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("This option will limit infill to the areas actually needed for supporting ceilings "
"(it will act as internal support material). If enabled, this slows down the G-code generation "
"due to the multiple checks involved.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("infill_overlap", coFloatOrPercent);
@@ -2905,7 +2925,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "perimeter_extrusion_width";
def->min = 0;
def->max_literal = { 0.5, true };
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(25, true));
def = this->add("infill_speed", coFloatOrPercent);
@@ -2919,7 +2939,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "solid_infill_speed";
def->aliases = { "print_feed_rate", "infill_feed_rate" };
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(300, true));
def = this->add("inherits", coString);
@@ -2942,7 +2962,7 @@ void PrintConfigDef::init_fff_params()
"Useful for multi-extruder prints with translucent materials or manual soluble "
"support material.");
def->category = OptionCategory::perimeter;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("mmu_segmented_region_max_width", coFloat);
@@ -2951,14 +2971,14 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm (zero to disable)");
def->min = 0;
def->category = OptionCategory::mmsetup;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.f));
def = this->add("ironing", coBool);
def->label = L("Enable ironing");
def->tooltip = L("Enable ironing of the top layers with the hot print head for smooth surface");
def->category = OptionCategory::ironing;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("ironing_acceleration", coFloatOrPercent);
@@ -2972,7 +2992,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "top_solid_infill_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("ironing_angle", coFloat);
@@ -2981,7 +3001,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Ironing angle. if negative, it will use the fill angle.");
def->sidetext = L("°");
def->min = -1;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(-1));
def = this->add("ironing_type", coEnum);
@@ -2995,7 +3015,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("All top surfaces"));
def->enum_labels.push_back(L("Topmost surface only"));
def->enum_labels.push_back(L("All solid surfaces"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<IroningType>(IroningType::TopSurfaces));
def = this->add("ironing_flowrate", coPercent);
@@ -3006,7 +3026,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->ratio_over = "layer_height";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionPercent(15));
def = this->add("ironing_spacing", coFloat);
@@ -3015,7 +3035,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Distance between ironing lines");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.1));
def = this->add("ironing_speed", coFloatOrPercent);
@@ -3028,7 +3048,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s");
def->ratio_over = "top_solid_infill_speed";
def->min = 0.1;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("layer_gcode", coString);
@@ -3041,7 +3061,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 5;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("feature_gcode", coString);
@@ -3056,21 +3076,21 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 5;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionString(""));
def = this->add("exact_last_layer_height", coBool);
def->label = L("Exact last layer height");
def->category = OptionCategory::perimeter;
def->tooltip = L("This setting controls the height of last object layers to put the last layer at the exact highest height possible. Experimental.");
- def->mode = comExpert;
+ def->mode = comHidden;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("remaining_times", coBool);
def->label = L("Supports remaining times");
def->category = OptionCategory::firmware;
def->tooltip = L("Emit something at 1 minute intervals into the G-code to let the firmware show accurate remaining time.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("remaining_times_type", coEnum);
@@ -3082,7 +3102,7 @@ void PrintConfigDef::init_fff_params()
" As of now only the Prusa i3 MK3 firmware recognizes M73."
" Also the i3 MK3 firmware supports M73 Qxx Sxx for the silent mode."
"\nM117: Send a command to display a message to the printer, this is 'Time Left .h..m..s'." );
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->enum_keys_map = &ConfigOptionEnum<RemainingTimeType>::get_enum_values();
def->enum_values.push_back("m117");
def->enum_values.push_back("m73");
@@ -3094,7 +3114,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Supports stealth mode");
def->category = OptionCategory::firmware;
def->tooltip = L("The firmware supports stealth mode");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("fan_speedup_time", coFloat);
@@ -3106,14 +3126,14 @@ void PrintConfigDef::init_fff_params()
"\nIt won't move fan comands into the start gcode if the 'only custom start gcode' is activated."
"\nUse 0 to deactivate.");
def->sidetext = L("s");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("fan_speedup_overhangs", coBool);
def->label = L("Allow fan delay on overhangs");
def->category = OptionCategory::firmware;
def->tooltip = L("Will only take into account the delay for the cooling of overhangs.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("fan_kickstart", coFloat);
@@ -3124,7 +3144,7 @@ void PrintConfigDef::init_fff_params()
"\nSet to 0 to deactivate.");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("lift_min", coFloat);
@@ -3135,7 +3155,7 @@ void PrintConfigDef::init_fff_params()
"\nSet to 0 to disable.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloat(0));
@@ -3158,7 +3178,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Use also for time estimate"));
def->enum_labels.push_back(L("Use only as safeguards"));
def->enum_labels.push_back(L("Disable"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<MachineLimitsUsage>(MachineLimitsUsage::TimeEstimateOnly));
{
@@ -3192,7 +3212,7 @@ void PrintConfigDef::init_fff_params()
(void)L("Maximum feedrate of the E axis");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats(axis.max_feedrate));
// Add the machine acceleration limits for XYZE axes (M201)
def = this->add("machine_max_acceleration_" + axis.name, coFloats);
@@ -3209,7 +3229,7 @@ void PrintConfigDef::init_fff_params()
(void)L("Maximum acceleration of the E axis");
def->sidetext = L("mm/s²");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats(axis.max_acceleration));
// Add the machine jerk limits for XYZE axes (M205)
def = this->add("machine_max_jerk_" + axis.name, coFloats);
@@ -3226,7 +3246,7 @@ void PrintConfigDef::init_fff_params()
(void)L("Maximum jerk of the E axis");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats(axis.max_jerk));
}
}
@@ -3238,7 +3258,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Minimum feedrate when extruding (M205 S)");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats{ 0., 0. });
// M205 T... [mm/sec]
@@ -3248,7 +3268,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Minimum travel feedrate (M205 T)");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats{ 0., 0. });
// M204 P... [mm/sec^2]
@@ -3260,7 +3280,7 @@ void PrintConfigDef::init_fff_params()
"as travel acceleration (M204 T).");
def->sidetext = L("mm/s²");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats{ 1500., 1250. });
// M204 R... [mm/sec^2]
@@ -3270,7 +3290,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Maximum acceleration when retracting (M204 R)");
def->sidetext = L("mm/s²");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats{ 1500., 1250. });
// M204 T... [mm/sec^2]
@@ -3280,7 +3300,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Maximum acceleration when travelling (M204 T)");
def->sidetext = L("mm/s²");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloats{ 1500., 1250. });
def = this->add("max_gcode_per_second", coFloat);
@@ -3292,7 +3312,7 @@ void PrintConfigDef::init_fff_params()
"\nNote that reducing your printing speed (at least for the external extrusions) will reduce the number of time this will triggger and so increase quality."
"\nSet zero to disable.");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(1500));
def = this->add("max_fan_speed", coInts);
@@ -3303,7 +3323,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 100 });
@@ -3320,7 +3340,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "nozzle_diameter";
def->min = 0;
def->max_literal = { 10, false };
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloatsOrPercents{ FloatOrPercent{ 75, true} });
@@ -3335,7 +3355,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "machine_max_acceleration_x";
def->min = 1;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(80, false));
def = this->add("max_speed_reduction", coPercents);
@@ -3348,7 +3368,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionPercents{ 90 });
@@ -3361,7 +3381,7 @@ void PrintConfigDef::init_fff_params()
"\nIf this field is set to 0, then there is no autospeed. If a speed value i still set to 0, it will get the max speed");
def->sidetext = L("mm³/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
#ifdef HAS_PRESSURE_EQUALIZER
@@ -3373,7 +3393,7 @@ void PrintConfigDef::init_fff_params()
"to 5.4 mm³/s (feedrate 60 mm/s) will take at least 2 seconds.");
def->sidetext = L("mm³/s²");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0);
def->set_default_value(new ConfigOptionFloat(0));
@@ -3385,7 +3405,7 @@ void PrintConfigDef::init_fff_params()
"to 5.4 mm³/s (feedrate 60 mm/s) will take at least 2 seconds.");
def->sidetext = L("mm³/s²");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0);
def->set_default_value(new ConfigOptionFloat(0));
#endif /* HAS_PRESSURE_EQUALIZER */
@@ -3398,7 +3418,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts{ 35 });
@@ -3407,7 +3427,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::output;
def->tooltip = L("Set this if your printer uses control values from 0-100 instead of 0-255.");
def->cli = "fan-percentage";
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("min_layer_height", coFloatsOrPercents);
@@ -3421,7 +3441,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "nozzle_diameter";
def->min = 0;
def->max_literal = { 5, false };
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloatsOrPercents{ FloatOrPercent{ 5, true} });
@@ -3434,7 +3454,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm");
def->min = 0;
def->precision = 8;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0.035));
def = this->add("min_width_top_surface", coFloatOrPercent);
@@ -3447,7 +3467,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "perimeter_extrusion_width";
def->min = 0;
def->max_literal = { 15, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("min_print_speed", coFloats);
@@ -3456,7 +3476,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Slic3r will never scale the speed below this one.");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 10. });
@@ -3468,9 +3488,22 @@ void PrintConfigDef::init_fff_params()
"this minimum applies to each extruder.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
+ def = this->add("model_precision", coFloat);
+ def->label = L("Model rounding precision");
+ def->full_label = L("Model rounding precision");
+ def->category = OptionCategory::slicing;
+ def->tooltip = L("This is the rounding error of the input object."
+ " It's used to align points that should be in the same line."
+ "\nSet zero to disable.");
+ def->sidetext = L("mm");
+ def->min = 0;
+ def->precision = 8;
+ def->mode = comAdvancedE | comSuSi;
+ def->set_default_value(new ConfigOptionFloat(0.0001));
+
def = this->add("notes", coString);
def->label = L("Configuration notes");
def->category = OptionCategory::notes;
@@ -3479,7 +3512,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 13;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("nozzle_diameter", coFloats);
@@ -3487,7 +3520,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("This is the diameter of your extruder nozzle (for example: 0.5, 0.35 etc.)");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 0.4 });
@@ -3515,32 +3548,10 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back("Klipper");
def->enum_labels.push_back("MPMDv2");
def->enum_labels.push_back("MKS");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->cli = ConfigOptionDef::nocli;
def->set_default_value(new ConfigOptionEnum<PrintHostType>(htOctoPrint));
- def = this->add("printhost_apikey", coString);
- def->label = L("API Key / Password");
- def->category = OptionCategory::general;
- def->tooltip = L("Slic3r can upload G-code files to a printer host. This field should contain "
- "the API Key or the password required for authentication.");
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionString(""));
-
- def = this->add("printhost_cafile", coString);
- def->label = L("HTTPS CA File");
- def->tooltip = L("Custom CA certificate file can be specified for HTTPS OctoPrint connections, in crt/pem format. "
- "If left blank, the default OS CA certificate repository is used.");
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionString(""));
-
- def = this->add("printhost_client_cert", coString);
- def->label = L("Client Certificate File");
- def->tooltip = L("Custom Client certificate file can be specified for 2-way ssl authentication, in p12/pfx format. "
- "If left blank, no client certificate is used.");
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionString(""));
-
def = this->add("print_custom_variables", coString);
def->label = L("Custom variables");
def->full_label = L("Custom Print variables");
@@ -3555,23 +3566,36 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 13;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionString{ "" });
- def = this->add("print_host", coString);
- def->label = L("Hostname, IP or URL");
- def->category = OptionCategory::general;
- def->tooltip = L("Slic3r can upload G-code files to a printer host. This field should contain "
- "the hostname, IP address or URL of the printer host instance.");
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionString(""));
+ def = this->add("only_one_perimeter_first_layer", coBool);
+ def->label = L("Only one perimeter on First layer");
+ def->category = OptionCategory::perimeter;
+ def->tooltip = L("Use only one perimeter on first layer, to give more space to the top infill pattern.");
+ def->mode = comAdvancedE | comSuSi;
+ def->set_default_value(new ConfigOptionBool(false));
+
+ def = this->add("only_one_perimeter_top", coBool);
+ def->label = L("Only one perimeter on Top surfaces");
+ def->category = OptionCategory::perimeter;
+ def->tooltip = L("Use only one perimeter on flat top surface, to give more space to the top infill pattern.");
+ def->mode = comSimpleAE | comSuSi;
+ def->set_default_value(new ConfigOptionBool(true));
+
+ def = this->add("only_one_perimeter_top_other_algo", coBool);
+ def->label = L("Only one peri - other algo");
+ def->category = OptionCategory::perimeter;
+ def->tooltip = L("If you have some problem with the 'Only one perimeter on Top surfaces' option, you can try to activate this on the problematic layer.");
+ def->mode = comHidden;
+ def->set_default_value(new ConfigOptionBool(false));
def = this->add("only_retract_when_crossing_perimeters", coBool);
def->label = L("Only retract when crossing perimeters");
def->category = OptionCategory::extruders;
def->tooltip = L("Disables retraction when the travel path does not exceed the upper layer's perimeters "
"(and thus any ooze will probably be invisible).");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("ooze_prevention", coBool);
@@ -3580,7 +3604,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("This option will drop the temperature of the inactive extruders to prevent oozing. "
"It will enable a tall skirt automatically and move extruders outside such "
"skirt when changing temperatures.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("output_filename_format", coString);
@@ -3591,7 +3615,7 @@ void PrintConfigDef::init_fff_params()
"{year}, {month}, {day}, {hour}, {minute}, {second}, {version}, {input_filename}, "
"{input_filename_base}.");
def->full_width = true;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString("{input_filename_base}.gcode"));
def = this->add("overhangs_acceleration", coFloatOrPercent);
@@ -3605,7 +3629,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "bridge_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("overhangs_speed", coFloatOrPercent);
@@ -3618,7 +3642,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s");
def->ratio_over = "bridge_speed";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("overhangs_width_speed", coFloatOrPercent);
@@ -3630,7 +3654,7 @@ void PrintConfigDef::init_fff_params()
" Set to 0 to deactivate overhangs.");
def->ratio_over = "nozzle_diameter";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(55,true));
def = this->add("overhangs_width", coFloatOrPercent);
@@ -3643,7 +3667,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "nozzle_diameter";
def->min = 0;
def->max_literal = { 10, true };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(75, true));
def = this->add("overhangs_reverse", coBool);
@@ -3652,7 +3676,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::perimeter;
def->tooltip = L("Extrude perimeters that have a part over an overhang in the reverse direction on odd layers. This alternating pattern can drastically improve steep overhang."
"\n!! this is a very slow algorithm (it uses the same results as extra_perimeters_overhangs) !!");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("overhangs_reverse_threshold", coFloatOrPercent);
@@ -3663,7 +3687,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "perimeter_extrusion_width";
def->min = 0;
def->max_literal = { 20, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(250, true));
def = this->add("no_perimeter_unsupported_algo", coEnum);
@@ -3687,7 +3711,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Keep only bridges"));
def->enum_labels.push_back(L("Keep bridges and overhangs"));
def->enum_labels.push_back(L("Fill the voids with bridges"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionEnum<NoPerimeterUnsupportedAlgo>(npuaNone));
def = this->add("parking_pos_retraction", coFloat);
@@ -3696,7 +3720,7 @@ void PrintConfigDef::init_fff_params()
"when unloaded. This should match the value in printer firmware. ");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(92.f));
def = this->add("extra_loading_move", coFloat);
@@ -3705,7 +3729,7 @@ void PrintConfigDef::init_fff_params()
"is exactly the same as it was moved back during unload. When positive, it is loaded further, "
" if negative, the loading move is shorter than unloading. ");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(-2.f));
def = this->add("perimeter_acceleration", coFloatOrPercent);
@@ -3719,7 +3743,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "default_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("perimeter_bonding", coPercent);
@@ -3736,7 +3760,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 50;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(0));
def = this->add("perimeter_extruder", coInt);
@@ -3745,7 +3769,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("The extruder to use when printing perimeters and brim. First extruder is 1.");
def->aliases = { "perimeters_extruder" };
def->min = 1;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("perimeter_extrusion_width", coFloatOrPercent);
@@ -3765,7 +3789,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, true));
def = this->add("perimeter_extrusion_spacing", coFloatOrPercent);
@@ -3783,7 +3807,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true, false));
def = this->add("perimeter_loop", coBool);
@@ -3792,7 +3816,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::perimeter;
def->tooltip = L("Join the perimeters to create only one continuous extrusion without any z-hop."
" Long inside travel (from external to holes) are not extruded to give some space to the infill.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("perimeter_loop_seam", coEnum);
@@ -3805,7 +3829,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("rear");
def->enum_labels.push_back(L("Nearest"));
def->enum_labels.push_back(L("Rear"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spRear));
def = this->add("perimeter_overlap", coPercent);
@@ -3818,7 +3842,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("perimeter_round_corners", coBool);
@@ -3828,7 +3852,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Internal perimeters will go around sharp corners by turning around instead of making the same sharp corner."
" This can help when there are visible holes in sharp corners on perimeters. It also help to print the letters on the benchy stern."
"\nCan incur some more processing time, and corners are a bit less sharp.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("perimeter_speed", coFloatOrPercent);
@@ -3842,7 +3866,7 @@ void PrintConfigDef::init_fff_params()
def->aliases = { "perimeter_feed_rate" };
def->ratio_over = "default_speed";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(60, true));
def = this->add("perimeters", coInt);
@@ -3857,6 +3881,7 @@ void PrintConfigDef::init_fff_params()
def->aliases = { "perimeter_offsets" };
def->min = 0;
def->max = 10000;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInt(3));
def = this->add("post_process", coStrings);
@@ -3870,7 +3895,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 6;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionStrings());
def = this->add("printer_custom_variables", coString);
@@ -3887,7 +3912,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 13;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionString{ "" });
def = this->add("printer_model", coString);
@@ -3903,7 +3928,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 13;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("printer_vendor", coString);
@@ -3936,7 +3961,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("The vertical distance between object and raft. Ignored for soluble interface.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.1));
def = this->add("raft_expansion", coFloat);
@@ -3945,7 +3970,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Expansion of the raft in XY plane for better stability.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.5));
def = this->add("raft_first_layer_density", coPercent);
@@ -3956,7 +3981,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 10;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionPercent(90));
def = this->add("raft_first_layer_expansion", coFloat);
@@ -3966,7 +3991,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Expansion of the first raft or support layer to improve adhesion to print bed.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(3.));
def = this->add("raft_layers", coInt);
@@ -3976,7 +4001,7 @@ void PrintConfigDef::init_fff_params()
"will be generated under it.");
def->sidetext = L("layers");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("resolution", coFloat);
@@ -3991,7 +4016,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm");
def->min = 0;
def->precision = 8;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.0125));
//TODO: remove from supersliser, as it's kind of like min_length, but with a better name and badly put into the print profile.
@@ -4004,7 +4029,7 @@ void PrintConfigDef::init_fff_params()
"the G-code reduction is performed at each layer independently, visible artifacts may be produced.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.0125));
def = this->add("resolution_internal", coFloat);
@@ -4015,7 +4040,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm");
def->min = 0.001;
def->precision = 8;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0.2));
def = this->add("retract_before_travel", coFloats);
@@ -4023,7 +4048,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("Retraction is not triggered when travel moves are shorter than this length.");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->min = 0;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 2. });
@@ -4034,7 +4059,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("With bowden extruders, it may be wise to do some amount of quick retract "
"before doing the wipe movement.");
def->sidetext = L("%");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionPercents { 0. });
@@ -4042,7 +4067,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Retract on layer change");
def->category = OptionCategory::extruders;
def->tooltip = L("This flag enforces a retraction whenever a Z move is done (before it).");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools { false });
@@ -4054,6 +4079,7 @@ void PrintConfigDef::init_fff_params()
"(the length is measured on raw filament, before it enters the extruder).");
def->sidetext = L("mm (zero to disable)");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 2. });
@@ -4061,7 +4087,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Retraction length");
def->category = OptionCategory::filament;
def->tooltip = L("Override the retract_length setting from the printer config. Used for calibration. Set negative to disable");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat( -1.f));
def = this->add("retract_length_toolchange", coFloats);
@@ -4072,7 +4098,7 @@ void PrintConfigDef::init_fff_params()
"the extruder)."
"\nNote: This value will be unretracted when this extruder will load the next time.");
def->sidetext = L("mm (zero to disable)");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->min = 0;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 10. });
@@ -4084,6 +4110,7 @@ void PrintConfigDef::init_fff_params()
"is triggered. When using multiple extruders, only the setting for the first extruder "
"will be considered.");
def->sidetext = L("mm");
+ def->mode = comSimpleAE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -4094,7 +4121,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("If you set this to a positive value, Z lift will only take place above the specified "
"absolute Z. You can tune this setting for skipping lift on the first layers.");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -4108,7 +4135,7 @@ void PrintConfigDef::init_fff_params()
"the specified absolute Z. You can tune this setting for limiting lift "
"to the first layers.");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -4118,7 +4145,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("Select this option to enforce z-lift on the first layer."
"\nUseful to still use the lift on the first layer even if the 'Only lift Z below' (retract_lift_above) is higher than 0.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools{ false });
@@ -4132,7 +4159,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back(("All surfaces"));
def->enum_values.push_back(("Not on top"));
def->enum_values.push_back(("Only on top"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings{ "All surfaces" });
@@ -4142,7 +4169,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("When the retraction is compensated after the travel move, the extruder will push "
"this additional amount of filament. This setting is rarely needed.");
def->sidetext = L("mm");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -4153,7 +4180,7 @@ void PrintConfigDef::init_fff_params()
"this additional amount of filament"
" (but not on the first extruder after start, as it should already be loaded).");
def->sidetext = L("mm");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -4163,7 +4190,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("The speed for retractions (this only applies to the extruder motor).");
def->sidetext = L("mm/s");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->min = 0.001;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 40. });
@@ -4175,7 +4202,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("The speed for loading of a filament into extruder after retraction "
"(this only applies to the extruder motor). If left as zero, the retraction speed is used.");
def->sidetext = L("mm/s");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats { 0. });
@@ -4193,7 +4220,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Random"));
def->enum_labels.push_back(L("Aligned"));
def->enum_labels.push_back(L("Rear"));
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spCost));
def = this->add("seam_angle_cost", coPercent);
@@ -4203,7 +4230,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Cost of placing the seam at a bad angle. The worst angle (max penalty) is when it's flat.");
def->sidetext = L("%");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(80));
def = this->add("seam_travel_cost", coPercent);
@@ -4213,7 +4240,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Cost of moving the extruder. The highest penalty is when the point is the furthest from the position of the extruder before extruding the external perimeter");
def->sidetext = L("%");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(20));
def = this->add("seam_gap", coFloatsOrPercents);
@@ -4224,7 +4251,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm or %");
def->min = 0;
def->max_literal = { 5, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloatsOrPercents{ FloatOrPercent{15,true} });
@@ -4237,7 +4264,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Seam preferred direction");
def->min = 0;
def->max = 360;
- def->set_default_value(new ConfigOptionFloat(0);
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("seam_preferred_direction_jitter", coFloat);
@@ -4248,7 +4275,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Preferred direction of the seam - jitter");
def->min = 0;
def->max = 360;
- def->set_default_value(new ConfigOptionFloat(30);
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(30));
#endif
def = this->add("skirt_brim", coInt);
@@ -4257,7 +4284,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::skirtBrim;
def->tooltip = L("Extra skirt lines on the first layer.");
def->sidetext = L("lines");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("skirt_distance", coFloat);
@@ -4266,7 +4293,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Distance between skirt and object(s) ; or from the brim if using draft shield or you set 'skirt_distance_from_brim'.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(6));
def = this->add("skirt_distance_from_brim", coBool);
@@ -4274,7 +4301,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Skirt distance from brim");
def->category = OptionCategory::skirtBrim;
def->tooltip = L("The distance is computed from the brim and not from the objects");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("skirt_height", coInt);
@@ -4283,7 +4310,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Height of skirt expressed in layers. Set this to a tall value to use skirt "
"as a shield against drafts.");
def->sidetext = L("layers");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("skirt_extrusion_width", coFloatOrPercent);
@@ -4299,7 +4326,7 @@ void PrintConfigDef::init_fff_params()
def->max = 1000;
def->max_literal = { 10, true };
def->precision = 6;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(130, true));
def = this->add("skirts", coInt);
@@ -4310,7 +4337,7 @@ void PrintConfigDef::init_fff_params()
"the number of loops might be greater than the one configured here. Set zero "
"to disable skirt completely.");
def->min = 0;
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("slicing_mode", coEnum);
@@ -4324,7 +4351,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Regular"));
def->enum_labels.push_back(L("Even-odd"));
def->enum_labels.push_back(L("Close holes"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<SlicingMode>(SlicingMode::Regular));
def = this->add("slowdown_below_layer_time", coInts);
@@ -4336,7 +4363,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("approximate seconds");
def->min = 0;
def->max = 1000;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts{ 5 });
@@ -4350,7 +4377,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "perimeter_speed";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("small_perimeter_min_length", coFloatOrPercent);
@@ -4363,7 +4390,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "nozzle_diameter";
def->min = 0;
def->max_literal = { 100, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(6, false));
@@ -4378,72 +4405,16 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "nozzle_diameter";
def->min = 0;
def->max_literal = { 500, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(20, false));
- def = this->add("curve_smoothing_angle_convex", coFloat);
- def->label = L("Min convex angle");
- def->full_label = L("Curve smoothing minimum angle (convex)");
- def->category = OptionCategory::slicing;
- def->tooltip = L("Minimum (convex) angle at a vertex to enable smoothing"
- " (trying to create a curve around the vertex). "
- "180 : nothing will be smooth, 0 : all angles will be smoothened.");
- def->sidetext = L("°");
- def->aliases = { "curve_smoothing_angle" };
- def->cli = "curve-smoothing-angle-convex=f";
- def->min = 0;
- def->max = 180;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(0));
-
- def = this->add("curve_smoothing_angle_concave", coFloat);
- def->label = L("Min concave angle");
- def->full_label = L("Curve smoothing minimum angle (concave)");
- def->category = OptionCategory::slicing;
- def->tooltip = L("Minimum (concave) angle at a vertex to enable smoothing"
- " (trying to create a curve around the vertex). "
- "180 : nothing will be smooth, 0 : all angles will be smoothened.");
- def->sidetext = L("°");
- def->cli = "curve-smoothing-angle-concave=f";
- def->min = 0;
- def->max = 180;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(0));
-
- def = this->add("curve_smoothing_precision", coFloat);
- def->label = L("Precision");
- def->full_label = L("Curve smoothing precision");
- def->category = OptionCategory::slicing;
- def->tooltip = L("These parameters allow the slicer to smooth the angles in each layer. "
- "The precision will be at least the new precision of the curve. Set to 0 to deactivate."
- "\nNote: as it uses the polygon's edges and only works in the 2D planes, "
- "you must have a very clean or hand-made 3D model."
- "\nIt's really only useful to smoothen functional models or very wide angles.");
- def->sidetext = L("mm");
- def->min = 0;
- def->precision = 8;
- def->cli = "curve-smoothing-precision=f";
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(0));
-
- def = this->add("curve_smoothing_cutoff_dist", coFloat);
- def->label = L("cutoff");
- def->full_label = L("Curve smoothing cutoff dist");
- def->category = OptionCategory::slicing;
- def->tooltip = L("Maximum distance between two points to allow adding new ones. Allow to avoid distorting long strait areas.\nSet zero to disable.");
- def->sidetext = L("mm");
- def->min = 0;
- def->cli = "curve-smoothing-cutoff-dist=f";
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(2));
-
def = this->add("solid_infill_below_area", coFloat);
def->label = L("Solid infill threshold area");
def->category = OptionCategory::infill;
def->tooltip = L("Force solid infill for regions having a smaller area than the specified threshold.");
def->sidetext = L("mm²");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(70));
def = this->add("solid_infill_overlap", coPercent);
@@ -4454,7 +4425,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("%");
def->min = 0;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(100));
def = this->add("solid_infill_extruder", coInt);
@@ -4462,7 +4433,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("The extruder to use when printing solid infill.");
def->min = 1;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("solid_infill_every_layers", coInt);
@@ -4474,7 +4445,7 @@ void PrintConfigDef::init_fff_params()
"to combine according to nozzle diameter and layer height.");
def->sidetext = L("layers");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("solid_infill_extrusion_width", coFloatOrPercent);
@@ -4492,7 +4463,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, true));
def = this->add("solid_infill_extrusion_spacing", coFloatOrPercent);
@@ -4508,7 +4479,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true, false));
def = this->add("solid_infill_speed", coFloatOrPercent);
@@ -4522,9 +4493,10 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "default_speed";
def->aliases = { "solid_infill_feed_rate" };
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(30, true));
+#if 0
def = this->add("solid_layers", coInt);
def->label = L("Solid layers");
def->category = OptionCategory::slicing;
@@ -4532,6 +4504,7 @@ void PrintConfigDef::init_fff_params()
def->shortcut.push_back("top_solid_layers");
def->shortcut.push_back("bottom_solid_layers");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def = this->add("solid_min_thickness", coFloat);
def->label = L("Minimum thickness of a top / bottom shell");
@@ -4539,6 +4512,8 @@ void PrintConfigDef::init_fff_params()
def->shortcut.push_back("top_solid_min_thickness");
def->shortcut.push_back("bottom_solid_min_thickness");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
+#endif
def = this->add("spiral_vase", coBool);
def->label = L("Spiral vase");
@@ -4548,6 +4523,7 @@ void PrintConfigDef::init_fff_params()
"no infill, no top solid layers and no support material. You can still set "
"any number of bottom solid layers as well as skirt/brim loops. "
"It won't work when printing more than one single object.");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("standby_temperature_delta", coInt);
@@ -4557,7 +4533,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = "∆°C";
def->min = -max_temp;
def->max = max_temp;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionInt(-5));
def = this->add("start_gcode", coString);
@@ -4574,7 +4550,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString("G28 ; home all axes\nG1 Z5 F5000 ; lift nozzle\n"));
def = this->add("start_gcode_manual", coBool);
@@ -4582,7 +4558,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::customgcode;
def->tooltip = L("Ensure that the slicer won't add heating, fan, extruder... commands before or just after your start-gcode."
"If set to true, you have to write a good and complete start_gcode, as no checks are made anymore.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("start_filament_gcode", coStrings);
@@ -4601,30 +4577,17 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings { "; Filament gcode\n" });
- def = this->add("model_precision", coFloat);
- def->label = L("Model rounding precision");
- def->full_label = L("Model rounding precision");
- def->category = OptionCategory::slicing;
- def->tooltip = L("This is the rounding error of the input object."
- " It's used to align points that should be in the same line."
- "\nSet zero to disable.");
- def->sidetext = L("mm");
- def->min = 0;
- def->precision = 8;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(0.0001));
-
def = this->add("color_change_gcode", coString);
def->label = L("Color change G-code");
def->tooltip = L("This G-code will be used as a code for the color change");
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString("M600"));
def = this->add("pause_print_gcode", coString);
@@ -4633,7 +4596,7 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString("M601"));
def = this->add("template_custom_gcode", coString);
@@ -4642,21 +4605,21 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("single_extruder_multi_material", coBool);
def->label = L("Single Extruder Multi Material");
def->category = OptionCategory::mmsetup;
def->tooltip = L("The printer multiplexes filaments into a single hot end.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("single_extruder_multi_material_priming", coBool);
def->label = L("Prime all printing extruders");
def->category = OptionCategory::mmsetup;
def->tooltip = L("If enabled, all printing extruders will be primed at the front edge of the print bed at the start of the print.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("wipe_tower_no_sparse_layers", coBool);
@@ -4665,7 +4628,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("If enabled, the wipe tower will not be printed on layers with no toolchanges. "
"On layers with a toolchange, extruder will travel downward to print the wipe tower. "
"User is responsible for ensuring there is no collision with the print.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("solid_infill_acceleration", coFloatOrPercent);
@@ -4679,7 +4642,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "default_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("solid_over_perimeters", coInt);
@@ -4699,13 +4662,14 @@ void PrintConfigDef::init_fff_params()
"\nSet zero to disable."
"\n!! ensure_vertical_shell_thickness needs to be activated so this algorithm can work !!.");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionInt(2));
def = this->add("support_material", coBool);
def->label = L("Generate support material");
def->category = OptionCategory::support;
def->tooltip = L("Enable support material generation.");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("support_material_acceleration", coFloatOrPercent);
@@ -4719,7 +4683,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "default_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("support_material_auto", coBool);
@@ -4727,7 +4691,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::support;
def->tooltip = L("If checked, supports will be generated automatically based on the overhang threshold value."\
" If unchecked, supports will be generated inside the \"Support Enforcer\" volumes only.");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("support_material_interface_acceleration", coFloatOrPercent);
@@ -4741,7 +4705,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "support_material_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("support_material_xy_spacing", coFloatOrPercent);
@@ -4753,7 +4717,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "external_perimeter_extrusion_width";
def->min = 0;
def->max_literal = { 10, false};
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
// Default is half the external perimeter width.
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
@@ -4765,14 +4729,14 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°");
def->min = 0;
def->max = 359;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("support_material_buildplate_only", coBool);
def->label = L("Support on build plate only");
def->category = OptionCategory::support;
def->tooltip = L("Only create support if it lies on a build plate. Don't create support on a print.");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("support_material_contact_distance_type", coEnum);
@@ -4790,7 +4754,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("From filament"));
def->enum_labels.push_back(L("From plane"));
def->enum_labels.push_back(L("None (soluble)"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionEnum<SupportZDistanceType>(zdPlane));
def = this->add("support_material_contact_distance", coFloatOrPercent);
@@ -4805,7 +4769,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm");
def->min = 0;
def->max_literal = { 20, true };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->aliases = { "support_material_contact_distance_top" }; // Sli3r, PS
def->set_default_value(new ConfigOptionFloatOrPercent(0.2, false));
@@ -4822,12 +4786,14 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("0");
def->enum_values.push_back("0.1");
def->enum_values.push_back("0.2");
+ def->enum_values.push_back("50%");
def->enum_labels.push_back(L("Same as top"));
def->enum_labels.push_back("0.1");
def->enum_labels.push_back("0.2");
+ def->enum_values.push_back("50%");
def->min = 0;
def->max_literal = { 20, true };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->aliases = { "support_material_contact_distance_bottom" }; //since PS 2.4
def->set_default_value(new ConfigOptionFloatOrPercent(0.2,false));
@@ -4841,7 +4807,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("layers");
def->full_label = L("Enforce support for the first n layers");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("support_material_extruder", coInt);
@@ -4850,7 +4816,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("The extruder to use when printing support material "
"(1+, 0 to use the current extruder to minimize tool changes).");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("support_material_extrusion_width", coFloatOrPercent);
@@ -4866,14 +4832,14 @@ void PrintConfigDef::init_fff_params()
def->max = 1000;
def->max_literal = { 10, true };
def->precision = 6;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false));
def = this->add("support_material_interface_contact_loops", coBool);
def->label = L("Interface loops");
def->category = OptionCategory::support;
def->tooltip = L("Cover the top contact layer of the supports with loops. Disabled by default.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("support_material_interface_extruder", coInt);
@@ -4882,7 +4848,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("The extruder to use when printing support material interface "
"(1+, 0 to use the current extruder to minimize tool changes). This affects raft too.");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(0));
auto support_material_interface_layers = def = this->add("support_material_interface_layers", coInt);
@@ -4900,7 +4866,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("1 (light)"));
def->enum_labels.push_back(L("2 (default)"));
def->enum_labels.push_back(L("3 (heavy)"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(3));
def = this->add("support_material_bottom_interface_layers", coInt);
@@ -4916,7 +4882,7 @@ void PrintConfigDef::init_fff_params()
//TRN To be shown in Print Settings "Bottom interface layers". Have to be as short as possible
def->enum_labels.push_back(L("Same as top"));
append(def->enum_labels, support_material_interface_layers->enum_labels);
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(-1));
def = this->add("support_material_closing_radius", coFloat);
@@ -4926,7 +4892,7 @@ void PrintConfigDef::init_fff_params()
" Gaps smaller than the closing radius will be filled in.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(2));
def = this->add("support_material_interface_spacing", coFloat);
@@ -4935,7 +4901,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Spacing between interface lines. Set zero to get a solid interface.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("support_material_interface_speed", coFloatOrPercent);
@@ -4948,7 +4914,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "support_material_speed";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("support_material_pattern", coEnum);
@@ -4963,7 +4929,7 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Rectilinear"));
def->enum_labels.push_back(L("Rectilinear grid"));
def->enum_labels.push_back(L("Honeycomb"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<SupportMaterialPattern>(smpRectilinear));
def = this->add("support_material_interface_pattern", coEnum);
@@ -4971,25 +4937,25 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Support interface pattern");
def->category = OptionCategory::support;
def->tooltip = L("Pattern for interface layers."
- "\nNote that 'Hilbert', 'Ironing' and '(filled)' patterns are meant to eb used with soluble supports and 100% fill interface layer.");
+ "\nNote that 'Hilbert', 'Ironing' and '(filled)' patterns are meant to be used with soluble supports and 100% fill interface layer.");
def->enum_keys_map = &ConfigOptionEnum<InfillPattern>::get_enum_values();
def->enum_values.push_back("auto");
def->enum_values.push_back("rectilinear");
def->enum_values.push_back("monotonic");
def->enum_values.push_back("concentric");
- def->enum_values.push_back("concentricgapfill");
- def->enum_values.push_back("hilbertcurve");
def->enum_values.push_back("sawtooth");
+ def->enum_values.push_back("hilbertcurve");
+ def->enum_values.push_back("concentricgapfill");
def->enum_values.push_back("smooth");
def->enum_labels.push_back(L("Default"));
def->enum_labels.push_back(L("Rectilinear"));
def->enum_labels.push_back(L("Monotonic"));
def->enum_labels.push_back(L("Concentric"));
- def->enum_labels.push_back(L("Concentric (filled)"));
- def->enum_labels.push_back(L("Hilbert Curve"));
def->enum_labels.push_back(L("Sawtooth"));
+ def->enum_labels.push_back(L("Hilbert Curve"));
+ def->enum_labels.push_back(L("Concentric (filled)"));
def->enum_labels.push_back(L("Ironing"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipRectilinear));
def = this->add("support_material_spacing", coFloat);
@@ -4998,7 +4964,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Spacing between support material lines.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(2.5));
def = this->add("support_material_speed", coFloatOrPercent);
@@ -5011,7 +4977,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "default_speed";
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(60, true));
def = this->add("support_material_style", coEnum);
@@ -5026,7 +4992,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("snug");
def->enum_labels.push_back(L("Grid"));
def->enum_labels.push_back(L("Snug"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<SupportMaterialStyle>(smsGrid));
def = this->add("support_material_synchronize_layers", coBool);
@@ -5034,7 +5000,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::support;
def->tooltip = L("Synchronize support layers with the object print layers. This is useful "
"with multi-material printers, where the extruder switch is expensive.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("support_material_threshold", coInt);
@@ -5048,7 +5014,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°");
def->min = 0;
def->max = 90;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("support_material_with_sheath", coBool);
@@ -5056,7 +5022,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::support;
def->tooltip = L("Add a sheath (a single perimeter line) around the base support. This makes "
"the support more reliable, but also more difficult to remove.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("temperature", coInts);
@@ -5069,6 +5035,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Nozzle temperature");
def->min = 0;
def->max = max_temp;
+ def->mode = comSimpleAE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionInts { 200 });
@@ -5076,7 +5043,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Temperature");
def->category = OptionCategory::filament;
def->tooltip = L("Override the temperature of the extruder. Avoid making too many changes, it won't stop for cooling/heating. 0 to disable. May only work on Height range modifiers.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionInt(0));
def = this->add("print_retract_lift", coFloat);
@@ -5084,7 +5051,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::filament;
def->tooltip = L("Set the new lift-z value for this override. 0 will disable the z-lift. -& to disable. May only work on Height range modifiers.");
def->sidetext = L("mm");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(-1));
def = this->add("thin_perimeters", coPercent);
@@ -5095,7 +5062,7 @@ void PrintConfigDef::init_fff_params()
"\n100% means that perimeters can overlap completly on top of each other."
"\n0% will deactivate this setting");
def->sidetext = "%";
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(80));
def = this->add("thin_perimeters_all", coPercent);
@@ -5106,7 +5073,7 @@ void PrintConfigDef::init_fff_params()
"\n100% means that perimeters can overlap completly on top of each other."
"\n0% will deactivate this setting");
def->sidetext = "%";
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionPercent(20));
def = this->add("thin_walls", coBool);
@@ -5116,7 +5083,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Detect single-width walls (parts where two extrusions don't fit and we need "
"to collapse them into a single trace). If unchecked, Slic3r may try to fit perimeters "
"where it's not possible, creating some overlap leading to over-extrusion.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("thin_walls_min_width", coFloatOrPercent);
@@ -5127,7 +5094,7 @@ void PrintConfigDef::init_fff_params()
" If expressed as percentage (for example 110%) it will be computed over nozzle diameter."
" The default behavior of PrusaSlicer is with a 33% value. Put 100% to avoid any sort of over-extrusion.");
def->ratio_over = "nozzle_diameter";
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->min = 0;
def->max_literal = { 20, true };
def->set_default_value(new ConfigOptionFloatOrPercent(33, true));
@@ -5138,7 +5105,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::perimeter;
def->tooltip = L("Overlap between the thin wall and the perimeters. Can be a % of the external perimeter width (default 50%)");
def->ratio_over = "external_perimeter_extrusion_width";
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->min = 0;
def->max_literal = { 10, true };
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
@@ -5149,7 +5116,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::perimeter;
def->tooltip = L("Allow the external perimeter to merge the thin walls in the path."
" You can deactivate this if you are using thin walls as a custom support, to reduce adhesion a little.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("thin_walls_acceleration", coFloatOrPercent);
@@ -5163,7 +5130,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "external_perimeter_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("thin_walls_speed", coFloatOrPercent);
@@ -5176,7 +5143,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "external_perimeter_speed";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("threads", coInt);
@@ -5195,7 +5162,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Time estimation compensation");
def->category = OptionCategory::firmware;
def->tooltip = L("This setting allows you to modify the time estimation by a % amount. As Slic3r only uses the Marlin algorithm, it's not precise enough if another firmware is used.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->sidetext = L("%");
def->min = 0;
def->set_default_value(new ConfigOptionPercent(100));
@@ -5211,17 +5178,31 @@ void PrintConfigDef::init_fff_params()
def->multiline = true;
def->full_width = true;
def->height = 5;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("tool_name", coStrings);
def->label = L("Tool name");
def->category = OptionCategory::extruders;
def->tooltip = L("Only used for Klipper, where you can name the extruder. If not set, will be 'extruderX' with 'X' replaced by the extruder number.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings(""));
+ def = this->add("top_fan_speed", coInts);
+ def->label = L("Top fan speed");
+ def->category = OptionCategory::cooling;
+ def->tooltip = L("This fan speed is enforced during all top fills."
+ "\nSet to 1 to disable the fan."
+ "\nSet to -1 to disable this override."
+ "\nCan only be overriden by disable_fan_first_layers.");
+ def->sidetext = L("%");
+ def->min = -1;
+ def->max = 100;
+ def->mode = comAdvancedE | comSuSi;
+ def->is_vector_extruder = true;
+ def->set_default_value(new ConfigOptionInts{ -1 });
+
def = this->add("top_infill_extrusion_width", coFloatOrPercent);
def->label = L("Top solid infill");
def->category = OptionCategory::width;
@@ -5237,7 +5218,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(105, true, false));
def = this->add("top_infill_extrusion_spacing", coFloatOrPercent);
@@ -5252,7 +5233,7 @@ void PrintConfigDef::init_fff_params()
def->max_literal = { 10, true };
def->precision = 6;
def->can_phony = true;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0, false, true));
def = this->add("top_solid_infill_acceleration", coFloatOrPercent);
@@ -5266,7 +5247,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "solid_infill_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0,false));
def = this->add("top_solid_infill_speed", coFloatOrPercent);
@@ -5281,7 +5262,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s or %");
def->ratio_over = "solid_infill_speed";
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloatOrPercent(50, true));
def = this->add("top_solid_layers", coInt);
@@ -5292,6 +5273,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Number of solid layers to generate on top surfaces.");
def->full_label = L("Top solid layers");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInt(3));
def = this->add("top_solid_min_thickness", coFloat);
@@ -5304,6 +5286,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Minimum top shell thickness");
def->sidetext = L("mm");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.));
def = this->add("travel_acceleration", coFloatOrPercent);
@@ -5317,7 +5300,7 @@ void PrintConfigDef::init_fff_params()
def->ratio_over = "default_acceleration";
def->min = 0;
def->max_literal = { -200, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(1500, false));
def = this->add("travel_deceleration_use_target", coBool);
@@ -5325,7 +5308,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Use target acceleration for travel deceleration");
def->category = OptionCategory::speed;
def->tooltip = L("If selected, the deceleration of a travel will use the acceleration value of the extrusion that will be printed after it (if any) ");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("travel_speed", coFloat);
@@ -5336,7 +5319,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s");
def->aliases = { "travel_feed_rate" };
def->min = 1;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(130));
def = this->add("travel_speed_z", coFloat);
@@ -5348,7 +5331,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm/s");
def->aliases = { "travel_feed_rate_z" };
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.));
def = this->add("use_firmware_retraction", coBool);
@@ -5356,7 +5339,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::general;
def->tooltip = L("This experimental setting uses G10 and G11 commands to have the firmware "
"handle the retraction. This is only supported in recent Marlin.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("use_relative_e_distances", coBool);
@@ -5364,7 +5347,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::general;
def->tooltip = L("If your firmware requires relative E values, check this, "
"otherwise leave it unchecked. Most firmwares use absolute values.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("use_volumetric_e", coBool);
@@ -5376,7 +5359,7 @@ void PrintConfigDef::init_fff_params()
"in your start G-code in order to turn volumetric mode on and use the filament "
"diameter associated to the filament selected in Slic3r. This is only supported "
"in recent Marlin.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("variable_layer_height", coBool);
@@ -5384,7 +5367,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::general;
def->tooltip = L("Some printers or printer setups may have difficulties printing "
"with a variable layer height. Enabled by default.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("wipe", coBools);
@@ -5392,7 +5375,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("This flag will move the nozzle while retracting to minimize the possible blob on leaky extruders."
"\nNote that as a wipe only happens when there is a retraction, the 'only retract when crossing perimeters' print setting can greatly reduce the number of wipes.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools{ false });
@@ -5400,7 +5383,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Wipe only when crossing perimeters");
def->category = OptionCategory::extruders;
def->tooltip = L("Don't wipe when you don't cross a perimeter. Need 'only_retract_when_crossing_perimeters'and 'wipe' enabled.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools{ true });
@@ -5409,7 +5392,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::extruders;
def->tooltip = L("Speed in mm/s of the wipe. If it's faster, it will try to go further away, as the wipe time is set by ( 100% - 'retract before wipe') * 'retaction length' / 'retraction speed'."
"\nIf set to zero, the travel speed is used.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloats{ 0 });
def = this->add("wipe_tower", coBool);
@@ -5418,7 +5401,7 @@ void PrintConfigDef::init_fff_params()
def->category = OptionCategory::general;
def->tooltip = L("Multi material printers may need to prime or purge extruders on tool changes. "
"Extrude the excess material into the wipe tower.");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("wiping_volumes_extruders", coFloats);
@@ -5426,12 +5409,14 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("This vector saves required volumes to change from/to each tool used on the "
"wipe tower. These values are used to simplify creation of the full purging "
"volumes below. ");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloats { 70.f, 70.f, 70.f, 70.f, 70.f, 70.f, 70.f, 70.f, 70.f, 70.f });
def = this->add("wiping_volumes_matrix", coFloats);
def->label = L("Purging volumes - matrix");
def->tooltip = L("This matrix describes volumes (in cubic milimetres) required to purge the"
" new filament on the wipe tower for any given pair of tools. ");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloats { 0.f, 140.f, 140.f, 140.f, 140.f,
140.f, 0.f, 140.f, 140.f, 140.f,
140.f, 140.f, 0.f, 140.f, 140.f,
@@ -5442,22 +5427,22 @@ void PrintConfigDef::init_fff_params()
def = this->add("wipe_advanced", coBool);
def->label = L("Enable advanced wiping volume");
def->tooltip = L("Allow Slic3r to compute the purge volume via smart computations. Use the pigment% of each filament and following parameters");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("wipe_advanced_nozzle_melted_volume", coFloat);
def->label = L("Nozzle volume");
def->tooltip = L("The volume of melted plastic inside your nozzle. Used by 'advanced wiping'.");
def->sidetext = L("mm3");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(120));
def = this->add("filament_wipe_advanced_pigment", coFloats);
def->label = L("Pigment percentage");
def->tooltip = L("The pigment % for this filament (bewteen 0 and 1, 1=100%). 0 for translucent/natural, 0.2-0.5 for white and 1 for black.");
- def->mode = comExpert;
def->min = 0;
def->max = 1;
+ def->mode = comExpert | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 0.5 });
@@ -5466,7 +5451,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Auto-wipe multiplier");
def->tooltip = L("The volume multiplier used to compute the final volume to extrude by the algorithm.");
def->sidetext = L("mm3");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(60));
@@ -5484,14 +5469,14 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Linear"));
def->enum_labels.push_back(L("Quadratric"));
def->enum_labels.push_back(L("Hyperbola"));
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionEnum<WipeAlgo>(waLinear));
def = this->add("wipe_tower_brim_width", coFloatOrPercent);
def->label = L("Wipe tower brim width");
def->tooltip = L("Width of the brim for the wipe tower. Can be in mm or in % of the (assumed) only one nozzle diameter.");
def->ratio_over = "nozzle_diameter";
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->min = 0;
def->max_literal = { 100, true };
def->aliases = { "wipe_tower_brim" }; // SuperSlicer 2.3 and before
@@ -5502,7 +5487,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Wipe tower X");
def->tooltip = L("X coordinate of the left front corner of a wipe tower");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(180.));
def = this->add("wipe_tower_y", coFloat);
@@ -5510,7 +5495,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Wipe tower Y");
def->tooltip = L("Y coordinate of the left front corner of a wipe tower");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(140.));
def = this->add("wipe_tower_width", coFloat);
@@ -5518,14 +5503,14 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Wipe tower Width");
def->tooltip = L("Width of a wipe tower");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(60.));
def = this->add("wipe_tower_rotation_angle", coFloat);
def->label = L("Wipe tower rotation angle");
def->tooltip = L("Wipe tower rotation angle with respect to x-axis.");
def->sidetext = L("°");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.));
def = this->add("wipe_into_infill", coBool);
@@ -5534,6 +5519,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Purging after toolchange will be done inside this object's infills. "
"This lowers the amount of waste but may result in longer print time "
" due to additional travel moves.");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("wipe_into_objects", coBool);
@@ -5542,6 +5528,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Object will be used to purge the nozzle after a toolchange to save material "
"that would otherwise end up in the wipe tower and decrease print time. "
"Colours of the objects will be mixed as a result.");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("wipe_extra_perimeter", coFloats);
@@ -5551,7 +5538,7 @@ void PrintConfigDef::init_fff_params()
" The number in this settting increases the wipe by moving the nozzle along the loop again before the final wipe.");
def->min = 0;
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats{ 0.f });
@@ -5559,7 +5546,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Maximal bridging distance");
def->tooltip = L("Maximal distance between supports on sparse infill sections. ");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(10.));
def = this->add("xy_size_compensation", coFloat);
@@ -5571,7 +5558,7 @@ void PrintConfigDef::init_fff_params()
"\nThis one only applies to the 'exterior' shell of the object."
"\n !!! it's recommended you put the same value into the 'Inner XY size compensation', unless you are sure you don't have horizontal holes. !!! ");
def->sidetext = L("mm");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("xy_inner_size_compensation", coFloat);
@@ -5582,7 +5569,7 @@ void PrintConfigDef::init_fff_params()
"(negative = inwards, positive = outwards). This might be useful for fine-tuning sizes."
"\nThis one only applies to the 'inner' shell of the object (!!! horizontal holes break the shell !!!)");
def->sidetext = L("mm");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("hole_size_compensation", coFloat);
@@ -5594,7 +5581,7 @@ void PrintConfigDef::init_fff_params()
" This might be useful for fine-tuning hole sizes."
"\nThis setting behaves the same as 'Inner XY size compensation' but only for convex shapes. It's added to 'Inner XY size compensation', it does not replace it. ");
def->sidetext = L("mm");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("hole_size_threshold", coFloat);
@@ -5605,7 +5592,7 @@ void PrintConfigDef::init_fff_params()
" After that, it will decrease down to 0 for four times this area."
" Set to 0 to let the hole_size_compensation apply fully for all detected holes");
def->sidetext = L("mm²");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(100));
def = this->add("hole_to_polyhole", coBool);
@@ -5615,7 +5602,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Search for almost-circular holes that span more than one layer and convert the geometry to polyholes."
" Use the nozzle size and the (biggest) diameter to compute the polyhole."
"\nSee http://hydraraptor.blogspot.com/2011/02/polyholes.html");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("hole_to_polyhole_threshold", coFloatOrPercent);
@@ -5628,7 +5615,7 @@ void PrintConfigDef::init_fff_params()
"\nIn mm or in % of the radius.");
def->sidetext = L("mm or %");
def->max_literal = { 10, false};
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(0.01, false));
def = this->add("hole_to_polyhole_twisted", coBool);
@@ -5636,7 +5623,7 @@ void PrintConfigDef::init_fff_params()
def->full_label = L("Polyhole twist");
def->category = OptionCategory::slicing;
def->tooltip = L("Rotate the polyhole every layer.");
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("z_offset", coFloat);
@@ -5647,7 +5634,7 @@ void PrintConfigDef::init_fff_params()
"for example, if your endstop zero actually leaves the nozzle 0.3mm far "
"from the print bed, set this to -0.3 (or fix your endstop).");
def->sidetext = L("mm");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("z_step", coFloat);
@@ -5660,7 +5647,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("mm");
def->min = 0;
def->precision = 8;
- def->mode = comExpert;
+ def->mode = comExpert | comSuSi;
def->set_default_value(new ConfigOptionFloat(0.005));
def = this->add("init_z_rotate", coFloat);
@@ -5670,7 +5657,7 @@ void PrintConfigDef::init_fff_params()
def->sidetext = L("°");
def->min = -360;
def->max = 360;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(0.0));
// Declare retract values for filament profile, overriding the printer's extruder profile.
@@ -5795,7 +5782,7 @@ void PrintConfigDef::init_milling_params()
def->category = OptionCategory::milling_extruders;
def->tooltip = L("This is the diameter of your cutting tool.");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats(3.14));
@@ -5807,7 +5794,7 @@ void PrintConfigDef::init_milling_params()
"with respect to the first one. It expects positive coordinates (they will be subtracted "
"from the XY coordinate).");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionPoints( Vec2d(0,0) ));
@@ -5816,7 +5803,7 @@ void PrintConfigDef::init_milling_params()
def->category = OptionCategory::extruders;
def->tooltip = L(".");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionFloats(0));
@@ -5825,7 +5812,7 @@ void PrintConfigDef::init_milling_params()
def->category = OptionCategory::extruders;
def->tooltip = L("Amount of lift for travel.");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloats(2));
def = this->add("milling_toolchange_start_gcode", coStrings);
@@ -5838,7 +5825,7 @@ void PrintConfigDef::init_milling_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings(""));
@@ -5852,7 +5839,7 @@ void PrintConfigDef::init_milling_params()
def->multiline = true;
def->full_width = true;
def->height = 12;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionStrings(""));
@@ -5861,7 +5848,7 @@ void PrintConfigDef::init_milling_params()
def->category = OptionCategory::milling;
def->tooltip = L("If activated, at the end of each layer, the printer will switch to a milling head and mill the external perimeters."
"\nYou should set the 'Milling extra XY size' to a value high enough to have enough plastic to mill. Also, be sure that your piece is firmly glued to the bed.");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comSuSi;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("milling_extra_size", coFloatOrPercent);
@@ -5872,7 +5859,7 @@ void PrintConfigDef::init_milling_params()
def->sidetext = L("mm or %");
def->ratio_over = "computed_on_the_fly";
def->max_literal = { 20, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(150, true));
def = this->add("milling_after_z", coFloatOrPercent);
@@ -5882,7 +5869,7 @@ void PrintConfigDef::init_milling_params()
def->sidetext = L("mm or %");
def->ratio_over = "first_layer_height";
def->max_literal = { 10, false };
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloatOrPercent(200, true));
def = this->add("milling_speed", coFloat);
@@ -5891,7 +5878,7 @@ void PrintConfigDef::init_milling_params()
def->tooltip = L("Speed for milling tool.");
def->sidetext = L("mm/s");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comSuSi;
def->set_default_value(new ConfigOptionFloat(30));
}
@@ -5905,12 +5892,14 @@ void PrintConfigDef::init_sla_params()
def->label = L("Display width");
def->tooltip = L("Width of the display");
def->min = 1;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(120.));
def = this->add("display_height", coFloat);
def->label = L("Display height");
def->tooltip = L("Height of the display");
def->min = 1;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(68.));
def = this->add("display_pixels_x", coInt);
@@ -5918,26 +5907,28 @@ void PrintConfigDef::init_sla_params()
def->label = L("X");
def->tooltip = L("Number of pixels in X");
def->min = 100;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInt(2560));
def = this->add("display_pixels_y", coInt);
def->label = L("Y");
def->tooltip = L("Number of pixels in Y");
def->min = 100;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInt(1440));
def = this->add("display_mirror_x", coBool);
def->full_label = L("Display horizontal mirroring");
def->label = L("Mirror horizontally");
def->tooltip = L("Enable horizontal mirroring of output images");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("display_mirror_y", coBool);
def->full_label = L("Display vertical mirroring");
def->label = L("Mirror vertically");
def->tooltip = L("Enable vertical mirroring of output images");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("display_orientation", coEnum);
@@ -5950,7 +5941,7 @@ void PrintConfigDef::init_sla_params()
def->enum_values.push_back("portrait");
def->enum_labels.push_back(L("Landscape"));
def->enum_labels.push_back(L("Portrait"));
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionEnum<SLADisplayOrientation>(sladoPortrait));
def = this->add("fast_tilt_time", coFloat);
@@ -5959,7 +5950,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Time of the fast tilt");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(5.));
def = this->add("slow_tilt_time", coFloat);
@@ -5968,7 +5959,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Time of the slow tilt");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(8.));
def = this->add("area_fill", coFloat);
@@ -5976,7 +5967,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("The percentage of the bed area. \nIf the print area exceeds the specified value, \nthen a slow tilt will be used, otherwise - a fast tilt");
def->sidetext = L("%");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(50.));
def = this->add("relative_correction", coFloats);
@@ -5984,7 +5975,7 @@ void PrintConfigDef::init_sla_params()
def->full_label = L("Printer scaling correction");
def->tooltip = L("Printer scaling correction");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloats( { 1., 1.} ));
def = this->add("relative_correction_x", coFloat);
@@ -5992,7 +5983,7 @@ void PrintConfigDef::init_sla_params()
def->full_label = L("Printer scaling X axis correction");
def->tooltip = L("Printer scaling correction in X axis");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.));
def = this->add("relative_correction_y", coFloat);
@@ -6000,7 +5991,7 @@ void PrintConfigDef::init_sla_params()
def->full_label = L("Printer scaling Y axis correction");
def->tooltip = L("Printer scaling correction in Y axis");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.));
def = this->add("relative_correction_z", coFloat);
@@ -6008,7 +5999,7 @@ void PrintConfigDef::init_sla_params()
def->full_label = L("Printer scaling Z axis correction");
def->tooltip = L("Printer scaling correction in Z axis");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.));
def = this->add("absolute_correction", coFloat);
@@ -6016,7 +6007,7 @@ void PrintConfigDef::init_sla_params()
def->full_label = L("Printer absolute correction");
def->tooltip = L("Will inflate or deflate the sliced 2D polygons according "
"to the sign of the correction.");
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.0));
def = this->add("elephant_foot_min_width", coFloat);
@@ -6025,7 +6016,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Minimum width of features to maintain when doing the first layer compensation.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.2));
def = this->add("gamma_correction", coFloat);
@@ -6037,7 +6028,7 @@ void PrintConfigDef::init_sla_params()
"antialiasing without losing holes in polygons.");
def->min = 0;
def->max = 1;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.0));
@@ -6047,6 +6038,7 @@ void PrintConfigDef::init_sla_params()
def->label = L("Color");
def->tooltip = L("This is only used in the Slic3r interface as a visual help.");
def->gui_type = ConfigOptionDef::GUIType::color;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionString("#29B2B2"));
def = this->add("material_type", coString);
@@ -6059,6 +6051,7 @@ void PrintConfigDef::init_sla_params()
def->enum_values.push_back("Casting");
def->enum_values.push_back("Dental");
def->enum_values.push_back("Heat-resistant");
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionString("Tough"));
def = this->add("initial_layer_height", coFloat);
@@ -6066,6 +6059,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Initial layer height");
def->sidetext = L("mm");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.3));
def = this->add("bottle_volume", coFloat);
@@ -6073,6 +6067,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Bottle volume");
def->sidetext = L("ml");
def->min = 50;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1000.0));
def = this->add("bottle_weight", coFloat);
@@ -6080,6 +6075,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Bottle weight");
def->sidetext = L("kg");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.0));
def = this->add("material_density", coFloat);
@@ -6087,6 +6083,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Density");
def->sidetext = L("g/ml");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.0));
def = this->add("bottle_cost", coFloat);
@@ -6094,6 +6091,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Cost");
def->sidetext = L("money/bottle");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.0));
def = this->add("faded_layers", coInt);
@@ -6101,7 +6099,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Number of the layers needed for the exposure time fade from initial exposure time to the exposure time");
def->min = 3;
def->max = 20;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionInt(10));
def = this->add("min_exposure_time", coFloat);
@@ -6109,7 +6107,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Minimum exposure time");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("max_exposure_time", coFloat);
@@ -6117,7 +6115,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Maximum exposure time");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(100));
def = this->add("exposure_time", coFloat);
@@ -6125,6 +6123,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Exposure time");
def->sidetext = L("s");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(10));
def = this->add("min_initial_exposure_time", coFloat);
@@ -6132,7 +6131,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Minimum initial exposure time");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("max_initial_exposure_time", coFloat);
@@ -6140,7 +6139,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Maximum initial exposure time");
def->sidetext = L("s");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(150));
def = this->add("initial_exposure_time", coFloat);
@@ -6148,34 +6147,35 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Initial exposure time");
def->sidetext = L("s");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(15));
def = this->add("material_correction", coFloats);
def->label = L("Correction for expansion");
def->tooltip = L("Correction for expansion");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloats({ 1., 1., 1. }));
def = this->add("material_correction_x", coFloat);
def->full_label = L("Correction for expansion in X axis");
def->tooltip = L("Correction for expansion in X axis");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.));
def = this->add("material_correction_y", coFloat);
def->full_label = L("Correction for expansion in Y axis");
def->tooltip = L("Correction for expansion in Y axis");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.));
def = this->add("material_correction_z", coFloat);
def->full_label = L("Correction for expansion in Z axis");
def->tooltip = L("Correction for expansion in Z axis");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.));
def = this->add("material_notes", coString);
@@ -6184,7 +6184,7 @@ void PrintConfigDef::init_sla_params()
def->multiline = true;
def->full_width = true;
def->height = 13;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionString(""));
def = this->add("material_vendor", coString);
@@ -6217,7 +6217,7 @@ void PrintConfigDef::init_sla_params()
def->label = L("Generate supports");
def->category = OptionCategory::support;
def->tooltip = L("Generate supports for the models");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("support_head_front_diameter", coFloat);
@@ -6226,7 +6226,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Diameter of the pointing side of the head");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.4));
def = this->add("support_head_penetration", coFloat);
@@ -6234,7 +6234,7 @@ void PrintConfigDef::init_sla_params()
def->category = OptionCategory::support;
def->tooltip = L("How much the pinhead has to penetrate the model surface");
def->sidetext = L("mm");
- def->mode = comAdvanced;
+ def->mode = comSimpleAE | comPrusa;
def->min = 0;
def->set_default_value(new ConfigOptionFloat(0.2));
@@ -6245,7 +6245,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 20;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.0));
def = this->add("support_pillar_diameter", coFloat);
@@ -6255,7 +6255,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 15;
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.0));
def = this->add("support_small_pillar_diameter_percent", coPercent);
@@ -6266,7 +6266,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("%");
def->min = 1;
def->max = 100;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionPercent(50));
def = this->add("support_max_bridges_on_pillar", coInt);
@@ -6276,7 +6276,7 @@ void PrintConfigDef::init_sla_params()
"hold support point pinheads and connect to pillars as small branches.");
def->min = 0;
def->max = 50;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionInt(3));
def = this->add("support_pillar_connection_mode", coEnum);
@@ -6292,14 +6292,14 @@ void PrintConfigDef::init_sla_params()
def->enum_labels.push_back(L("Zig-Zag"));
def->enum_labels.push_back(L("Cross"));
def->enum_labels.push_back(L("Dynamic"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<SLAPillarConnectionMode>(slapcmDynamic));
def = this->add("support_buildplate_only", coBool);
def->label = L("Support on build plate only");
def->category = OptionCategory::support;
def->tooltip = L("Only create support if it lies on a build plate. Don't create support on a print.");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("support_pillar_widening_factor", coFloat);
@@ -6310,7 +6310,7 @@ void PrintConfigDef::init_sla_params()
"full increase.");
def->min = 0;
def->max = 1;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.0));
def = this->add("support_base_diameter", coFloat);
@@ -6320,7 +6320,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 30;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(4.0));
def = this->add("support_base_height", coFloat);
@@ -6329,7 +6329,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("The height of the pillar base cone");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.0));
def = this->add("support_base_safety_distance", coFloat);
@@ -6342,7 +6342,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 10;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1));
def = this->add("support_critical_angle", coFloat);
@@ -6352,7 +6352,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("°");
def->min = 0;
def->max = 90;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(45));
def = this->add("support_max_bridge_length", coFloat);
@@ -6361,7 +6361,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("The max length of a bridge");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(15.0));
def = this->add("support_max_pillar_link_distance", coFloat);
@@ -6371,7 +6371,7 @@ void PrintConfigDef::init_sla_params()
" A zero value will prohibit pillar cascading.");
def->sidetext = L("mm");
def->min = 0; // 0 means no linking
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(10.0));
def = this->add("support_object_elevation", coFloat);
@@ -6384,7 +6384,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 150; // This is the max height of print on SL1
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(5.0));
def = this->add("support_points_density_relative", coInt);
@@ -6393,6 +6393,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("This is a relative measure of support points density.");
def->sidetext = L("%");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionInt(100));
def = this->add("support_points_minimal_distance", coFloat);
@@ -6401,13 +6402,14 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("No support points will be placed closer than this threshold.");
def->sidetext = L("mm");
def->min = 0;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.f));
def = this->add("pad_enable", coBool);
def->label = L("Use pad");
def->category = OptionCategory::pad;
def->tooltip = L("Add a pad underneath the supported model");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(true));
def = this->add("pad_wall_thickness", coFloat);
@@ -6417,7 +6419,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 30;
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(2.0));
def = this->add("pad_wall_height", coFloat);
@@ -6431,7 +6433,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 30;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.));
def = this->add("pad_brim_size", coFloat);
@@ -6442,7 +6444,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 30;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(1.6));
def = this->add("pad_max_merge_distance", coFloat);
@@ -6454,7 +6456,7 @@ void PrintConfigDef::init_sla_params()
"are closer, they will get merged into one pad.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(50.0));
// This is disabled on the UI. I hope it will never be enabled.
@@ -6464,7 +6466,7 @@ void PrintConfigDef::init_sla_params()
//// def->tooltip = L("");
// def->sidetext = L("mm");
// def->min = 0;
-// def->mode = comAdvanced;
+// def->mode = comAdvancedE | comPrusa;
// def->set_default_value(new ConfigOptionFloat(1.0));
def = this->add("pad_wall_slope", coFloat);
@@ -6475,21 +6477,21 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("°");
def->min = 45;
def->max = 90;
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionFloat(90.0));
def = this->add("pad_around_object", coBool);
def->label = L("Pad around object");
def->category = OptionCategory::pad;
def->tooltip = L("Create pad around object and ignore the support elevation");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("pad_around_object_everywhere", coBool);
def->label = L("Pad around object everywhere");
def->category = OptionCategory::pad;
def->tooltip = L("Force pad around object everywhere");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("pad_object_gap", coFloat);
@@ -6500,7 +6502,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 10;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(1));
def = this->add("pad_object_connector_stride", coFloat);
@@ -6509,7 +6511,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Distance between two connector sticks which connect the object and the generated pad.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(10));
def = this->add("pad_object_connector_width", coFloat);
@@ -6518,7 +6520,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Width of the connector sticks which connect the object and the generated pad.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.5));
def = this->add("pad_object_connector_penetration", coFloat);
@@ -6528,14 +6530,14 @@ void PrintConfigDef::init_sla_params()
"How much should the tiny connectors penetrate into the model body.");
def->sidetext = L("mm");
def->min = 0;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.3));
def = this->add("hollowing_enable", coBool);
def->label = L("Enable hollowing");
def->category = OptionCategory::hollowing;
def->tooltip = L("Hollow out a model to have an empty interior");
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("hollowing_min_thickness", coFloat);
@@ -6545,7 +6547,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 1;
def->max = 10;
- def->mode = comSimple;
+ def->mode = comSimpleAE | comPrusa;
def->set_default_value(new ConfigOptionFloat(3.));
def = this->add("hollowing_quality", coFloat);
@@ -6554,7 +6556,7 @@ void PrintConfigDef::init_sla_params()
def->tooltip = L("Performance vs accuracy of calculation. Lower values may produce unwanted artifacts.");
def->min = 0;
def->max = 1;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(0.5));
def = this->add("hollowing_closing_distance", coFloat);
@@ -6569,7 +6571,7 @@ void PrintConfigDef::init_sla_params()
def->sidetext = L("mm");
def->min = 0;
def->max = 10;
- def->mode = comExpert;
+ def->mode = comExpert | comPrusa;
def->set_default_value(new ConfigOptionFloat(2.0));
def = this->add("material_print_speed", coEnum);
@@ -6582,9 +6584,14 @@ void PrintConfigDef::init_sla_params()
def->enum_values.push_back("fast");
def->enum_labels.push_back(L("Slow"));
def->enum_labels.push_back(L("Fast"));
- def->mode = comAdvanced;
+ def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<SLAMaterialSpeed>(slamsFast));
+ //def = this->add("sla_archive_format", coString);
+ //def->label = L("Format of the output SLA archive");
+ //def->mode = comAdvanced | comPrusa;
+ //def->set_default_value(new ConfigOptionString("SL1"));
+
def = this->add("output_format", coEnum);
def->label = L("Output Format");
def->tooltip = L("Select the output format for this printer.");
@@ -6593,8 +6600,16 @@ void PrintConfigDef::init_sla_params()
def->enum_values.push_back("SL1");
def->enum_labels.push_back(L("Masked CWS"));
def->enum_labels.push_back(L("Prusa SL1"));
- def->mode = comAdvanced; // output_format should be preconfigured in profiles;
+ def->mode = comAdvancedE | comSuSi; // output_format should be preconfigured in profiles;
def->set_default_value(new ConfigOptionEnum<OutputFormat>(ofMaskedCWS));
+
+ def = this->add("sla_output_precision", coFloat);
+ def->label = L("SLA output precision");
+ def->tooltip = L("Minimum resolution in nanometers");
+ def->sidetext = L("mm");
+ def->min = SCALING_FACTOR;
+ def->mode = comExpert | comPrusa;
+ def->set_default_value(new ConfigOptionFloat(0.001));
}
void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &value)
@@ -6770,6 +6785,9 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
else
value = "flow";
}
+ if ("sla_archive_format" == opt_key) {
+ opt_key = "output_format";
+ }
// Ignore the following obsolete configuration keys:
@@ -6812,6 +6830,8 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
opt_key = "raft_first_layer_density";
value = "100";
}
+ if (boost::starts_with(opt_key, "thin_perimeters") && value == "1")
+ value = "100%";
//prusa
if ("gcode_flavor" == opt_key) {
@@ -7012,12 +7032,9 @@ std::unordered_set<std::string> prusa_export_to_remove_keys = {
"perimeter_overlap",
"perimeter_round_corners",
"print_extrusion_multiplier",
-"print_host",
"print_retract_length",
"print_retract_lift",
"print_temperature",
-"printhost_apikey",
-"printhost_cafile",
"printhost_client_cert",
"retract_lift_first_layer",
"retract_lift_top",
@@ -7189,6 +7206,9 @@ std::map<std::string, std::string> PrintConfigDef::to_prusa(t_config_option_key&
else if (value != "0" && brim_width_interior != 0)
new_entries["brim_type"] = "outer_and_inner";
}
+ if ("output_format" == opt_key) {
+ opt_key = "sla_archive_format";
+ }
return new_entries;
}
diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp
index eff211502..ea66fe45b 100644
--- a/src/libslic3r/PrintConfig.hpp
+++ b/src/libslic3r/PrintConfig.hpp
@@ -1065,7 +1065,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionBool, complete_objects_one_brim))
((ConfigOptionEnum<CompleteObjectSort>, complete_objects_sort))
((ConfigOptionFloats, colorprint_heights))
- ((ConfigOptionBools, cooling))
+ //((ConfigOptionBools, cooling))
((ConfigOptionFloatOrPercent, default_acceleration))
((ConfigOptionInts, disable_fan_first_layers))
((ConfigOptionEnum<DraftShield>, draft_shield))
diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
index fe3d15425..52291fde3 100644
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -135,6 +135,8 @@ set(SLIC3R_GUI_SOURCES
GUI/GUI_ObjectSettings.hpp
GUI/GUI_ObjectLayers.cpp
GUI/GUI_ObjectLayers.hpp
+ GUI/GUI_Tags.cpp
+ GUI/GUI_Tags.hpp
GUI/MeshUtils.cpp
GUI/MeshUtils.hpp
GUI/Tab.cpp
diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp
index feefb2189..5f316ef6f 100644
--- a/src/slic3r/GUI/BitmapCache.cpp
+++ b/src/slic3r/GUI/BitmapCache.cpp
@@ -299,16 +299,16 @@ error:
return NULL;
}
-wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_width, unsigned target_height,
+wxBitmap* BitmapCache::load_svg(const std::string& bitmap_name, unsigned target_width, unsigned target_height,
const bool grayscale/* = false*/, const bool dark_mode/* = false*/, const std::string& new_color /*= ""*/)
{
- std::string bitmap_key = bitmap_name + ( target_height !=0 ?
- "-h" + std::to_string(target_height) :
- "-w" + std::to_string(target_width))
- + (m_scale != 1.0f ? "-s" + float_to_string_decimal_point(m_scale) : "")
- + (dark_mode ? "-dm" : "")
- + (grayscale ? "-gs" : "")
- + new_color;
+ std::string bitmap_key = bitmap_name + (target_height != 0 ?
+ "-h" + std::to_string(target_height) :
+ "-w" + std::to_string(target_width))
+ + (m_scale != 1.0f ? "-s" + float_to_string_decimal_point(m_scale) : "")
+ + (dark_mode ? "-dm" : "")
+ + (grayscale ? "-gs" : "")
+ + new_color;
auto it = m_map.find(bitmap_key);
if (it != m_map.end())
@@ -341,25 +341,25 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_
}
}*/
- NSVGimage *image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces);
+ NSVGimage* image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces);
if (image == nullptr)
return nullptr;
target_height != 0 ? target_height *= m_scale : target_width *= m_scale;
- float svg_scale = target_height != 0 ?
- (float)target_height / image->height : target_width != 0 ?
- (float)target_width / image->width : 1;
+ float svg_scale = target_height != 0 ?
+ (float)target_height / image->height : target_width != 0 ?
+ (float)target_width / image->width : 1;
- int width = (int)(svg_scale * image->width + 0.5f);
- int height = (int)(svg_scale * image->height + 0.5f);
+ int width = (int)(svg_scale * image->width + 0.5f);
+ int height = (int)(svg_scale * image->height + 0.5f);
int n_pixels = width * height;
if (n_pixels <= 0) {
::nsvgDelete(image);
return nullptr;
}
- NSVGrasterizer *rast = ::nsvgCreateRasterizer();
+ NSVGrasterizer* rast = ::nsvgCreateRasterizer();
if (rast == nullptr) {
::nsvgDelete(image);
return nullptr;
@@ -373,6 +373,52 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_
return this->insert_raw_rgba(bitmap_key, width, height, data.data(), "greyscale" == new_color);
}
+wxBitmap* BitmapCache::load_svg(const std::string& bitmap_name, unsigned target_width, unsigned target_height,
+ std::map<std::string, std::string> replaces)
+{
+ std::string bitmap_key = bitmap_name + (target_height != 0 ?
+ "-h" + std::to_string(target_height) :
+ "-w" + std::to_string(target_width))
+ + (m_scale != 1.0f ? "-s" + float_to_string_decimal_point(m_scale) : "");
+ for (auto str : replaces)
+ bitmap_key += "-" + str.first + ":" + str.second;
+
+ auto it = m_map.find(bitmap_key);
+ if (it != m_map.end())
+ return it->second;
+
+ NSVGimage* image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces);
+ if (image == nullptr)
+ return nullptr;
+
+ target_height != 0 ? target_height *= m_scale : target_width *= m_scale;
+
+ float svg_scale = target_height != 0 ?
+ (float)target_height / image->height : target_width != 0 ?
+ (float)target_width / image->width : 1;
+
+ int width = (int)(svg_scale * image->width + 0.5f);
+ int height = (int)(svg_scale * image->height + 0.5f);
+ int n_pixels = width * height;
+ if (n_pixels <= 0) {
+ ::nsvgDelete(image);
+ return nullptr;
+ }
+
+ NSVGrasterizer* rast = ::nsvgCreateRasterizer();
+ if (rast == nullptr) {
+ ::nsvgDelete(image);
+ return nullptr;
+ }
+
+ std::vector<unsigned char> data(n_pixels * 4, 0);
+ ::nsvgRasterize(rast, image, 0, 0, svg_scale, data.data(), width, height, width * 4);
+ ::nsvgDeleteRasterizer(rast);
+ ::nsvgDelete(image);
+
+ return this->insert_raw_rgba(bitmap_key, width, height, data.data(), false);
+}
+
//we make scaled solid bitmaps only for the cases, when its will be used with scaled SVG icon in one output bitmap
wxBitmap BitmapCache::mksolid(size_t width, size_t height, unsigned char r, unsigned char g, unsigned char b, unsigned char transparency, bool suppress_scaling/* = false*/, size_t border_width /*= 0*/, bool dark_mode/* = false*/)
{
diff --git a/src/slic3r/GUI/BitmapCache.hpp b/src/slic3r/GUI/BitmapCache.hpp
index 870dfdfd9..34821c4fd 100644
--- a/src/slic3r/GUI/BitmapCache.hpp
+++ b/src/slic3r/GUI/BitmapCache.hpp
@@ -41,6 +41,7 @@ public:
static NSVGimage* nsvgParseFromFileWithReplace(const char* filename, const char* units, float dpi, const std::map<std::string, std::string>& replaces);
// Load svg from resources/icons. bitmap_key is given without the .svg suffix. SVG will be rasterized to provided height/width.
wxBitmap* load_svg(const std::string &bitmap_key, unsigned width = 0, unsigned height = 0, const bool grayscale = false, const bool dark_mode = false, const std::string& new_color = "");
+ wxBitmap* load_svg(const std::string& bitmap_name, unsigned target_width, unsigned target_height, std::map<std::string, std::string> replaces);
wxBitmap mksolid(size_t width, size_t height, unsigned char r, unsigned char g, unsigned char b, unsigned char transparency, bool suppress_scaling = false, size_t border_width = 0, bool dark_mode = false);
wxBitmap mksolid(size_t width, size_t height, const unsigned char rgb[3], bool suppress_scaling = false, size_t border_width = 0, bool dark_mode = false) { return mksolid(width, height, rgb[0], rgb[1], rgb[2], wxALPHA_OPAQUE, suppress_scaling, border_width, dark_mode); }
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 437f5cff1..45528ae42 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -1520,7 +1520,9 @@ void GUI_App::update_label_colours_from_appconfig()
#ifdef _WIN32
bool is_dark_mode = dark_mode();
- m_color_hovered_btn_label = is_dark_mode ? color_from_int(app_config->create_color(0.84f, 0.99f, AppConfig::EAppColorType::Main)) :
+ m_color_hovered_btn_label = is_dark_mode ? color_from_int(app_config->create_color(0.84f, 0.99f, AppConfig::EAppColorType::Highlight)) :
+ color_from_int(app_config->create_color(1.00f, 0.99f, AppConfig::EAppColorType::Highlight));
+ m_color_hovered_btn = is_dark_mode ? color_from_int(app_config->create_color(0.84f, 0.99f, AppConfig::EAppColorType::Main)) :
color_from_int(app_config->create_color(1.00f, 0.99f, AppConfig::EAppColorType::Main));
m_color_selected_btn_bg = is_dark_mode ? color_from_int(app_config->create_color(0.35f, 0.37f, AppConfig::EAppColorType::Main)) :
color_from_int(app_config->create_color(0.05f, 0.9f, AppConfig::EAppColorType::Main));
@@ -2397,16 +2399,30 @@ ConfigOptionMode GUI_App::get_mode()
if (!app_config->has("view_mode"))
return comSimple;
- const auto mode = app_config->get("view_mode");
- return mode == "expert" ? comExpert :
- mode == "simple" ? comSimple : comAdvanced;
+ ConfigOptionMode mode = comNone;
+ const std::string modes = app_config->get("view_mode");
+ std::vector<std::string> tags;
+ boost::algorithm::split(tags, modes, boost::is_any_of("|"));
+ for (const auto& item : ConfigOptionDef::names_2_tag_mode) {
+ for (std::string& tag : tags) {
+ if (item.first == tag) {
+ mode |= item.second;
+ continue;
+ }
+ }
+ }
+ return mode;
}
-void GUI_App::save_mode(const /*ConfigOptionMode*/int mode)
+void GUI_App::save_mode(const ConfigOptionMode mode)
{
- const std::string mode_str = mode == comExpert ? "expert" :
- mode == comSimple ? "simple" : "advanced";
- app_config->set("view_mode", mode_str);
+ std::string str_serialized;
+ for (const auto& item : ConfigOptionDef::names_2_tag_mode) {
+ if ((item.second & mode) != 0) {
+ str_serialized += str_serialized.empty() ? item.first : ("|" + item.first);
+ }
+ }
+ app_config->set("view_mode", str_serialized);
app_config->save();
update_mode();
}
@@ -2612,7 +2628,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
using std::placeholders::_1;
if (mode_menu != nullptr) {
- auto modfn = [this](int mode, wxCommandEvent&) { if (get_mode() != mode) save_mode(mode); };
+ auto modfn = [this](ConfigOptionMode mode, wxCommandEvent&) { if (get_mode() != mode) save_mode(mode); };
mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comSimple, _1), config_id_base + ConfigMenuModeSimple);
mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comAdvanced, _1), config_id_base + ConfigMenuModeAdvanced);
mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comExpert, _1), config_id_base + ConfigMenuModeExpert);
diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp
index 5f226dfaf..6cf7efa99 100644
--- a/src/slic3r/GUI/GUI_App.hpp
+++ b/src/slic3r/GUI/GUI_App.hpp
@@ -127,6 +127,7 @@ private:
#ifdef _WIN32
wxColour m_color_highlight_label_default;
wxColour m_color_hovered_btn_label;
+ wxColour m_color_hovered_btn;
wxColour m_color_default_btn_label;
wxColour m_color_highlight_default;
wxColour m_color_selected_btn_bg;
@@ -221,6 +222,7 @@ public:
const wxColour& get_label_highlight_clr() { return m_color_highlight_label_default; }
const wxColour& get_highlight_default_clr() { return m_color_highlight_default; }
const wxColour& get_color_hovered_btn_label() { return m_color_hovered_btn_label; }
+ const wxColour& get_color_hovered_btn() { return m_color_hovered_btn; }
const wxColour& get_color_selected_btn_bg() { return m_color_selected_btn_bg; }
void force_colors_update();
#ifdef _MSW_DARK_MODE
@@ -268,7 +270,7 @@ public:
Tab* get_tab(Preset::Type type);
ConfigOptionMode get_mode();
- void save_mode(const /*ConfigOptionMode*/int mode) ;
+ void save_mode(const ConfigOptionMode mode) ;
void update_mode();
void add_config_menu(wxMenuBar *menu);
diff --git a/src/slic3r/GUI/GUI_Tags.cpp b/src/slic3r/GUI/GUI_Tags.cpp
new file mode 100644
index 000000000..162a1c0b0
--- /dev/null
+++ b/src/slic3r/GUI/GUI_Tags.cpp
@@ -0,0 +1,235 @@
+#include "GUI_Tags.hpp"
+
+#include <stdexcept>
+#include <cmath>
+
+#include <wx/sizer.h>
+
+#include <boost/algorithm/string/replace.hpp>
+
+
+#include "libslic3r/AppConfig.hpp"
+#include "libslic3r/Config.hpp"
+
+#include "BitmapCache.hpp"
+#include "GUI.hpp"
+#include "GUI_App.hpp"
+#include "GUI_ObjectList.hpp"
+#include "libslic3r/Config.hpp"
+#include "I18N.hpp"
+#include "GUI_Utils.hpp"
+#include "Plater.hpp"
+#include "../Utils/MacDarkMode.hpp"
+#include "BitmapComboBox.hpp"
+
+namespace Slic3r{
+namespace GUI{
+
+// ----------------------------------------------------------------------------
+// ModeButton
+// ----------------------------------------------------------------------------
+
+ModeButton::ModeButton( wxWindow * parent,
+ wxWindowID id,
+ const std::string& icon_name /* = ""*/,
+ const wxString& mode /* = wxEmptyString*/,
+ const wxSize& size /* = wxDefaultSize*/,
+ const wxPoint& pos /* = wxDefaultPosition*/) :
+ ScalableButton(parent, id, icon_name, mode, size, pos, wxBU_EXACTFIT)
+{
+ Init(mode);
+}
+
+ModeButton::ModeButton(wxWindow* parent,
+ const wxString& mode/* = wxEmptyString*/,
+ const std::string& icon_name/* = ""*/,
+ int px_cnt/* = 16*/) :
+ ScalableButton(parent, wxID_ANY, ScalableBitmap(parent, icon_name, px_cnt), mode, wxBU_EXACTFIT)
+{
+ Init(mode);
+}
+
+ModeButton::ModeButton(wxWindow* parent,
+ const wxString& mode,
+ wxBitmap* bitmap,
+ int px_cnt /* = 16*/ ):
+ ScalableButton(parent, wxID_ANY, ScalableBitmap(parent, *bitmap, px_cnt), mode, wxBU_EXACTFIT)
+{
+ Init(mode);
+}
+
+void ModeButton::Init(const wxString &mode)
+{
+ std::string mode_str = std::string(mode.ToUTF8());
+ m_tt_focused = Slic3r::GUI::from_u8((boost::format(_utf8(L("Switch to the %s mode"))) % mode_str).str());
+ m_tt_selected = Slic3r::GUI::from_u8((boost::format(_utf8(L("Current mode is %s"))) % mode_str).str());
+
+ SetBitmapMargins(3, 0);
+
+ //button events
+ Bind(wxEVT_BUTTON, &ModeButton::OnButton, this);
+ Bind(wxEVT_ENTER_WINDOW, &ModeButton::OnEnterBtn, this);
+ Bind(wxEVT_LEAVE_WINDOW, &ModeButton::OnLeaveBtn, this);
+}
+
+void ModeButton::OnButton(wxCommandEvent& event)
+{
+ m_is_selected = true;
+ focus_button(m_is_selected);
+
+ event.Skip();
+}
+
+void ModeButton::SetState(const bool state)
+{
+ m_is_selected = state;
+ focus_button(m_is_selected);
+ SetToolTip(state ? m_tt_selected : m_tt_focused);
+}
+
+void ModeButton::focus_button(const bool focus)
+{
+ const wxFont& new_font = focus ?
+ Slic3r::GUI::wxGetApp().bold_font() :
+ Slic3r::GUI::wxGetApp().normal_font();
+
+ SetFont(new_font);
+#ifdef _WIN32
+ GetParent()->Refresh(); // force redraw a background of the selected mode button
+#else
+ SetForegroundColour(wxSystemSettings::GetColour(focus ? wxSYS_COLOUR_BTNTEXT :
+#if defined (__linux__) && defined (__WXGTK3__)
+ wxSYS_COLOUR_GRAYTEXT
+#elif defined (__linux__) && defined (__WXGTK2__)
+ wxSYS_COLOUR_BTNTEXT
+#else
+ wxSYS_COLOUR_BTNSHADOW
+#endif
+ ));
+#endif /* no _WIN32 */
+
+ Refresh();
+ Update();
+}
+
+
+// ----------------------------------------------------------------------------
+// ModeSizer
+// ----------------------------------------------------------------------------
+
+int mode_icon_px_size()
+{
+#ifdef __APPLE__
+ return 10;
+#else
+ return 12;
+#endif
+}
+
+
+ModeSizer::ModeSizer(wxWindow *parent, int hgap, int max_col) :
+ wxFlexGridSizer(3, 0, hgap),
+ m_parent(parent),
+ m_hgap_unscaled((double)(hgap)/em_unit(parent))
+{
+ static BitmapCache cache;
+ SetFlexibleDirection(wxHORIZONTAL);
+
+ std::vector<std::pair<std::string, std::string>> name_2_color;
+ //try to load colors from ui file
+ boost::property_tree::ptree tree_colors;
+ boost::filesystem::path path_colors = boost::filesystem::path(resources_dir()) / "ui_layout" / "colors.ini";
+ try {
+ boost::nowide::ifstream ifs;
+ ifs.imbue(boost::locale::generator()("en_US.UTF-8"));
+ ifs.open(path_colors.string());
+ boost::property_tree::read_ini(ifs, tree_colors);
+
+ for (const auto& it : tree_colors) {
+ if (boost::starts_with(it.first, "Tag_")) {
+ std::string color_code = tree_colors.get<std::string>(it.first);
+ if (!color_code.empty()) {
+ std::string tag = it.first.substr(4);
+ name_2_color.emplace_back(tag, color_code[0] == '#' ? color_code : ("#"+ color_code));
+
+ // get/set into ConfigOptionDef
+ auto it = ConfigOptionDef::names_2_tag_mode.find(tag);
+ if (it == ConfigOptionDef::names_2_tag_mode.end()) {
+ if (ConfigOptionDef::names_2_tag_mode.size() > 62) { //full
+ continue;
+ }
+ ConfigOptionDef::names_2_tag_mode[tag] = (ConfigOptionMode)(((uint64_t)1) << ConfigOptionDef::names_2_tag_mode.size());
+ it = ConfigOptionDef::names_2_tag_mode.find(tag);
+ }
+ m_bt_mode.push_back(it->second);
+ }
+ }
+ }
+ }
+ catch (const std::ifstream::failure& err) {
+ trace(1, (std::string("The color file cannot be loaded. Reason: ") + err.what(), path_colors.string()).c_str());
+ }
+ catch (const std::runtime_error& err) {
+ trace(1, (std::string("Failed loading the color file. Reason: ") + err.what(), path_colors.string()).c_str());
+ }
+//
+//
+// std::vector < std::pair < wxString, std::string >> buttons = {
+// {_L("Simple"), "mode_simple"},
+//// {_(L("Advanced")), "mode_advanced"},
+// {_L("Advanced") /*_CTX(L_CONTEXT("Advanced", "Mode") , "Mode")*/, "mode_advanced"},
+// {_L("Expert"), "mode_expert"},
+// };
+
+ auto modebtnfn = [this](wxCommandEvent &event, int mode_idx) {
+ Slic3r::GUI::wxGetApp().save_mode(this->m_bt_mode[mode_idx]);
+ event.Skip();
+ };
+
+ m_mode_btns.reserve(name_2_color.size());
+ this->SetCols(max_col != 0 ? std::min(max_col, (int)name_2_color.size()) : (int)name_2_color.size());
+ for (const auto& button : name_2_color) {
+ // create bitmap
+ AppConfig::hsv colorToDarken = AppConfig::rgb2hsv(AppConfig::int2rgb(AppConfig::hex2int(button.second)));
+ colorToDarken.v *= 0.7;
+ std::map<std::string, std::string> color_replace;
+ color_replace["#E70000"] = button.second;
+ color_replace["#D30000"] = AppConfig::int2hex(AppConfig::rgb2int(AppConfig::hsv2rgb(colorToDarken)));
+ int px_cnt = (int)(em_unit(parent) * mode_icon_px_size() * 0.1f + 0.5f);
+ wxBitmap* icon = cache.load_svg("mode_expert", 0, (unsigned int)px_cnt, color_replace);
+ // create bt
+ m_mode_btns.push_back(new ModeButton(parent, _(button.first), icon, px_cnt));
+ // add event
+ m_mode_btns.back()->Bind(wxEVT_BUTTON, std::bind(modebtnfn, std::placeholders::_1, int(m_mode_btns.size() - 1)));
+ Add(m_mode_btns.back());
+ }
+}
+
+void ModeSizer::SetMode(ConfigOptionMode mode)
+{
+ for (size_t m = 0; m < m_mode_btns.size(); m++)
+ m_mode_btns[m]->SetState( (m_bt_mode[m] & mode) != 0);
+}
+
+void ModeSizer::set_items_flag(int flag)
+{
+ for (wxSizerItem* item : this->GetChildren())
+ item->SetFlag(flag);
+}
+
+void ModeSizer::set_items_border(int border)
+{
+ for (wxSizerItem* item : this->GetChildren())
+ item->SetBorder(border);
+}
+
+void ModeSizer::msw_rescale()
+{
+ this->SetHGap(std::lround(m_hgap_unscaled * em_unit(m_parent)));
+ for (size_t m = 0; m < m_mode_btns.size(); m++)
+ m_mode_btns[m]->msw_rescale();
+}
+
+
+} } //namespace Slic3r GUI
+
diff --git a/src/slic3r/GUI/GUI_Tags.hpp b/src/slic3r/GUI/GUI_Tags.hpp
new file mode 100644
index 000000000..9279cb3dc
--- /dev/null
+++ b/src/slic3r/GUI/GUI_Tags.hpp
@@ -0,0 +1,91 @@
+#ifndef slic3r_GUI_Tags_hpp_
+#define slic3r_GUI_Tags_hpp_
+
+#include "libslic3r/Config.hpp"
+
+#include <wx/checklst.h>
+#include <wx/combo.h>
+
+#include "wxExtensions.hpp"
+
+namespace Slic3r {
+namespace GUI {
+
+
+// ----------------------------------------------------------------------------
+// ModeButton
+// ----------------------------------------------------------------------------
+
+class ModeButton : public ScalableButton
+{
+public:
+ ModeButton(
+ wxWindow* parent,
+ wxWindowID id,
+ const std::string& icon_name = "",
+ const wxString& mode = wxEmptyString,
+ const wxSize& size = wxDefaultSize,
+ const wxPoint& pos = wxDefaultPosition);
+
+ ModeButton(
+ wxWindow* parent,
+ const wxString& mode,
+ const std::string& icon_name,
+ int px_cnt);
+
+ ModeButton(wxWindow* parent,
+ const wxString& mode,
+ wxBitmap* bitmap,
+ int px_cnt);
+
+ ~ModeButton() {}
+
+ void Init(const wxString& mode);
+
+ void OnButton(wxCommandEvent& event);
+ void OnEnterBtn(wxMouseEvent& event) { focus_button(true); event.Skip(); }
+ void OnLeaveBtn(wxMouseEvent& event) { focus_button(m_is_selected); event.Skip(); }
+
+ void SetState(const bool state);
+ bool is_selected() { return m_is_selected; }
+
+protected:
+ void focus_button(const bool focus);
+
+private:
+ bool m_is_selected = false;
+
+ wxString m_tt_selected;
+ wxString m_tt_focused;
+};
+
+
+
+// ----------------------------------------------------------------------------
+// ModeSizer
+// ----------------------------------------------------------------------------
+
+class ModeSizer : public wxFlexGridSizer
+{
+public:
+ ModeSizer( wxWindow *parent, int hgap, int max_col);
+ ~ModeSizer() {}
+
+ void SetMode(const ConfigOptionMode mode);
+
+ void set_items_flag(int flag);
+ void set_items_border(int border);
+
+ void msw_rescale();
+ const std::vector<ModeButton*>& get_btns() { return m_mode_btns; }
+
+private:
+ std::vector<ConfigOptionMode> m_bt_mode;
+ std::vector<ModeButton*> m_mode_btns;
+ wxWindow* m_parent {nullptr};
+ double m_hgap_unscaled;
+};
+
+} // namespace slic3r
+} // namespace GUI
+#endif // slic3r_GUI_Tags_hpp_
diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp
index 8a79eca95..5c6a3fbcf 100644
--- a/src/slic3r/GUI/ImGuiWrapper.cpp
+++ b/src/slic3r/GUI/ImGuiWrapper.cpp
@@ -894,7 +894,7 @@ void ImGuiWrapper::search_list(const ImVec2& size_, bool (*items_getter)(int, co
const ImGuiStyle& style = g.Style;
// Size default to hold ~7 items. Fractional number of items helps seeing that we can scroll down/up without looking at scrollbar.
- ImVec2 size = ImGui::CalcItemSize(size_, ImGui::CalcItemWidth(), ImGui::GetTextLineHeightWithSpacing() * 7.4f + style.ItemSpacing.y);
+ ImVec2 size = ImGui::CalcItemSize(size_, ImGui::CalcItemWidth() + 30, ImGui::GetTextLineHeightWithSpacing() * 7.4f + style.ItemSpacing.y);
ImRect frame_bb(window->DC.CursorPos, ImVec2(window->DC.CursorPos.x + size.x, window->DC.CursorPos.y + size.y));
ImRect bb(frame_bb.Min, frame_bb.Max);
@@ -919,7 +919,7 @@ void ImGuiWrapper::search_list(const ImVec2& size_, bool (*items_getter)(int, co
// The press on Esc key invokes editing of InputText (removes last changes)
// So we should save previous value...
std::string str = search_str;
- ImGui::InputTextEx("", NULL, search_str, 40, search_size, ImGuiInputTextFlags_AutoSelectAll, NULL, NULL);
+ ImGui::InputTextEx("", NULL, search_str, 60, search_size, ImGuiInputTextFlags_AutoSelectAll, NULL, NULL);
edited = ImGui::IsItemEdited();
if (edited)
hovered_id = 0;
@@ -1005,6 +1005,7 @@ void ImGuiWrapper::search_list(const ImVec2& size_, bool (*items_getter)(int, co
if (is_localized)
check_box(_L("Search in English"), view_params.english);
check_box(_L("Exact pattern"), view_params.exact);
+ check_box(_L("All tags"), view_params.all_mode);
}
void ImGuiWrapper::title(const std::string& str)
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp
index f6b0b1191..362f73bb1 100644
--- a/src/slic3r/GUI/MainFrame.cpp
+++ b/src/slic3r/GUI/MainFrame.cpp
@@ -714,7 +714,7 @@ void MainFrame::update_layout()
#ifdef _USE_CUSTOM_NOTEBOOK
// Sizer with buttons for mode changing
- m_plater->sidebar().show_mode_sizer(wxGetApp().tabs_as_menu() || m_layout != ESettingsLayout::Old);
+ m_plater->sidebar().show_mode_sizer(wxGetApp().tabs_as_menu() || ( m_layout != ESettingsLayout::Old && m_layout != ESettingsLayout::Tabs));
#endif
#ifdef __WXMSW__
diff --git a/src/slic3r/GUI/Notebook.cpp b/src/slic3r/GUI/Notebook.cpp
index 89cfab975..60a371389 100644
--- a/src/slic3r/GUI/Notebook.cpp
+++ b/src/slic3r/GUI/Notebook.cpp
@@ -2,7 +2,10 @@
#ifdef _WIN32
+#include "libslic3r/AppConfig.hpp"
+
#include "GUI_App.hpp"
+#include "GUI_Tags.hpp"
#include "wxExtensions.hpp"
#include <wx/button.h>
@@ -29,7 +32,7 @@ ButtonsListCtrl::ButtonsListCtrl(wxWindow *parent, bool add_mode_buttons/* = fal
m_sizer->Add(m_buttons_sizer, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxBOTTOM, m_btn_margin);
if (add_mode_buttons) {
- m_mode_sizer = new ModeSizer(this, m_btn_margin);
+ m_mode_sizer = new Slic3r::GUI::ModeSizer(this, m_btn_margin, 0);
m_sizer->AddStretchSpacer(20);
m_sizer->Add(m_mode_sizer, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxBOTTOM, m_btn_margin);
}
@@ -45,10 +48,10 @@ void ButtonsListCtrl::OnPaint(wxPaintEvent&)
if (m_selection < 0 || m_selection >= (int)m_pageButtons.size())
return;
-
+
const wxColour& selected_btn_bg = Slic3r::GUI::wxGetApp().get_color_selected_btn_bg();
const wxColour& default_btn_bg = Slic3r::GUI::wxGetApp().get_highlight_default_clr();
- const wxColour& btn_marker_color = Slic3r::GUI::wxGetApp().get_color_hovered_btn_label();
+ const wxColour& btn_marker_color = Slic3r::GUI::wxGetApp().get_color_hovered_btn(); //Slic3r::GUI::wxGetApp().get_color_hovered_btn_label();
// highlight selected notebook button
@@ -68,9 +71,9 @@ void ButtonsListCtrl::OnPaint(wxPaintEvent&)
// highlight selected mode button
if (m_mode_sizer) {
- const std::vector<ModeButton*>& mode_btns = m_mode_sizer->get_btns();
+ const std::vector<Slic3r::GUI::ModeButton*>& mode_btns = m_mode_sizer->get_btns();
for (int idx = 0; idx < int(mode_btns.size()); idx++) {
- ModeButton* btn = mode_btns[idx];
+ Slic3r::GUI::ModeButton* btn = mode_btns[idx];
btn->SetBackgroundColour(btn->is_selected() ? selected_btn_bg : default_btn_bg);
//wxPoint pos = btn->GetPosition();
diff --git a/src/slic3r/GUI/Notebook.hpp b/src/slic3r/GUI/Notebook.hpp
index d180bc9c1..a86879f71 100644
--- a/src/slic3r/GUI/Notebook.hpp
+++ b/src/slic3r/GUI/Notebook.hpp
@@ -5,7 +5,11 @@
#include <wx/bookctrl.h>
-class ModeSizer;
+namespace Slic3r {
+ namespace GUI {
+ class ModeSizer;
+ }
+}
class ScalableButton;
// custom message the ButtonsListCtrl sends to its parent (Notebook) to notify a selection change:
@@ -42,7 +46,7 @@ private:
int m_selection {-1};
int m_btn_margin;
int m_line_margin;
- ModeSizer* m_mode_sizer {nullptr};
+ Slic3r::GUI::ModeSizer* m_mode_sizer {nullptr};
};
// A tabpane but with custom buttons.
diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp
index 8b5f9db38..085498bac 100644
--- a/src/slic3r/GUI/OG_CustomCtrl.cpp
+++ b/src/slic3r/GUI/OG_CustomCtrl.cpp
@@ -586,9 +586,8 @@ void OG_CustomCtrl::CtrlLine::update_visibility(ConfigOptionMode mode)
ConfigOptionMode line_mode = option_set.front().opt.mode;
for (const Option& opt : option_set)
- if (opt.opt.mode < line_mode)
- line_mode = opt.opt.mode;
- is_line_visible = line_mode <= mode;
+ line_mode |= opt.opt.mode;
+ is_line_visible = line_mode == comNone || (line_mode & mode) == mode;
if (draw_just_act_buttons)
return;
@@ -603,7 +602,7 @@ void OG_CustomCtrl::CtrlLine::update_visibility(ConfigOptionMode mode)
is_visible.clear();
for (const Option& opt : option_set) {
Field* field = ctrl->opt_group->get_field(opt.opt_id);
- is_visible.push_back(opt.opt.mode <= mode);
+ is_visible.push_back(opt.opt.mode == comNone || (opt.opt.mode & mode) == mode);
if (!field)
continue;
@@ -787,8 +786,16 @@ wxCoord OG_CustomCtrl::CtrlLine::draw_mode_bmp(wxDC& dc, wxCoord v_pos)
return ctrl->m_h_gap;
ConfigOptionMode mode = og_line.get_options()[0].opt.mode;
- const std::string& bmp_name = mode == ConfigOptionMode::comSimple ? "mode_simple" :
- mode == ConfigOptionMode::comAdvanced ? "mode_advanced" : "mode_expert";
+ //get the easiest setting
+ for (int i = 1; i < og_line.get_options().size(); i++)
+ mode |= og_line.get_options()[i].opt.mode;
+ std::string bmp_name = "mode_other";
+ if ((mode & ConfigOptionMode::comSimple) != 0)
+ bmp_name = "mode_simple";
+ else if ((mode & ConfigOptionMode::comAdvanced) != 0)
+ bmp_name = "mode_advanced";
+ else if ((mode & ConfigOptionMode::comExpert) != 0)
+ bmp_name = "mode_expert";
wxBitmap bmp = create_scaled_bitmap(bmp_name, ctrl, wxOSX ? 10 : 12);
wxCoord y_draw = v_pos + lround((height - get_bitmap_size(bmp).GetHeight()) / 2);
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp
index d3f264186..5ce48ef83 100644
--- a/src/slic3r/GUI/OptionsGroup.cpp
+++ b/src/slic3r/GUI/OptionsGroup.cpp
@@ -129,7 +129,7 @@ bool OptionsGroup::is_legend_line()
{
if (m_lines.size() == 1) {
const std::vector<Option>& option_set = m_lines.front().get_options();
- return !option_set.empty() && option_set.front().opt.gui_type == ConfigOptionDef::GUIType::legend;
+ return option_set.empty() || option_set.front().opt.gui_type == ConfigOptionDef::GUIType::legend;
}
return false;
}
@@ -734,7 +734,7 @@ void ConfigOptionsGroup::Show(const bool show)
std::vector<size_t> get_visible_idx(const std::map<ConfigOptionMode, std::vector<size_t>>& map, ConfigOptionMode mode) {
std::vector<size_t> ret;
for (const auto& entry : map) {
- if (entry.first <= mode)
+ if (entry.first == comNone || (entry.first & mode) == mode)
ret.insert(ret.end(), entry.second.begin(), entry.second.end());
}
return ret;
@@ -742,7 +742,7 @@ std::vector<size_t> get_visible_idx(const std::map<ConfigOptionMode, std::vector
std::vector<size_t> get_invisible_idx(const std::map<ConfigOptionMode, std::vector<size_t>>& map, ConfigOptionMode mode) {
std::vector<size_t> ret;
for (const auto& entry : map) {
- if (entry.first > mode)
+ if (entry.first != comNone && (entry.first & mode) != mode)
ret.insert(ret.end(), entry.second.begin(), entry.second.end());
}
return ret;
@@ -762,7 +762,7 @@ bool ConfigOptionsGroup::is_visible(ConfigOptionMode mode)
if ((m_options_mode[i].size() == 1
&& m_options_mode[i].begin()->second.size() == 1
&& m_options_mode[i].begin()->second[0] == (size_t)-1
- && m_options_mode[i].begin()->first > mode)
+ && (m_options_mode[i].begin()->first != comNone && (m_options_mode[i].begin()->first & mode) != mode))
|| get_visible_idx(m_options_mode[i], mode).empty()) {
hidden_row_cnt++;
}
@@ -782,18 +782,12 @@ bool ConfigOptionsGroup::update_visibility(ConfigOptionMode mode)
return show;
}
- int opt_mode_size = m_options_mode.size();
- if (m_grid_sizer->GetEffectiveRowsCount() != opt_mode_size &&
+ int opt_mode_size = m_options_mode.size();
+ if (m_grid_sizer->GetEffectiveRowsCount() != opt_mode_size &&
opt_mode_size == 1 && m_options_mode[0].size() == 1 && m_options_mode[0].begin()->second.size() == 1)
return get_invisible_idx(m_options_mode[0], mode).empty();
- Show(true);
-
- ConfigOptionMode best_mode = ConfigOptionMode::comExpert;
- for (const auto& map : m_options_mode)
- for (const auto& entry : map)
- if (entry.first <= best_mode)
- best_mode = entry.first;
+ Show(true);
int idx_item = 0;
int hidden_row_cnt = 0;
@@ -803,7 +797,7 @@ bool ConfigOptionsGroup::update_visibility(ConfigOptionMode mode)
if ((m_options_mode[i].size() == 1
&& m_options_mode[i].begin()->second.size() == 1
&& m_options_mode[i].begin()->second[0] == (size_t)-1
- && m_options_mode[i].begin()->first > mode)
+ && (m_options_mode[i].begin()->first != comNone && (m_options_mode[i].begin()->first & mode) != mode))
|| get_visible_idx(m_options_mode[i], mode).empty()) {
hidden_row_cnt++;
for (size_t idx =0; idx < cols; idx++)
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index c2db663b6..3ef70a063 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -767,7 +767,7 @@ Sidebar::Sidebar(Plater *parent)
p->scrolled->SetSizer(scrolled_sizer);
// Sizer with buttons for mode changing
- p->mode_sizer = new ModeSizer(p->scrolled, int(0.5 * wxGetApp().em_unit()));
+ p->mode_sizer = new ModeSizer(p->scrolled, int(0.5 * wxGetApp().em_unit()), 5);
// The preset chooser
p->sizer_presets = new wxFlexGridSizer(10, 1, 1, 2);
@@ -1561,7 +1561,7 @@ static std::vector<Search::InputInfo> get_search_inputs(ConfigOptionMode mode)
void Sidebar::update_searcher()
{
- p->searcher.init(get_search_inputs(m_mode));
+ p->searcher.init(get_search_inputs(m_mode), m_mode);
}
void Sidebar::update_mode()
diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp
index 9535b0896..5df4566e1 100644
--- a/src/slic3r/GUI/Preferences.cpp
+++ b/src/slic3r/GUI/Preferences.cpp
@@ -605,7 +605,7 @@ void PreferencesDialog::build(size_t selected_tab)
def_enum.enum_labels.push_back(L("All"));
def_enum.enum_labels.push_back(L("Release only"));
def_enum.enum_labels.push_back(L("None"));
- def_enum.mode = comSimple;
+ //def_enum.mode = comSimple;
def_enum.set_default_value(new ConfigOptionEnum<NotifyReleaseMode>(static_cast<NotifyReleaseMode>(s_keys_map_NotifyReleaseMode.at(app_config->get("notify_release")))));
option = Option(def_enum, "notify_release");
m_optgroups_gui.back()->append_single_option_line(option);
diff --git a/src/slic3r/GUI/Search.cpp b/src/slic3r/GUI/Search.cpp
index db2f229e9..a5d1ab047 100644
--- a/src/slic3r/GUI/Search.cpp
+++ b/src/slic3r/GUI/Search.cpp
@@ -90,22 +90,22 @@ void change_opt_keyFoP(std::string& opt_key, DynamicPrintConfig* config, int& cn
void OptionsSearcher::append_options(DynamicPrintConfig* config, Preset::Type type, ConfigOptionMode mode)
{
const ConfigDef* defs = config->def();
- auto emplace = [this, type, defs](const std::string key, const wxString& label, const ConfigOptionDef& opt)
+ auto emplace = [this, type](const ConfigOptionDef* opt_def, const std::string grp_key, const wxString& label, const ConfigOptionDef& opt)
{
- const GroupAndCategory& gc = groups_and_categories[key];
+ const GroupAndCategory& gc = groups_and_categories[grp_key];
if (gc.group.IsEmpty() || gc.category.IsEmpty())
return;
wxString suffix;
wxString suffix_local;
if (gc.category == "Machine limits") {
- suffix = key.back()=='1' ? L("Stealth") : L("Normal");
+ suffix = grp_key.back()=='1' ? L("Stealth") : L("Normal");
suffix_local = " " + _(suffix);
suffix = " " + suffix;
}
if (!label.IsEmpty())
- options.emplace_back(Option{ boost::nowide::widen(key), type,
+ options.emplace_back(Option{ boost::nowide::widen(opt_def?opt_def->opt_key: grp_key), type, opt_def ? opt_def->mode : comNone,
(label + suffix).ToStdWstring(), (_(label) + suffix_local).ToStdWstring(),
gc.group.ToStdWstring(), _(gc.group).ToStdWstring(),
gc.category.ToStdWstring(), GUI::Tab::translate_category(gc.category, type).ToStdWstring() ,
@@ -115,8 +115,8 @@ void OptionsSearcher::append_options(DynamicPrintConfig* config, Preset::Type ty
for (std::string opt_key : config->keys())
{
const ConfigOptionDef& opt = config->def()->options.at(opt_key);
- if (opt.mode > mode)
- continue;
+ //if (opt.mode != comNone && (opt.mode & mode) == 0)
+ // continue;
int cnt = 0;
@@ -142,12 +142,14 @@ void OptionsSearcher::append_options(DynamicPrintConfig* config, Preset::Type ty
label = label_override[opt.opt_key][1].empty() ? label_override[opt.opt_key][0] : label_override[opt.opt_key][1];
}
+ const ConfigOptionDef* opt_def = defs->get(key);
+
if (cnt == 0)
- emplace(key, label, opt);
+ emplace(opt_def, key, label, opt);
else
for (int i = 0; i < cnt; ++i)
// ! It's very important to use "#". opt_key#n is a real option key used in GroupAndCategory
- emplace(key + "#" + std::to_string(i), label, opt);
+ emplace(opt_def, key + "#" + std::to_string(i), label, opt);
}
}
@@ -220,7 +222,7 @@ static bool strong_match(const std::wstring& search_pattern, const std::wstring&
return out_score > 0;
}
-bool OptionsSearcher::search(const std::string& search, bool force/* = false*/)
+bool OptionsSearcher::search(const std::string& search, bool force/* = false*/)
{
if (search_line == search && !force)
return false;
@@ -256,9 +258,9 @@ bool OptionsSearcher::search(const std::string& search, bool force/* = false*/)
out += marker_by_type(opt.type, printer_technology);
const std::wstring* prev = nullptr;
for (const std::wstring* const s : {
- view_params.category ? &opt.category : nullptr,
- view_params.category ? &opt.group : nullptr,
- & opt.label })
+ view_params.category ? &opt.category : nullptr,
+ view_params.category ? &opt.group : nullptr,
+ & opt.label })
if (s != nullptr && (prev == nullptr || *prev != *s)) {
if (out.size() > 2)
out += sep;
@@ -300,6 +302,11 @@ bool OptionsSearcher::search(const std::string& search, bool force/* = false*/)
continue;
}
+ if(!view_params.all_mode)
+ if ( (opt.tags & current_tags) == 0)
+ continue;
+
+
std::wstring wsearch = boost::nowide::widen(search);
boost::trim_left(wsearch);
std::wstring label = get_label(opt, false);
@@ -378,8 +385,9 @@ OptionsSearcher::~OptionsSearcher()
{
}
-void OptionsSearcher::init(std::vector<InputInfo> input_values)
+void OptionsSearcher::init(std::vector<InputInfo> input_values, ConfigOptionMode current_tags)
{
+ this->current_tags = current_tags;
options.clear();
for (auto i : input_values)
append_options(i.config, i.type, i.mode);
@@ -388,8 +396,10 @@ void OptionsSearcher::init(std::vector<InputInfo> input_values)
search(search_line, true);
}
-void OptionsSearcher::apply(DynamicPrintConfig* config, Preset::Type type, ConfigOptionMode mode)
+void OptionsSearcher::apply(DynamicPrintConfig* config, Preset::Type type, ConfigOptionMode current_tags)
{
+ this->current_tags = current_tags;
+
if (options.empty())
return;
@@ -397,7 +407,7 @@ void OptionsSearcher::apply(DynamicPrintConfig* config, Preset::Type type, Confi
return opt.type == type;
}), options.end());
- append_options(config, type, mode);
+ append_options(config, type, current_tags);
sort_options();
@@ -434,7 +444,7 @@ static Option create_option(const std::string& opt_key, const wxString& label, P
category = wxString::Format("%s %d", "Extruder", atoi(opt_idx.c_str()) + 1);
}
- return Option{ boost::nowide::widen(get_key(opt_key, type)), type,
+ return Option{ boost::nowide::widen(get_key(opt_key, type)), type, comNone,
(label + suffix).ToStdWstring(), (_(label) + suffix_local).ToStdWstring(),
gc.group.ToStdWstring(), _(gc.group).ToStdWstring(),
gc.category.ToStdWstring(), GUI::Tab::translate_category(category, type).ToStdWstring() };
@@ -526,7 +536,7 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
search_line = new wxTextCtrl(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
GUI::wxGetApp().UpdateDarkUI(search_line);
- search_list = new wxDataViewCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(em * 40, em * 30), wxDV_NO_HEADER | wxDV_SINGLE
+ search_list = new wxDataViewCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(em * 70, em * 30), wxDV_NO_HEADER | wxDV_SINGLE
#ifdef _WIN32
| wxBORDER_SIMPLE
#endif
@@ -554,6 +564,7 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
if (GUI::wxGetApp().is_localized())
check_english = new wxCheckBox(this, wxID_ANY, _L("Search in English"));
check_exact = new wxCheckBox(this, wxID_ANY, _L("Exact pattern"));
+ check_all_mode = new wxCheckBox(this, wxID_ANY, _L("All tags"));
wxStdDialogButtonSizer* cancel_btn = this->CreateStdDialogButtonSizer(wxCANCEL);
GUI::wxGetApp().UpdateDarkUI(static_cast<wxButton*>(this->FindWindowById(wxID_CANCEL, this)));
@@ -562,7 +573,8 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
check_sizer->Add(check_category, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border);
if (check_english)
check_sizer->Add(check_english, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border);
- check_sizer->Add(check_exact, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border);
+ check_sizer->Add(check_exact, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border);;
+ check_sizer->Add(check_all_mode, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, border);
check_sizer->AddStretchSpacer(border);
check_sizer->Add(cancel_btn, 0, wxALIGN_CENTER_VERTICAL);
@@ -595,6 +607,7 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
if (check_english)
check_english->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
check_exact->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
+ check_all_mode->Bind(wxEVT_CHECKBOX, &SearchDialog::OnCheck, this);
// Bind(wxEVT_MOTION, &SearchDialog::OnMotion, this);
Bind(wxEVT_LEFT_DOWN, &SearchDialog::OnLeftDown, this);
@@ -616,7 +629,8 @@ void SearchDialog::Popup(wxPoint position /*= wxDefaultPosition*/)
check_category->SetValue(params.category);
if (check_english)
check_english->SetValue(params.english);
- check_exact->SetValue(params.exact);
+ check_exact->SetValue(params.exact);;
+ check_all_mode->SetValue(params.all_mode);
if (position != wxDefaultPosition)
this->SetPosition(position);
@@ -740,6 +754,7 @@ void SearchDialog::OnCheck(wxCommandEvent& event)
params.english = check_english->GetValue();
params.category = check_category->GetValue();
params.exact = check_exact->GetValue();
+ params.all_mode = check_all_mode->GetValue();
searcher->search();
update_list();
diff --git a/src/slic3r/GUI/Search.hpp b/src/slic3r/GUI/Search.hpp
index dcc481fda..ce6edb7d7 100644
--- a/src/slic3r/GUI/Search.hpp
+++ b/src/slic3r/GUI/Search.hpp
@@ -52,6 +52,7 @@ struct Option {
// though for some languages (Chinese?) it may not work correctly.
std::wstring key;
Preset::Type type {Preset::TYPE_INVALID};
+ ConfigOptionMode tags;
std::wstring label;
std::wstring label_local;
std::wstring group;
@@ -80,6 +81,7 @@ struct OptionViewParameters
bool category {true};
bool english {false};
bool exact {false};
+ bool all_mode {true};
int hovered_id {0};
};
@@ -89,6 +91,7 @@ class OptionsSearcher
std::string search_line;
std::map<std::string, GroupAndCategory> groups_and_categories;
PrinterTechnology printer_technology;
+ ConfigOptionMode current_tags;
std::vector<Option> options {};
std::vector<FoundOption> found {};
@@ -115,7 +118,7 @@ public:
OptionsSearcher();
~OptionsSearcher();
- void init(std::vector<InputInfo> input_values);
+ void init(std::vector<InputInfo> input_values, ConfigOptionMode current_tags);
void apply(DynamicPrintConfig *config,
Preset::Type type,
ConfigOptionMode mode);
@@ -172,6 +175,7 @@ class SearchDialog : public GUI::DPIDialog
wxCheckBox* check_category { nullptr };
wxCheckBox* check_english { nullptr };
wxCheckBox* check_exact { nullptr };
+ wxCheckBox* check_all_mode { nullptr };
OptionsSearcher* searcher { nullptr };
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 0c055d05b..5d3d8d599 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -282,7 +282,7 @@ void Tab::create_preset_tab()
// Sizer with buttons for mode changing
if (wxGetApp().tabs_as_menu())
#endif
- m_mode_sizer = new ModeSizer(panel, int (0.5*em_unit(this)));
+ m_mode_sizer = nullptr;//new ModeSizer(panel, int (0.5*em_unit(this)));
const float scale_factor = /*wxGetApp().*/em_unit(this)*0.1;// GetContentScaleFactor();
m_hsizer = new wxBoxSizer(wxHORIZONTAL);
@@ -2057,16 +2057,33 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
for (int i = 1; i < params.size() - 1; i++) {
if (params[i] == "simple")
{
- option.opt.mode = ConfigOptionMode::comSimple;
+ option.opt.mode = ConfigOptionMode::comSimpleAE;
}
else if (params[i] == "advanced")
{
- option.opt.mode = ConfigOptionMode::comAdvanced;
+ option.opt.mode = ConfigOptionMode::comAdvancedE;
}
else if (params[i] == "expert")
{
option.opt.mode = ConfigOptionMode::comExpert;
}
+ else if (boost::starts_with(params[i], "tags"))
+ {
+ option.opt.mode = comNone;
+ std::vector<std::string> tag_strs;
+ boost::split(tag_strs, params[i], boost::is_any_of("$"));
+ for (size_t idx = 1; idx < tag_strs.size(); ++idx) {
+ auto it = ConfigOptionDef::names_2_tag_mode.find(tag_strs[idx]);
+ if (it == ConfigOptionDef::names_2_tag_mode.end()) {
+ if (ConfigOptionDef::names_2_tag_mode.size() > 62) { //full
+ continue;
+ }
+ ConfigOptionDef::names_2_tag_mode[tag_strs[idx]] = (ConfigOptionMode)(((uint64_t)1) << ConfigOptionDef::names_2_tag_mode.size());
+ it = ConfigOptionDef::names_2_tag_mode.find(tag_strs[idx]);
+ }
+ option.opt.mode |= it->second;
+ }
+ }
else if (params[i] == "full_label")
{
option.opt.full_label = (params[i].substr(11, params[i].size() - 11));
@@ -2350,7 +2367,7 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
};
current_group->append_line(current_line);
current_page->descriptions.push_back("print_host_upload");
- }else if(boost::starts_with(full_line, "post_process_explanation")){
+ } else if(boost::starts_with(full_line, "post_process_explanation")) {
TabPrint* tab = nullptr;
if ((tab = dynamic_cast<TabPrint*>(this)) == nullptr) continue;
Line line{ "", "" };
@@ -4923,10 +4940,13 @@ void Page::update_visibility(ConfigOptionMode mode, bool update_contolls_visibil
{
bool ret_val = false;
for (auto group : m_optgroups) {
- ret_val = (update_contolls_visibility ?
- group->update_visibility(mode) : // update visibility for all controlls in group
- group->is_visible(mode) // just detect visibility for the group
- ) || ret_val;
+ if (update_contolls_visibility && group->get_grid_sizer() ? //if not created, use the method that works
+ group->update_visibility(mode) : // update visibility for all controlls in group
+ group->is_visible(mode) // just detect visibility for the group
+ ) {
+ // now that it's updated, don't consider the legend groups
+ ret_val = !group->is_legend_line();
+ }
}
m_show = ret_val;
diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp
index af73d6bfd..4d7e51e0e 100644
--- a/src/slic3r/GUI/Tab.hpp
+++ b/src/slic3r/GUI/Tab.hpp
@@ -33,6 +33,7 @@
#include "ButtonsDescription.hpp"
#include "Event.hpp"
#include "wxExtensions.hpp"
+#include "GUI_Tags.hpp"
#include "ConfigManipulation.hpp"
#include "OptionsGroup.hpp"
#include "ScriptExecutor.hpp"
diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp
index d81c835dc..1f385663d 100644
--- a/src/slic3r/GUI/wxExtensions.cpp
+++ b/src/slic3r/GUI/wxExtensions.cpp
@@ -441,15 +441,6 @@ int em_unit(wxWindow* win)
return Slic3r::GUI::wxGetApp().em_unit();
}
-int mode_icon_px_size()
-{
-#ifdef __APPLE__
- return 10;
-#else
- return 12;
-#endif
-}
-
wxBitmap create_menu_bitmap(const std::string& bmp_name)
{
return create_scaled_bitmap(bmp_name, nullptr, 16, false, "", true);
@@ -661,144 +652,6 @@ void LockButton::update_button_bitmaps()
Update();
}
-
-
-// ----------------------------------------------------------------------------
-// ModeButton
-// ----------------------------------------------------------------------------
-
-ModeButton::ModeButton( wxWindow * parent,
- wxWindowID id,
- const std::string& icon_name /* = ""*/,
- const wxString& mode /* = wxEmptyString*/,
- const wxSize& size /* = wxDefaultSize*/,
- const wxPoint& pos /* = wxDefaultPosition*/) :
- ScalableButton(parent, id, icon_name, mode, size, pos, wxBU_EXACTFIT)
-{
- Init(mode);
-}
-
-ModeButton::ModeButton( wxWindow* parent,
- const wxString& mode/* = wxEmptyString*/,
- const std::string& icon_name/* = ""*/,
- int px_cnt/* = 16*/) :
- ScalableButton(parent, wxID_ANY, ScalableBitmap(parent, icon_name, px_cnt), mode, wxBU_EXACTFIT)
-{
- Init(mode);
-}
-
-void ModeButton::Init(const wxString &mode)
-{
- std::string mode_str = std::string(mode.ToUTF8());
- m_tt_focused = Slic3r::GUI::from_u8((boost::format(_utf8(L("Switch to the %s mode"))) % mode_str).str());
- m_tt_selected = Slic3r::GUI::from_u8((boost::format(_utf8(L("Current mode is %s"))) % mode_str).str());
-
- SetBitmapMargins(3, 0);
-
- //button events
- Bind(wxEVT_BUTTON, &ModeButton::OnButton, this);
- Bind(wxEVT_ENTER_WINDOW, &ModeButton::OnEnterBtn, this);
- Bind(wxEVT_LEAVE_WINDOW, &ModeButton::OnLeaveBtn, this);
-}
-
-void ModeButton::OnButton(wxCommandEvent& event)
-{
- m_is_selected = true;
- focus_button(m_is_selected);
-
- event.Skip();
-}
-
-void ModeButton::SetState(const bool state)
-{
- m_is_selected = state;
- focus_button(m_is_selected);
- SetToolTip(state ? m_tt_selected : m_tt_focused);
-}
-
-void ModeButton::focus_button(const bool focus)
-{
- const wxFont& new_font = focus ?
- Slic3r::GUI::wxGetApp().bold_font() :
- Slic3r::GUI::wxGetApp().normal_font();
-
- SetFont(new_font);
-#ifdef _WIN32
- GetParent()->Refresh(); // force redraw a background of the selected mode button
-#else
- SetForegroundColour(wxSystemSettings::GetColour(focus ? wxSYS_COLOUR_BTNTEXT :
-#if defined (__linux__) && defined (__WXGTK3__)
- wxSYS_COLOUR_GRAYTEXT
-#elif defined (__linux__) && defined (__WXGTK2__)
- wxSYS_COLOUR_BTNTEXT
-#else
- wxSYS_COLOUR_BTNSHADOW
-#endif
- ));
-#endif /* no _WIN32 */
-
- Refresh();
- Update();
-}
-
-
-// ----------------------------------------------------------------------------
-// ModeSizer
-// ----------------------------------------------------------------------------
-
-ModeSizer::ModeSizer(wxWindow *parent, int hgap/* = 0*/) :
- wxFlexGridSizer(3, 0, hgap),
- m_parent(parent),
- m_hgap_unscaled((double)(hgap)/em_unit(parent))
-{
- SetFlexibleDirection(wxHORIZONTAL);
-
- std::vector < std::pair < wxString, std::string >> buttons = {
- {_L("Simple"), "mode_simple"},
-// {_(L("Advanced")), "mode_advanced"},
- {_L("Advanced") /*_CTX(L_CONTEXT("Advanced", "Mode") , "Mode")*/, "mode_advanced"},
- {_L("Expert"), "mode_expert"},
- };
-
- auto modebtnfn = [](wxCommandEvent &event, int mode_id) {
- Slic3r::GUI::wxGetApp().save_mode(mode_id);
- event.Skip();
- };
-
- m_mode_btns.reserve(3);
- for (const auto& button : buttons) {
- m_mode_btns.push_back(new ModeButton(parent, button.first, button.second, mode_icon_px_size()));
-
- m_mode_btns.back()->Bind(wxEVT_BUTTON, std::bind(modebtnfn, std::placeholders::_1, int(m_mode_btns.size() - 1)));
- Add(m_mode_btns.back());
- }
-}
-
-void ModeSizer::SetMode(const int mode)
-{
- for (size_t m = 0; m < m_mode_btns.size(); m++)
- m_mode_btns[m]->SetState(int(m) == mode);
-}
-
-void ModeSizer::set_items_flag(int flag)
-{
- for (wxSizerItem* item : this->GetChildren())
- item->SetFlag(flag);
-}
-
-void ModeSizer::set_items_border(int border)
-{
- for (wxSizerItem* item : this->GetChildren())
- item->SetBorder(border);
-}
-
-void ModeSizer::msw_rescale()
-{
- this->SetHGap(std::lround(m_hgap_unscaled * em_unit(m_parent)));
- for (size_t m = 0; m < m_mode_btns.size(); m++)
- m_mode_btns[m]->msw_rescale();
-}
-
// ----------------------------------------------------------------------------
// MenuWithSeparators
// ----------------------------------------------------------------------------
diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp
index 1ab6a9df3..64c4f736c 100644
--- a/src/slic3r/GUI/wxExtensions.hpp
+++ b/src/slic3r/GUI/wxExtensions.hpp
@@ -151,6 +151,10 @@ public:
const std::string& icon_name = "",
const int px_cnt = 16,
const bool grayscale = false);
+ ScalableBitmap(wxWindow* parent,
+ const wxBitmap& bitmap,
+ const int px_cnt = 16)
+ : m_bmp(bitmap), m_px_cnt(px_cnt) {};
~ScalableBitmap() {}
@@ -265,77 +269,6 @@ private:
bool m_has_border {false};
};
-
-// ----------------------------------------------------------------------------
-// ModeButton
-// ----------------------------------------------------------------------------
-
-class ModeButton : public ScalableButton
-{
-public:
- ModeButton(
- wxWindow* parent,
- wxWindowID id,
- const std::string& icon_name = "",
- const wxString& mode = wxEmptyString,
- const wxSize& size = wxDefaultSize,
- const wxPoint& pos = wxDefaultPosition);
-
- ModeButton(
- wxWindow* parent,
- const wxString& mode = wxEmptyString,
- const std::string& icon_name = "",
- int px_cnt = 16);
-
- ~ModeButton() {}
-
- void Init(const wxString& mode);
-
- void OnButton(wxCommandEvent& event);
- void OnEnterBtn(wxMouseEvent& event) { focus_button(true); event.Skip(); }
- void OnLeaveBtn(wxMouseEvent& event) { focus_button(m_is_selected); event.Skip(); }
-
- void SetState(const bool state);
- bool is_selected() { return m_is_selected; }
-
-protected:
- void focus_button(const bool focus);
-
-private:
- bool m_is_selected = false;
-
- wxString m_tt_selected;
- wxString m_tt_focused;
-};
-
-
-
-// ----------------------------------------------------------------------------
-// ModeSizer
-// ----------------------------------------------------------------------------
-
-class ModeSizer : public wxFlexGridSizer
-{
-public:
- ModeSizer( wxWindow *parent, int hgap = 0);
- ~ModeSizer() {}
-
- void SetMode(const /*ConfigOptionMode*/int mode);
-
- void set_items_flag(int flag);
- void set_items_border(int border);
-
- void msw_rescale();
- const std::vector<ModeButton*>& get_btns() { return m_mode_btns; }
-
-private:
- std::vector<ModeButton*> m_mode_btns;
- wxWindow* m_parent {nullptr};
- double m_hgap_unscaled;
-};
-
-
-
// ----------------------------------------------------------------------------
// MenuWithSeparators
// ----------------------------------------------------------------------------