mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47: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": 120, "height": 120},
|
||||||
{"prefix": "isometric_thumbnail", "width": 320, "height": 320},
|
{"prefix": "isometric_thumbnail", "width": 320, "height": 320},
|
||||||
{"prefix": "isometric_thumbnail", "width": 640, "height": 640},
|
{"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},
|
{"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"
|
_META_VERSION = "3.0.0"
|
||||||
|
|
||||||
# must be called from the main thread because of OpenGL
|
# must be called from the main thread because of OpenGL
|
||||||
|
@ -108,8 +112,10 @@ class MakerbotWriter(MeshWriter):
|
||||||
|
|
||||||
if file_format == "application/x-makerbot-sketch":
|
if file_format == "application/x-makerbot-sketch":
|
||||||
filename, filedata = "print.gcode", gcode_text_io.getvalue()
|
filename, filedata = "print.gcode", gcode_text_io.getvalue()
|
||||||
|
self._PNG_FORMATS = self._PNG_FORMAT
|
||||||
else:
|
else:
|
||||||
filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue())
|
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 = []
|
png_files = []
|
||||||
for png_format in self._PNG_FORMATS:
|
for png_format in self._PNG_FORMATS:
|
||||||
|
|
|
@ -188,7 +188,10 @@
|
||||||
],
|
],
|
||||||
"platform_texture": "MakerbotSketch.png",
|
"platform_texture": "MakerbotSketch.png",
|
||||||
"preferred_quality_type": "draft",
|
"preferred_quality_type": "draft",
|
||||||
|
"reference_machine_id": "sketch",
|
||||||
"supports_network_connection": true,
|
"supports_network_connection": true,
|
||||||
|
"variant_definition": "ultimaker_sketch",
|
||||||
|
"preferred_variant_name": "0.4mm",
|
||||||
"supports_usb_connection": false,
|
"supports_usb_connection": false,
|
||||||
"variants_name": "Extruder",
|
"variants_name": "Extruder",
|
||||||
"weight": -1
|
"weight": -1
|
||||||
|
|
|
@ -5,6 +5,7 @@ version = 4
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
hardware_type = nozzle
|
hardware_type = nozzle
|
||||||
|
reference_extruder_id = sketch_extruder
|
||||||
setting_version = 23
|
setting_version = 23
|
||||||
type = variant
|
type = variant
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue