mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
No longer check printer state when no material lengths are known
This fixes issues with g-code from g-code reader not having material lengths set. CURA-3604
This commit is contained in:
parent
6367755875
commit
910ff7acea
1 changed files with 54 additions and 51 deletions
|
@ -618,7 +618,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list")
|
self._gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list")
|
||||||
|
|
||||||
print_information = Application.getInstance().getPrintInformation()
|
print_information = Application.getInstance().getPrintInformation()
|
||||||
|
warnings = [] # There might be multiple things wrong. Keep a list of all the stuff we need to warn about.
|
||||||
|
|
||||||
|
# Only check for mistakes if there is material length information.
|
||||||
|
if print_information.materialLengths:
|
||||||
# Check if print cores / materials are loaded at all. Any failure in these results in an Error.
|
# Check if print cores / materials are loaded at all. Any failure in these results in an Error.
|
||||||
for index in range(0, self._num_extruders):
|
for index in range(0, self._num_extruders):
|
||||||
if print_information.materialLengths[index] != 0:
|
if print_information.materialLengths[index] != 0:
|
||||||
|
@ -636,8 +639,6 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
self._error_message.show()
|
self._error_message.show()
|
||||||
return
|
return
|
||||||
|
|
||||||
warnings = [] # There might be multiple things wrong. Keep a list of all the stuff we need to warn about.
|
|
||||||
|
|
||||||
for index in range(0, self._num_extruders):
|
for index in range(0, self._num_extruders):
|
||||||
# Check if there is enough material. Any failure in these results in a warning.
|
# Check if there is enough material. Any failure in these results in a warning.
|
||||||
material_length = self._json_printer_state["heads"][0]["extruders"][index]["active_material"]["length_remaining"]
|
material_length = self._json_printer_state["heads"][0]["extruders"][index]["active_material"]["length_remaining"]
|
||||||
|
@ -676,6 +677,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
|
|
||||||
if not is_offset_calibrated:
|
if not is_offset_calibrated:
|
||||||
warnings.append(i18n_catalog.i18nc("@label", "Print core {0} is not properly calibrated. XY calibration needs to be performed on the printer.").format(index + 1))
|
warnings.append(i18n_catalog.i18nc("@label", "Print core {0} is not properly calibrated. XY calibration needs to be performed on the printer.").format(index + 1))
|
||||||
|
else:
|
||||||
|
Logger.log("w", "There was no material usage found. No check to match used material with machine is done.")
|
||||||
|
|
||||||
if warnings:
|
if warnings:
|
||||||
text = i18n_catalog.i18nc("@label", "Are you sure you wish to print with the selected configuration?")
|
text = i18n_catalog.i18nc("@label", "Are you sure you wish to print with the selected configuration?")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue