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:
|
||||
|
|
|
@ -188,7 +188,10 @@
|
|||
],
|
||||
"platform_texture": "MakerbotSketch.png",
|
||||
"preferred_quality_type": "draft",
|
||||
"reference_machine_id": "sketch",
|
||||
"supports_network_connection": true,
|
||||
"variant_definition": "ultimaker_sketch",
|
||||
"preferred_variant_name": "0.4mm",
|
||||
"supports_usb_connection": false,
|
||||
"variants_name": "Extruder",
|
||||
"weight": -1
|
||||
|
|
|
@ -5,6 +5,7 @@ version = 4
|
|||
|
||||
[metadata]
|
||||
hardware_type = nozzle
|
||||
reference_extruder_id = sketch_extruder
|
||||
setting_version = 23
|
||||
type = variant
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue