Fix LayerPolygon

This commit is contained in:
Jaime van Kessel 2022-09-07 15:32:51 +02:00
parent a8f0e330ad
commit 094d176c45
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4

View file

@ -42,8 +42,8 @@ class LayerPolygon:
self._extruder = extruder
self._types = line_types
unknown_types = numpy.where(self._types >= self.__number_of_types, self._types)
if unknown_types:
unknown_types = numpy.where(self._types >= self.__number_of_types, self._types, None)
if unknown_types.any():
# Got faulty line data from the engine.
for idx in unknown_types:
Logger.warning(f"Found an unknown line type at: {idx}")