mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 13:52:07 +00:00
ENH: CLI: add logic to check the max/min layer height
JIRA: no jira Change-Id: I71ae31b6cb3be9c732ffc1eda4e67092eb5b8666 (cherry picked from commit d5170e15613233685d4806af500df605c73b8525)
This commit is contained in:
@@ -1238,14 +1238,14 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
|
||||
if (layer_height > max_layer_height_from_nozzle ||
|
||||
layer_height < min_layer_height_from_nozzle) {
|
||||
return { L("Layer height cannot exceed the limit in Printer Settings -> Extruder -> Layer height limits"), object, "layer_height" };
|
||||
return { L("Layer height cannot exceed the limit in Printer Settings -> Extruder -> Layer height limits"), object, "layer_height", STRING_EXCEPT_LAYER_HEIGHT_EXCEEDS_LIMIT };
|
||||
}
|
||||
|
||||
for (auto range : object->m_model_object->layer_config_ranges) {
|
||||
double range_layer_height = range.second.opt_float("layer_height");
|
||||
if (range_layer_height > max_layer_height_from_nozzle ||
|
||||
range_layer_height < min_layer_height_from_nozzle)
|
||||
return { L("Layer height cannot exceed the limit in Printer Settings -> Extruder -> Layer height limits"), nullptr, "layer_height" };
|
||||
return { L("Layer height cannot exceed the limit in Printer Settings -> Extruder -> Layer height limits"), nullptr, "layer_height", STRING_EXCEPT_LAYER_HEIGHT_EXCEEDS_LIMIT };
|
||||
}
|
||||
|
||||
// Validate extrusion widths.
|
||||
|
||||
@@ -22,6 +22,7 @@ enum StringExceptionType {
|
||||
STRING_EXCEPT_FILAMENTS_DIFFERENT_TEMP = 2,
|
||||
STRING_EXCEPT_OBJECT_COLLISION_IN_SEQ_PRINT = 3,
|
||||
STRING_EXCEPT_OBJECT_COLLISION_IN_LAYER_PRINT = 4,
|
||||
STRING_EXCEPT_LAYER_HEIGHT_EXCEEDS_LIMIT = 5,
|
||||
STRING_EXCEPT_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#define CLI_PRINTABLE_SIZE_REDUCED -20
|
||||
#define CLI_OBJECT_ARRANGE_FAILED -21
|
||||
#define CLI_OBJECT_ORIENT_FAILED -22
|
||||
#define CLI_MODIFIED_PARAMS_TO_PRINTER -23
|
||||
|
||||
|
||||
#define CLI_NO_SUITABLE_OBJECTS -50
|
||||
|
||||
Reference in New Issue
Block a user