Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2020-03-25 20:57:30 +0300
committerGhostkeeper <rubend@tutanota.com>2020-03-25 20:57:30 +0300
commit986284052d4bb460074cbe11de8d33aea293b849 (patch)
tree4728c98425898289684e82b86901a6cb2ff3e021 /plugins/SolidView
parentc2651d1141b9794d46462c082accdf92df7b033b (diff)
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.
Diffstat (limited to 'plugins/SolidView')
-rw-r--r--plugins/SolidView/SolidView.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py
index 6acd72e615..4db938017d 100644
--- a/plugins/SolidView/SolidView.py
+++ b/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)