The name wasn't really covering what it was doing. It wasn't setting the duration of the
pause, it was setting the timeout for the stepper disarm.
Also, ive set the defaults so that the behavior remains the same, unlesss a user
explicitly enables this
CURA-7331
textureSize() is not available in opengl 2.1, so we calculate the xray error image scale outside the shader (which is also a theoretical performance improvement because now the scale does not get computed over and over for each pixel)
Apparently this can happen. I don't know what shapes this happens with though. I'm guessing it's got something to do with degenerate shapes.
Fixes Sentry issue CURA-DZ.
These numbers end up beautifully on round numbers if you were to just scale them to their original size and apply these mysterious translation operations.
Also do away with all of the Inkscape and Sodipodi metadata. They don't make it any easier to read.
Contributes to issue CURA-7262.
QImage's bytes are aligned to memory words per column of pixels. That means that one of these columns contains 99% valid image data, but with several bytes of unassigned noise at the end. How many of these padding bytes there are would depend on the image size, i.e. Cura's window size. In the end, the total number of bytes in the image ends up slightly more than w*h*3. As a result, Cura would crash because it couldn't reshape the image. Reshaping was completely unnecessary anyway, but this random noise was giving false positives also.
But how do you then get only the actual pixels from each column of data? We can't just go iterating over this array, as that would be an iteration of thousands of columns which is prohibitively slow in Python. No, we're going to do some Numpy magic. We're going to create a class that pretends to be a Numpy array. Give this class some data and say that this data has a certain pixel size but also a certain STRIDE LENGTH. This stride length can be the length of the actual pixel data. As a result when Numpy sees this object it will read out the data using these strides, all done efficiently within the C code of Numpy.
Framerate is fantastic on my computer. No problems at all. Pretty powerful computer though. But also a big 5k screen. Still no problem for Numpy. Seems to be decently efficient.
Took me quite a while to figure all of this out.
Contributes to issue CURA-7262.