Cura/plugins
Ghostkeeper 4c770587e2
Fix getting additional bytes from QImage
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.
2020-03-25 18:00:14 +01:00
..
3MFReader Fix loading comments in gcode snippets from 3mf projects 2020-03-20 09:26:31 +01:00
3MFWriter Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
AMFReader Fix watching for changes in AMF and trimesh-loaded files 2020-03-01 22:49:58 +01:00
CuraDrive Hide upload message progress when upload is done 2020-03-23 11:17:32 +01:00
CuraEngineBackend Fixed small typo in nothing to slice 2020-03-10 11:05:30 +01:00
CuraProfileReader Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
CuraProfileWriter Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
FirmwareUpdateChecker Add verify_mode to ssl context 2020-03-05 16:06:27 +01:00
FirmwareUpdater Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
GCodeGzReader Revert "Prevent zip bombs in the g-codegz reader" 2020-02-27 16:30:35 +01:00
GCodeGzWriter Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
GCodeProfileReader Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
GCodeReader lil: optimize parsing gcode arg letter 2020-02-24 14:56:06 +01:00
GCodeWriter Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
ImageReader Code style 2020-03-05 23:58:12 +01:00
LegacyProfileReader Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
MachineSettingsAction Disallow printers larger than 2km 2020-03-20 11:16:16 +01:00
ModelChecker Skip nodes in modelchecker without active extruder 2020-02-28 13:56:16 +01:00
MonitorStage Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
PerObjectSettingsTool Merge pull request #7223 from Ultimaker/CURA-7255_infill_only_dropdown 2020-03-13 10:30:09 +01:00
PostProcessingPlugin Add list of active scripts to tooltip 2020-02-28 22:51:37 +01:00
PrepareStage Fix binding loop in action panel widget 2020-03-20 14:52:33 +01:00
PreviewStage Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
RemovableDriveOutputDevice Fix the "save to removable drive" not appearing 2020-02-11 09:46:15 +01:00
SentryLogger Prune all sensitive data before sending it to Sentry 2020-02-24 15:27:17 +01:00
SimulationView Merge branch '4.5' 2020-02-25 12:07:47 +01:00
SliceInfoPlugin Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
SolidView Fix getting additional bytes from QImage 2020-03-25 18:00:14 +01:00
SupportEraser Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
Toolbox Merge pull request #7211 from Ultimaker/CURA-7150_proper_http_request_headers 2020-03-24 11:25:07 +01:00
TrimeshReader Fix watching for changes in AMF and trimesh-loaded files 2020-03-01 22:49:58 +01:00
UFPReader Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
UFPWriter Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
UltimakerMachineActions Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
UM3NetworkPrinting Merge pull request #7211 from Ultimaker/CURA-7150_proper_http_request_headers 2020-03-24 11:25:07 +01:00
USBPrinting Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
VersionUpgrade Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
X3DReader Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
XmlMaterialProfile Bump SDK version number of Cura 4.5 to 7.1 2020-02-10 10:45:07 +01:00
XRayView use transparency in xray view and merge shader duplication 2020-02-27 20:29:58 +01:00