diff --git a/plugins/PostProcessingPlugin/scripts/X40Snapshot.py b/plugins/PostProcessingPlugin/scripts/X40Snapshot.py deleted file mode 100644 index f4dc926cba..0000000000 --- a/plugins/PostProcessingPlugin/scripts/X40Snapshot.py +++ /dev/null @@ -1,80 +0,0 @@ -from UM.Logger import Logger -from cura.Snapshot import Snapshot -from PyQt5.QtCore import QBuffer - -from ..Script import Script - - -class X40Snapshot(Script): - def __init__(self): - super().__init__() - - def _createSnapshot(self, width, height): - Logger.log("d", "Creating thumbnail image...") - try: - return Snapshot.snapshot(width, height) - except Exception: - Logger.logException("w", "Failed to create snapshot image") - - def _convertSnapshotToGcode(self, snapshot): - Logger.log("d", "Encoding thumbnail image...") - try: - thumbnail_buffer = QBuffer() - thumbnail_buffer.open(QBuffer.ReadWrite) - thumbnail_image = snapshot - thumbnail_image.save(thumbnail_buffer, "JPG") - - thumbnail_buffer.seek(0) - gcode = [] - newline = "W221" - byte = thumbnail_buffer.read(1) - counter = 0 - while byte != b"": - if counter == 0: - gcode.append(newline) - newline = "W220 " - counter = 40 - newline += byte.hex() - counter -= 1 - - byte = thumbnail_buffer.read(1) - gcode.append(newline) - gcode.append("W222") - - thumbnail_buffer.close() - return gcode - except Exception: - Logger.logException("w", "Failed to encode snapshot image") - - def getSettingDataString(self): - return """{ - "name": "Create Thumbnail for Weedo X40", - "key": "X40Snapshot", - "metadata": {}, - "version": 2, - "settings": - {} - }""" - - def execute(self, data): - width = 180 - height = 180 - - snapshot = self._createSnapshot(width, height) - if snapshot: - snapshot_gcode = self._convertSnapshotToGcode(snapshot) - - for layer in data: - layer_index = data.index(layer) - lines = data[layer_index].split("\n") - for line in lines: - if line.startswith(";Generated with Cura"): - line_index = lines.index(line) - insert_index = line_index + 1 - lines[insert_index:insert_index] = snapshot_gcode - break - - final_lines = "\n".join(lines) - data[layer_index] = final_lines - - return data diff --git a/resources/quality/weedo_x40/weedo_x40_0.4_global_Draft.inst.cfg b/resources/quality/weedo_x40/weedo_x40_0.4_global_Draft.inst.cfg deleted file mode 100644 index 44890f81e7..0000000000 --- a/resources/quality/weedo_x40/weedo_x40_0.4_global_Draft.inst.cfg +++ /dev/null @@ -1,16 +0,0 @@ -[general] -version = 4 -name = Draft -definition = weedo_x40 - -[metadata] -setting_version = 17 -type = quality -quality_type = draft -weight = -4 -global_quality = True - -[values] -layer_height = 0.24 -raft_interface_thickness = 0.30 - diff --git a/resources/quality/weedo_x40/weedo_x40_0.4_global_Extra_Fine.inst.cfg b/resources/quality/weedo_x40/weedo_x40_0.4_global_Extra_Fine.inst.cfg deleted file mode 100644 index f6053e2b21..0000000000 --- a/resources/quality/weedo_x40/weedo_x40_0.4_global_Extra_Fine.inst.cfg +++ /dev/null @@ -1,14 +0,0 @@ -[general] -version = 4 -name = Extra Fine -definition = weedo_x40 - -[metadata] -setting_version = 17 -type = quality -quality_type = extra fine -weight = -1 -global_quality = True - -[values] -layer_height = 0.12 diff --git a/resources/quality/weedo_x40/weedo_x40_0.4_global_Fine.inst.cfg b/resources/quality/weedo_x40/weedo_x40_0.4_global_Fine.inst.cfg deleted file mode 100644 index a7824b2844..0000000000 --- a/resources/quality/weedo_x40/weedo_x40_0.4_global_Fine.inst.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[general] -version = 4 -name = Fine -definition = weedo_x40 - -[metadata] -setting_version = 17 -type = quality -quality_type = fine -weight = -2 -global_quality = True - -[values] -layer_height = 0.16 - diff --git a/resources/quality/weedo_x40/weedo_x40_0.4_global_Normal.inst.cfg b/resources/quality/weedo_x40/weedo_x40_0.4_global_Normal.inst.cfg deleted file mode 100644 index 49f4846df6..0000000000 --- a/resources/quality/weedo_x40/weedo_x40_0.4_global_Normal.inst.cfg +++ /dev/null @@ -1,15 +0,0 @@ -[general] -version = 4 -name = Normal -definition = weedo_x40 - -[metadata] -setting_version = 17 -type = quality -quality_type = normal -weight = -3 -global_quality = True - -[values] -layer_height = 0.2 -