diff --git a/src/controller.py b/src/controller.py index 08dd862..940a015 100644 --- a/src/controller.py +++ b/src/controller.py @@ -615,7 +615,11 @@ def work(): return p.stderr elif p.returncode == 1: # fatal, the error is in the latest line - return p.stdout.splitlines()[-1] + error_message = p.stdout.splitlines()[-1] + if "path is not closed before triangulation" in error_message: + return locales.getLocale().WarningPathNotClosed + else: + return error_message # no errors return "" diff --git a/src/locales.py b/src/locales.py index 232adac..4307e82 100644 --- a/src/locales.py +++ b/src/locales.py @@ -141,6 +141,7 @@ class Locale: UninterruptedPrint = "Uninterrupted print" M10CutDistance = "Filament cut distance, mm:" + WarningPathNotClosed = "When cutting the model, not closed areas were found! Check that the shapes are positioned correctly" def __init__(self, **entries): self.__dict__.update(entries) @@ -290,6 +291,7 @@ def __init__(self, **entries): SelectingCalibrationData="Выбор калибровочных данных", UninterruptedPrint="Печать непрерывным волокном", M10CutDistance="Дистанция отреза филамента, мм:", + WarningPathNotClosed="При разрезании модели были обнаружены незамкнутые участки! Проверьте корректность расположения фигур", ), }