Просмотр исходного кода

Show warning on any invalid pixel, not just 10

Now that we have no noise any more we can do this.
Possibly cuts the processing time in half, too.

Contributes to issue CURA-7262.
Ghostkeeper 5 лет назад
Родитель
Сommit
986284052d
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      plugins/SolidView/SolidView.py

+ 2 - 4
plugins/SolidView/SolidView.py

@@ -291,12 +291,10 @@ class SolidView(View):
                 "b": (np.uint8, 2, "blue"),
                 "a": (np.uint8, 3, "alpha")  # Never filled since QImage was reformatted to RGB888.
             }), np.recarray)
-            bad_pixel_count = np.sum(np.mod(array.r, 2)) # check number of pixels in the red channel with an odd intersection count
-
-            if bad_pixel_count > 10: # allow for 10 pixels to be erroneously marked as problematic
+            if np.any(np.mod(array.r, 2)):
                 self._next_xray_checking_time = time.time() + self._xray_warning_cooldown
                 self._xray_warning_message.show()
-                Logger.log("i", "Xray overlay found %d non-manifold pixels." % bad_pixel_count)
+                Logger.log("i", "X-Ray overlay found non-manifold pixels.")
 
     def _onDontAskMeAgain(self, checked: bool) -> None:
         CuraApplication.getInstance().getPreferences().setValue(self._show_xray_warning_preference, not checked)