Fix a bug where the maximum line width limit is inconsistent across different checks.

Fixes #10188
This commit is contained in:
SoftFever
2025-07-30 21:22:40 +08:00
parent 3f1e4ca55a
commit c86eb27675
3 changed files with 5 additions and 2 deletions

View File

@@ -1307,7 +1307,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
} else if (extrusion_width_min <= layer_height) {
err_msg = L("Too small line width");
return false;
} else if (extrusion_width_max > max_nozzle_diameter * 5) {
} else if (extrusion_width_max > max_nozzle_diameter * MAX_LINE_WIDTH_MULTIPLIER) {
err_msg = L("Too large line width");
return false;
}

View File

@@ -7506,7 +7506,7 @@ 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) > 2.5 * max_nozzle_diameter) {
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)));
//return std::string("Too Large line width: ") + key;
}

View File

@@ -64,6 +64,9 @@ static constexpr double LARGE_BED_THRESHOLD = 2147;
// Orca: maximum number of extruders is 64. For SEMM printers, it defines maximum filament number.
static constexpr size_t MAXIMUM_EXTRUDER_NUMBER = 64;
// Orca: maximum line width is 5 times the nozzle diameter
static constexpr float MAX_LINE_WIDTH_MULTIPLIER = 5;
extern double SCALING_FACTOR;
static constexpr double PI = 3.141592653589793238;
#define POLY_SIDE_COUNT 24 // for brim ear circle