mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
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.
This commit is contained in:
parent
c2651d1141
commit
986284052d
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue