mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Update Ultimaker Sketch definitions and refactor PNG formats in MakerbotWriter
CURA-11777
This commit is contained in:
parent
e33264625a
commit
7a52cd3cd5
3 changed files with 14 additions and 4 deletions
|
@ -47,15 +47,19 @@ class MakerbotWriter(MeshWriter):
|
|||
)
|
||||
)
|
||||
|
||||
_PNG_FORMATS = [
|
||||
_PNG_FORMAT = [
|
||||
{"prefix": "isometric_thumbnail", "width": 120, "height": 120},
|
||||
{"prefix": "isometric_thumbnail", "width": 320, "height": 320},
|
||||
{"prefix": "isometric_thumbnail", "width": 640, "height": 640},
|
||||
{"prefix": "thumbnail", "width": 140, "height": 106},
|
||||
{"prefix": "thumbnail", "width": 212, "height": 300},
|
||||
{"prefix": "thumbnail", "width": 960, "height": 1460},
|
||||
{"prefix": "thumbnail", "width": 90, "height": 90},
|
||||
]
|
||||
|
||||
_PNG_FORMAT_METHOD = [
|
||||
{"prefix": "thumbnail", "width": 140, "height": 106},
|
||||
{"prefix": "thumbnail", "width": 212, "height": 300},
|
||||
{"prefix": "thumbnail", "width": 960, "height": 1460},
|
||||
]
|
||||
|
||||
_META_VERSION = "3.0.0"
|
||||
|
||||
# must be called from the main thread because of OpenGL
|
||||
|
@ -108,8 +112,10 @@ class MakerbotWriter(MeshWriter):
|
|||
|
||||
if file_format == "application/x-makerbot-sketch":
|
||||
filename, filedata = "print.gcode", gcode_text_io.getvalue()
|
||||
self._PNG_FORMATS = self._PNG_FORMAT
|
||||
else:
|
||||
filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue())
|
||||
self._PNG_FORMATS = self._PNG_FORMAT + self._PNG_FORMAT_METHOD
|
||||
|
||||
png_files = []
|
||||
for png_format in self._PNG_FORMATS:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue