mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-12 10:21:17 +00:00
Sync upstream main
124 upstream commits including CrealityPrint integration (added include in Plater.cpp alongside the existing IMEXHelpers include), profile fixes and version bumps (#14084, #14085, Polymaker), CI artifact publishing, test refactors (arachne walls test added; test_3mf/test_config/ test_gcodewriter content moved/removed upstream — IMEX test file preserved as it is feedback-only), translations.
This commit is contained in:
+273
-61
@@ -148,7 +148,9 @@ static t_config_enum_values s_keys_map_PrintHostType {
|
||||
{ "obico", htObico },
|
||||
{ "flashforge", htFlashforge },
|
||||
{ "simplyprint", htSimplyPrint },
|
||||
{ "elegoolink", htElegooLink }
|
||||
{ "elegoolink", htElegooLink },
|
||||
{ "3dprinteros", ht3DPrinterOS },
|
||||
{ "moonraker", htMoonraker }
|
||||
};
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(PrintHostType)
|
||||
|
||||
@@ -712,6 +714,26 @@ void PrintConfigDef::init_common_params()
|
||||
def->gui_type = ConfigOptionDef::GUIType::one_string;
|
||||
def->set_default_value(new ConfigOptionPointsGroups{});
|
||||
|
||||
def = this->add("support_parallel_printheads", coBool);
|
||||
def->label = L("Support parallel printheads");
|
||||
def->tooltip = L("Enable printer settings for machines that can use multiple printheads in parallel.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool{false});
|
||||
|
||||
def = this->add("parallel_printheads_count", coInt);
|
||||
def->label = L("Parallel printheads count");
|
||||
def->tooltip = L("Set the number of parallel printheads for machines like OrangeStorm Giga printer.");
|
||||
def->mode = comAdvanced;
|
||||
def->min = 1;
|
||||
def->max = 4;
|
||||
def->set_default_value(new ConfigOptionInt{1});
|
||||
|
||||
def = this->add("parallel_printheads_bed_exclude_areas", coStrings);
|
||||
def->label = L("Parallel printheads bed exclude areas");
|
||||
def->tooltip = L("Ordered list of bed exclude areas by parallel printhead count. Item 1 applies to one printhead, item 2 to two printheads, and so on. Leave an item empty for no excluded area.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionStrings());
|
||||
|
||||
//BBS: add "bed_exclude_area"
|
||||
def = this->add("bed_exclude_area", coPoints);
|
||||
def->label = L("Bed exclude area");
|
||||
@@ -1240,11 +1262,16 @@ void PrintConfigDef::init_fff_params()
|
||||
def->label = L("External bridge infill direction");
|
||||
def->category = L("Strength");
|
||||
// xgettext:no-c-format, no-boost-format
|
||||
def->tooltip = L("Bridging angle override. If left to zero, the bridging angle will be calculated "
|
||||
"automatically. Otherwise the provided angle will be used for external bridges. "
|
||||
"Use 180° for zero angle.");
|
||||
def->tooltip = L("External Bridging angle override.\n"
|
||||
"If left to zero, the bridging angle will be calculated automatically for each specific bridge.\n"
|
||||
"Otherwise the provided angle will be used according to:\n"
|
||||
" - The absolute coordinates\n"
|
||||
" - The absolute coordinates + Model rotation: If Align infill direction to model is enabled\n"
|
||||
" - The optimal automatic angle + this value: If 'Relative Bridge Angle' is enabled\n\n"
|
||||
"Use 180° for zero absolute angle.");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->min = 0;
|
||||
def->max = 180;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.));
|
||||
|
||||
@@ -1252,58 +1279,97 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("internal_bridge_angle", coFloat);
|
||||
def->label = L("Internal bridge infill direction");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Internal bridging angle override. If left to zero, the bridging angle will be calculated "
|
||||
"automatically. Otherwise the provided angle will be used for internal bridges. "
|
||||
"Use 180° for zero angle.\n\nIt is recommended to leave it at 0 unless there is a specific model need not to.");
|
||||
def->tooltip = L("Internal Bridging angle override.\n"
|
||||
"If left to zero, the bridging angle will be calculated automatically for each specific bridge.\n"
|
||||
"Otherwise the provided angle will be used according to:\n"
|
||||
" - The absolute coordinates\n"
|
||||
" - The absolute coordinates + Model rotation: If Align infill direction to model is enabled\n"
|
||||
" - The optimal automatic angle + this value: If 'Relative Bridge Angle' is enabled\n\n"
|
||||
"Use 180° for zero absolute angle.");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->min = 0;
|
||||
def->max = 180;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.));
|
||||
|
||||
// ORCA: Relative bridge angle
|
||||
def = this->add("relative_bridge_angle", coBool);
|
||||
def->label = L("Relative bridge angle");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("When enabled, the bridge angle values are added to the automatically calculated bridge direction instead of overriding it.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
def = this->add("bridge_density", coPercent);
|
||||
def->label = L("External bridge density");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Controls the density (spacing) of external bridge lines. Default is 100%.\n\n"
|
||||
"Lower density external bridges can help improve reliability as there is more space for air to circulate "
|
||||
"around the extruded bridge, improving its cooling speed. Minimum is 10%.\n\n"
|
||||
"Higher densities can produce smoother bridge surfaces, as overlapping lines provide "
|
||||
"additional support during printing. Maximum is 120%.\n"
|
||||
"Note: Bridge density that is too high can cause warping or overextrusion.");
|
||||
def->tooltip = L("Controls the density (spacing) of external bridge lines. Default is 100%.\n"
|
||||
"Theoretically, 100% means a solid bridge, but due to the tendency of bridge extrusions to sag, 100% may not be sufficient.\n\n"
|
||||
"- Higher than 100% density (Recommended Max 125%):\n"
|
||||
" - Pros: Produces smoother bridge surfaces, as overlapping lines provide additional support during printing.\n"
|
||||
" - Cons: Can cause overextrusion, which may reduce lower and upper surface quality and increase the risk of warping.\n\n"
|
||||
"- Lower than 100% density (Min 10%):\n"
|
||||
" - Pros: Can create a string-like first layer. Faster and with better cooling because there is more space for air to circulate around the extruded bridge.\n"
|
||||
" - Cons: May lead to sagging and poorer surface finish.\n\n"
|
||||
"Recommended range: Minimum 10% - Maximum 125%.");
|
||||
def->sidetext = "%";
|
||||
def->min = 10;
|
||||
def->max = 120;
|
||||
def->max = 125;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionPercent(100));
|
||||
|
||||
def = this->add("internal_bridge_density", coPercent);
|
||||
def->label = L("Internal bridge density");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Controls the density (spacing) of internal bridge lines. 100% means solid bridge. Default is 100%.\n\n"
|
||||
"Lower density internal bridges can help reduce top surface pillowing and improve internal bridge reliability as there is more space for "
|
||||
"air to circulate around the extruded bridge, improving its cooling speed.\n\n"
|
||||
"This option works particularly well when combined with the second internal bridge over infill option, "
|
||||
"further improving internal bridging structure before solid infill is extruded.");
|
||||
def->tooltip = L("Controls the density (spacing) of internal bridge lines. Default is 100%. 100% means a solid internal bridge.\n\n"
|
||||
"Internal bridges act as intermediate support between sparse infill and top solid infill and can strongly affect top surface quality.\n\n"
|
||||
"- Higher than 100% density (Recommended Max 125%):\n"
|
||||
" - Pros: Improves internal bridge strength and support under top layers, reducing sagging and improving top-surface finish.\n"
|
||||
" - Cons: Increases material use and print time; excessive density may cause overextrusion and internal stresses.\n\n"
|
||||
"- Lower than 100% density (Min 10%):\n"
|
||||
" - Pros: Can reduce pillowing and improve cooling (more airflow through the bridge), and may speed up printing.\n"
|
||||
" - Cons: May reduce internal support, increasing the risk of sagging and top surface defects.\n\n"
|
||||
"This option works particularly well when combined with the second internal bridge over infill option to improve bridging further before solid infill is extruded.");
|
||||
def->sidetext = "%";
|
||||
def->min = 10;
|
||||
def->max = 100;
|
||||
def->max = 125;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionPercent(100));
|
||||
|
||||
def = this->add("bridge_flow", coFloat);
|
||||
def->label = L("Bridge flow ratio");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("Decrease this value slightly (for example 0.9) to reduce the amount of material for bridge, to improve sag.\n\n"
|
||||
def->tooltip = L("This value governs the thickness of the external (visible) bridge layer.\n"
|
||||
"Values above 1.0: Increase the amount of material while maintaining line spacing. This can improve line contact and strength.\n"
|
||||
"Values below 1.0: Reduce the amount of material while adjusting line spacing to maintain contact. This can improve sagging.\n\n"
|
||||
"The actual bridge flow used is calculated by multiplying this value with the filament flow ratio, and if set, the object's flow ratio.");
|
||||
def->min = 0;
|
||||
def->max = 2.0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(1));
|
||||
|
||||
def = this->add("bridge_line_width", coFloatOrPercent);
|
||||
def->label = L("Bridge");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("Bridge line width is expressed either as an absolute value or as a percentage of the active nozzle diameter (percentages are computed from the nozzle diameter).\n"
|
||||
"Recommended to use with a higher Bridge density or Bridge flow ratio.\n\n"
|
||||
"The maximum value is 100% or the nozzle diameter.\n"
|
||||
"If set to 0, the line width will match the Internal solid infill width.");
|
||||
def->sidetext = L("mm or %");
|
||||
def->ratio_over = "nozzle_diameter";
|
||||
def->min = 0;
|
||||
def->max = 100;
|
||||
def->max_literal = 10;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(100., true));
|
||||
|
||||
def = this->add("internal_bridge_flow", coFloat);
|
||||
def->label = L("Internal bridge flow ratio");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("This value governs the thickness of the internal bridge layer. This is the first layer over sparse infill. Decrease this value slightly (for example 0.9) to improve surface quality over sparse infill."
|
||||
"\n\nThe actual internal bridge flow used is calculated by multiplying this value with the bridge flow ratio, the filament flow ratio, and if set, the object's flow ratio.");
|
||||
def->tooltip = L("This value governs the thickness of the internal bridge layer. This is the first layer over sparse infill so increasing it may increase strength and upper layer quality.\n"
|
||||
"Values above 1.0: Increase the amount of material while maintaining line spacing. This can improve line contact and strength.\n"
|
||||
"Values below 1.0: Reduce the amount of material while adjusting line spacing to maintain contact. This can improve sagging.\n\n"
|
||||
"The actual bridge flow used is calculated by multiplying this value with the filament flow ratio, and if set, the object's flow ratio.");
|
||||
def->min = 0;
|
||||
def->max = 2.0;
|
||||
def->mode = comAdvanced;
|
||||
@@ -1887,16 +1953,18 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("thick_bridges", coBool);
|
||||
def->label = L("Thick external bridges");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("If enabled, bridges are more reliable, can bridge longer distances, but may look worse. "
|
||||
"If disabled, bridges look better but are reliable just for shorter bridged distances.");
|
||||
def->tooltip = L("If enabled, bridge extrusion uses a line height equal to the nozzle diameter.\n"
|
||||
"This increases bridge strength and reliability, allowing longer spans, but may worsen appearance.\n"
|
||||
"If disabled, bridges may look better but are generally reliable only for shorter spans.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
def = this->add("thick_internal_bridges", coBool);
|
||||
def->label = L("Thick internal bridges");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("If enabled, thick internal bridges will be used. It's usually recommended to have this feature turned on. However, "
|
||||
"consider turning it off if you are using large nozzles.");
|
||||
def->tooltip = L("If enabled, internal bridge extrusion uses a line height equal to the nozzle diameter.\n"
|
||||
"This increases internal bridge strength and reliability when printed over sparse infill, but may worsen appearance.\n"
|
||||
"If disabled, internal bridges may look better but can be less reliable over sparse infill.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
@@ -2923,7 +2991,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("align_infill_direction_to_model", coBool);
|
||||
def->label = L("Align infill direction to model");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Aligns infill and surface fill directions to follow the model's orientation on the build plate. When enabled, fill directions rotate with the model to maintain optimal strength characteristics.");
|
||||
def->tooltip = L("Aligns infill, bridge, ironing and surface fill directions to follow the model's orientation on the build plate.\n"
|
||||
"When enabled, directions rotate with the model to maintain optimal strength characteristics.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
@@ -3046,6 +3115,37 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(60));
|
||||
|
||||
def = this->add("lightning_overhang_angle", coFloat);
|
||||
def->label = L("Lightning overhang angle");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Maximum overhang angle for Lightning infill support propagation.");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->min = 5;
|
||||
def->max = 85;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloat(45));
|
||||
|
||||
def = this->add("lightning_prune_angle", coFloat);
|
||||
def->label = L("Prune angle");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Controls how aggressively short or unsupported Lightning branches are pruned.\n"
|
||||
"This angle is converted internally to a per-layer distance.");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->min = 5;
|
||||
def->max = 85;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloat(45));
|
||||
|
||||
def = this->add("lightning_straightening_angle", coFloat);
|
||||
def->label = L("Straightening angle");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Maximum straightening angle used to simplify Lightning branches.");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->min = 5;
|
||||
def->max = 85;
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionFloat(45));
|
||||
|
||||
auto def_infill_anchor_min = def = this->add("infill_anchor", coFloatOrPercent);
|
||||
def->label = L("Sparse infill anchor length");
|
||||
def->category = L("Strength");
|
||||
@@ -4036,7 +4136,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->gui_type = ConfigOptionDef::GUIType::one_string;
|
||||
def->set_default_value(new ConfigOptionPoints());
|
||||
|
||||
def = this->add("sparse_infill_filament", coInt);
|
||||
def = this->add("sparse_infill_filament_id", coInt);
|
||||
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
||||
def->label = L("Infill");
|
||||
def->category = L("Extruders");
|
||||
@@ -4781,6 +4881,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_values.push_back("flashforge");
|
||||
def->enum_values.push_back("simplyprint");
|
||||
def->enum_values.push_back("elegoolink");
|
||||
def->enum_values.push_back("3dprinteros");
|
||||
def->enum_values.push_back("moonraker");
|
||||
def->enum_labels.push_back("PrusaLink");
|
||||
def->enum_labels.push_back("PrusaConnect");
|
||||
def->enum_labels.push_back("Octo/Klipper");
|
||||
@@ -4795,6 +4897,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_labels.push_back("Flashforge");
|
||||
def->enum_labels.push_back("SimplyPrint");
|
||||
def->enum_labels.push_back("Elegoo Link");
|
||||
def->enum_labels.push_back("3DPrinterOS");
|
||||
def->enum_labels.push_back("Moonraker (Klipper)");
|
||||
def->mode = comAdvanced;
|
||||
def->cli = ConfigOptionDef::nocli;
|
||||
def->set_default_value(new ConfigOptionEnum<PrintHostType>(htOctoPrint));
|
||||
@@ -4916,11 +5020,20 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
def = this->add("wall_filament", coInt);
|
||||
def = this->add("outer_wall_filament_id", coInt);
|
||||
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
||||
def->label = L("Walls");
|
||||
def->label = L("Outer walls");
|
||||
def->category = L("Extruders");
|
||||
def->tooltip = L("Filament to print walls.\n\"Default\" uses the active object/part filament.");
|
||||
def->tooltip = L("Filament to print outer walls.\n\"Default\" uses the active object/part filament.");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(0));
|
||||
|
||||
def = this->add("inner_wall_filament_id", coInt);
|
||||
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
||||
def->label = L("Inner walls");
|
||||
def->category = L("Extruders");
|
||||
def->tooltip = L("Filament to print inner walls.\n\"Default\" uses the active object/part filament.");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(0));
|
||||
@@ -5677,11 +5790,29 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(15));
|
||||
|
||||
def = this->add("solid_infill_filament", coInt);
|
||||
def = this->add("internal_solid_filament_id", coInt);
|
||||
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
||||
def->label = L("Solid infill");
|
||||
def->label = L("Internal solid infill");
|
||||
def->category = L("Extruders");
|
||||
def->tooltip = L("Filament to print solid infill.\n\"Default\" uses the active object/part filament.");
|
||||
def->tooltip = L("Filament to print internal solid infill.\n\"Default\" uses the active object/part filament.");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(0));
|
||||
|
||||
def = this->add("top_surface_filament_id", coInt);
|
||||
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
||||
def->label = L("Top surface");
|
||||
def->category = L("Extruders");
|
||||
def->tooltip = L("Filament to print top surface.\n\"Default\" uses the active object/part filament.");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(0));
|
||||
|
||||
def = this->add("bottom_surface_filament_id", coInt);
|
||||
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
|
||||
def->label = L("Bottom surface");
|
||||
def->category = L("Extruders");
|
||||
def->tooltip = L("Filament to print bottom surface.\n\"Default\" uses the active object/part filament.");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(0));
|
||||
@@ -8041,12 +8172,34 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
|
||||
opt_key = "change_filament_gcode";
|
||||
} else if (opt_key == "bridge_fan_speed") {
|
||||
opt_key = "overhang_fan_speed";
|
||||
} else if (opt_key == "infill_extruder") {
|
||||
opt_key = "sparse_infill_filament";
|
||||
}else if (opt_key == "solid_infill_extruder") {
|
||||
opt_key = "solid_infill_filament";
|
||||
}else if (opt_key == "perimeter_extruder") {
|
||||
opt_key = "wall_filament";
|
||||
} else if (opt_key == "infill_extruder" || opt_key == "sparse_infill_filament") {
|
||||
// ORCA: legacy feature-filament selector. Pre-2.4.0-dev these keys were 1-based and the
|
||||
// default value "1" meant "the first/active filament". The current scheme uses a dedicated
|
||||
// key where 0 = "Default" (inherit the object/part filament) and 1..N = explicit filament.
|
||||
// Renaming to the new *_id key here means every config (process presets, 3mf project
|
||||
// settings, imported gcode) is translated uniformly on load - not just the version-gated
|
||||
// 3mf paths the old bespoke migration covered - and a brand-new key can never be misread as
|
||||
// a legacy default. Map the legacy default "1" to "0" (inherit); keep explicit values >1.
|
||||
opt_key = "sparse_infill_filament_id";
|
||||
if (value == "1") value = "0";
|
||||
} else if (opt_key == "solid_infill_extruder" || opt_key == "solid_infill_filament") {
|
||||
opt_key = "internal_solid_filament_id";
|
||||
if (value == "1") value = "0";
|
||||
} else if (opt_key == "top_solid_infill_filament") {
|
||||
opt_key = "top_surface_filament_id";
|
||||
if (value == "1") value = "0";
|
||||
} else if (opt_key == "bottom_solid_infill_filament") {
|
||||
opt_key = "bottom_surface_filament_id";
|
||||
if (value == "1") value = "0";
|
||||
} else if (opt_key == "perimeter_extruder" || opt_key == "wall_filament" || opt_key == "wall_filament_id") {
|
||||
opt_key = "outer_wall_filament_id";
|
||||
if (value == "1") value = "0";
|
||||
} else if (opt_key == "inner_wall_filament") {
|
||||
opt_key = "inner_wall_filament_id";
|
||||
if (value == "1") value = "0";
|
||||
} else if (opt_key == "outer_wall_filament") {
|
||||
opt_key = "outer_wall_filament_id";
|
||||
if (value == "1") value = "0";
|
||||
}else if(opt_key == "wipe_tower_extruder") {
|
||||
opt_key = "wipe_tower_filament";
|
||||
}else if (opt_key == "support_material_extruder") {
|
||||
@@ -8495,10 +8648,18 @@ void DynamicPrintConfig::normalize_fdm(int used_filaments)
|
||||
int extruder = this->option("extruder")->getInt();
|
||||
this->erase("extruder");
|
||||
if (extruder != 0) {
|
||||
if (!this->has("sparse_infill_filament") || this->option("sparse_infill_filament")->getInt() == 0)
|
||||
this->option("sparse_infill_filament", true)->setInt(extruder);
|
||||
if (!this->has("wall_filament") || this->option("wall_filament")->getInt() == 0)
|
||||
this->option("wall_filament", true)->setInt(extruder);
|
||||
if (!this->has("sparse_infill_filament_id") || this->option("sparse_infill_filament_id")->getInt() == 0)
|
||||
this->option("sparse_infill_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("outer_wall_filament_id") || this->option("outer_wall_filament_id")->getInt() == 0)
|
||||
this->option("outer_wall_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("inner_wall_filament_id") || this->option("inner_wall_filament_id")->getInt() == 0)
|
||||
this->option("inner_wall_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("internal_solid_filament_id") || this->option("internal_solid_filament_id")->getInt() == 0)
|
||||
this->option("internal_solid_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("top_surface_filament_id") || this->option("top_surface_filament_id")->getInt() == 0)
|
||||
this->option("top_surface_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("bottom_surface_filament_id") || this->option("bottom_surface_filament_id")->getInt() == 0)
|
||||
this->option("bottom_surface_filament_id", true)->setInt(extruder);
|
||||
// Don't propagate the current extruder to support.
|
||||
// For non-soluble supports, the default "0" extruder means to use the active extruder,
|
||||
// for soluble supports one certainly does not want to set the extruder to non-soluble.
|
||||
@@ -8509,12 +8670,25 @@ void DynamicPrintConfig::normalize_fdm(int used_filaments)
|
||||
}
|
||||
}
|
||||
|
||||
if (this->has("sparse_infill_filament")) {
|
||||
int sparse_infill_filament = this->option("sparse_infill_filament")->getInt();
|
||||
if (sparse_infill_filament > 0 && (!this->has("solid_infill_filament") || this->option("solid_infill_filament")->getInt() == 0))
|
||||
this->option("solid_infill_filament", true)->setInt(sparse_infill_filament);
|
||||
if (this->has("sparse_infill_filament_id")) {
|
||||
int sparse_infill_filament_id = this->option("sparse_infill_filament_id")->getInt();
|
||||
if (sparse_infill_filament_id > 0 && (!this->has("internal_solid_filament_id") || this->option("internal_solid_filament_id")->getInt() == 0))
|
||||
this->option("internal_solid_filament_id", true)->setInt(sparse_infill_filament_id);
|
||||
}
|
||||
|
||||
const int internal_solid = this->has("internal_solid_filament_id") ? this->option("internal_solid_filament_id")->getInt() : 0;
|
||||
const int top_surface = this->has("top_surface_filament_id") ? this->option("top_surface_filament_id")->getInt() : 0;
|
||||
const int bottom_surface = this->has("bottom_surface_filament_id") ? this->option("bottom_surface_filament_id")->getInt() : 0;
|
||||
|
||||
if (internal_solid == 0 && top_surface > 0)
|
||||
this->option("internal_solid_filament_id", true)->setInt(top_surface);
|
||||
if (internal_solid == 0 && bottom_surface > 0)
|
||||
this->option("internal_solid_filament_id", true)->setInt(bottom_surface);
|
||||
if (top_surface == 0 && internal_solid > 0)
|
||||
this->option("top_surface_filament_id", true)->setInt(internal_solid);
|
||||
if (bottom_surface == 0 && internal_solid > 0)
|
||||
this->option("bottom_surface_filament_id", true)->setInt(internal_solid);
|
||||
|
||||
if (this->has("spiral_mode") && this->opt<ConfigOptionBool>("spiral_mode", true)->value) {
|
||||
{
|
||||
// this should be actually done only on the spiral layers instead of all
|
||||
@@ -8571,10 +8745,18 @@ void DynamicPrintConfig::normalize_fdm_1()
|
||||
int extruder = this->option("extruder")->getInt();
|
||||
this->erase("extruder");
|
||||
if (extruder != 0) {
|
||||
if (!this->has("sparse_infill_filament") || this->option("sparse_infill_filament")->getInt() == 0)
|
||||
this->option("sparse_infill_filament", true)->setInt(extruder);
|
||||
if (!this->has("wall_filament") || this->option("wall_filament")->getInt() == 0)
|
||||
this->option("wall_filament", true)->setInt(extruder);
|
||||
if (!this->has("sparse_infill_filament_id") || this->option("sparse_infill_filament_id")->getInt() == 0)
|
||||
this->option("sparse_infill_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("outer_wall_filament_id") || this->option("outer_wall_filament_id")->getInt() == 0)
|
||||
this->option("outer_wall_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("inner_wall_filament_id") || this->option("inner_wall_filament_id")->getInt() == 0)
|
||||
this->option("inner_wall_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("internal_solid_filament_id") || this->option("internal_solid_filament_id")->getInt() == 0)
|
||||
this->option("internal_solid_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("top_surface_filament_id") || this->option("top_surface_filament_id")->getInt() == 0)
|
||||
this->option("top_surface_filament_id", true)->setInt(extruder);
|
||||
if (!this->has("bottom_surface_filament_id") || this->option("bottom_surface_filament_id")->getInt() == 0)
|
||||
this->option("bottom_surface_filament_id", true)->setInt(extruder);
|
||||
// Don't propagate the current extruder to support.
|
||||
// For non-soluble supports, the default "0" extruder means to use the active extruder,
|
||||
// for soluble supports one certainly does not want to set the extruder to non-soluble.
|
||||
@@ -8585,12 +8767,25 @@ void DynamicPrintConfig::normalize_fdm_1()
|
||||
}
|
||||
}
|
||||
|
||||
if (this->has("sparse_infill_filament")) {
|
||||
int sparse_infill_filament = this->option("sparse_infill_filament")->getInt();
|
||||
if (sparse_infill_filament > 0 && (!this->has("solid_infill_filament") || this->option("solid_infill_filament")->getInt() == 0))
|
||||
this->option("solid_infill_filament", true)->setInt(sparse_infill_filament);
|
||||
if (this->has("sparse_infill_filament_id")) {
|
||||
int sparse_infill_filament_id = this->option("sparse_infill_filament_id")->getInt();
|
||||
if (sparse_infill_filament_id > 0 && (!this->has("internal_solid_filament_id") || this->option("internal_solid_filament_id")->getInt() == 0))
|
||||
this->option("internal_solid_filament_id", true)->setInt(sparse_infill_filament_id);
|
||||
}
|
||||
|
||||
const int internal_solid = this->has("internal_solid_filament_id") ? this->option("internal_solid_filament_id")->getInt() : 0;
|
||||
const int top_surface = this->has("top_surface_filament_id") ? this->option("top_surface_filament_id")->getInt() : 0;
|
||||
const int bottom_surface = this->has("bottom_surface_filament_id") ? this->option("bottom_surface_filament_id")->getInt() : 0;
|
||||
|
||||
if (internal_solid == 0 && top_surface > 0)
|
||||
this->option("internal_solid_filament_id", true)->setInt(top_surface);
|
||||
if (internal_solid == 0 && bottom_surface > 0)
|
||||
this->option("internal_solid_filament_id", true)->setInt(bottom_surface);
|
||||
if (top_surface == 0 && internal_solid > 0)
|
||||
this->option("top_surface_filament_id", true)->setInt(internal_solid);
|
||||
if (bottom_surface == 0 && internal_solid > 0)
|
||||
this->option("bottom_surface_filament_id", true)->setInt(internal_solid);
|
||||
|
||||
if (this->has("spiral_mode") && this->opt<ConfigOptionBool>("spiral_mode", true)->value) {
|
||||
{
|
||||
// this should be actually done only on the spiral layers instead of all
|
||||
@@ -9796,6 +9991,7 @@ void DynamicPrintConfig::update_values_to_printer_extruders_for_multiple_filamen
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(", Line %1%: can not find opt define for %2%")%__LINE__%key;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (optdef->type) {
|
||||
case coStrings:
|
||||
{
|
||||
@@ -10345,8 +10541,8 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
|
||||
error_message.emplace("bridge_flow", L("invalid value ") + std::to_string(cfg.bridge_flow));
|
||||
}
|
||||
|
||||
// --bridge-flow-ratio
|
||||
if (cfg.bridge_flow <= 0) {
|
||||
// --internal-bridge-flow-ratio
|
||||
if (cfg.internal_bridge_flow <= 0) {
|
||||
error_message.emplace("internal_bridge_flow", L("invalid value ") + std::to_string(cfg.internal_bridge_flow));
|
||||
}
|
||||
|
||||
@@ -10404,13 +10600,18 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
|
||||
// extrusion widths
|
||||
{
|
||||
double max_nozzle_diameter = 0.;
|
||||
double min_nozzle_diameter = std::numeric_limits<double>::max();
|
||||
for (double dmr : cfg.nozzle_diameter.values)
|
||||
{
|
||||
max_nozzle_diameter = std::max(max_nozzle_diameter, dmr);
|
||||
min_nozzle_diameter = std::min(min_nozzle_diameter, dmr);
|
||||
}
|
||||
const char *widths[] = {
|
||||
"outer_wall_line_width",
|
||||
"inner_wall_line_width",
|
||||
"sparse_infill_line_width",
|
||||
"internal_solid_infill_line_width",
|
||||
"bridge_line_width",
|
||||
"top_surface_line_width",
|
||||
"support_line_width",
|
||||
"initial_layer_line_width",
|
||||
@@ -10418,8 +10619,13 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
|
||||
"skeleton_infill_line_width"};
|
||||
for (size_t i = 0; i < sizeof(widths) / sizeof(widths[i]); ++ i) {
|
||||
std::string key(widths[i]);
|
||||
if (cfg.get_abs_value(key, max_nozzle_diameter) > MAX_LINE_WIDTH_MULTIPLIER * max_nozzle_diameter) {
|
||||
error_message.emplace(key, L("too large line width ") + std::to_string(cfg.get_abs_value(key)));
|
||||
double abs_width = cfg.get_abs_value(key, max_nozzle_diameter);
|
||||
double allowed_max = (key == "bridge_line_width") ? min_nozzle_diameter : MAX_LINE_WIDTH_MULTIPLIER * max_nozzle_diameter;
|
||||
if (abs_width > allowed_max) {
|
||||
if (key == "bridge_line_width")
|
||||
error_message.emplace(key, L("Bridge line width must not exceed nozzle diameter: ") + std::to_string(abs_width));
|
||||
else
|
||||
error_message.emplace(key, L("too large line width ") + std::to_string(abs_width));
|
||||
//return std::string("Too Large line width: ") + key;
|
||||
}
|
||||
}
|
||||
@@ -10882,6 +11088,12 @@ CLIMiscConfigDef::CLIMiscConfigDef()
|
||||
def->cli_params = "level";
|
||||
def->set_default_value(new ConfigOptionInt(1));
|
||||
|
||||
def = this->add("logfile", coInt);
|
||||
def->label = L("Log file");
|
||||
def->tooltip = L("Redirects debug logging to file.\n");
|
||||
def->cli_params = "file";
|
||||
def->set_default_value(new ConfigOptionString());
|
||||
|
||||
def = this->add("enable_timelapse", coBool);
|
||||
def->label = L("Enable timelapse for print");
|
||||
def->tooltip = L("If enabled, this slicing will be considered using timelapse.");
|
||||
|
||||
Reference in New Issue
Block a user