mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 19:28:07 -06:00
Use pyDulcificum
Contributes to CURA-10561
This commit is contained in:
parent
cdb581a80b
commit
089ee6c04b
1 changed files with 2 additions and 2 deletions
|
@ -110,13 +110,12 @@ class MakerbotWriter(MeshWriter):
|
||||||
gcode_text_io = StringIO()
|
gcode_text_io = StringIO()
|
||||||
success = gcode_writer.write(gcode_text_io, None)
|
success = gcode_writer.write(gcode_text_io, None)
|
||||||
|
|
||||||
# TODO convert gcode_text_io to json
|
|
||||||
|
|
||||||
# Writing the g-code failed. Then I can also not write the gzipped g-code.
|
# Writing the g-code failed. Then I can also not write the gzipped g-code.
|
||||||
if not success:
|
if not success:
|
||||||
self.setInformation(gcode_writer.getInformation())
|
self.setInformation(gcode_writer.getInformation())
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
json_toolpaths = du.gcode_2_miracle_jtp(gcode_text_io.getvalue())
|
||||||
metadata = self._getMeta(nodes)
|
metadata = self._getMeta(nodes)
|
||||||
|
|
||||||
png_files = []
|
png_files = []
|
||||||
|
@ -134,6 +133,7 @@ class MakerbotWriter(MeshWriter):
|
||||||
try:
|
try:
|
||||||
with ZipFile(stream, "w", compression=ZIP_DEFLATED) as zip_stream:
|
with ZipFile(stream, "w", compression=ZIP_DEFLATED) as zip_stream:
|
||||||
zip_stream.writestr("meta.json", json.dumps(metadata, indent=4))
|
zip_stream.writestr("meta.json", json.dumps(metadata, indent=4))
|
||||||
|
zip_stream.writestr("print.jsontoolpath", json_toolpaths)
|
||||||
for png_file in png_files:
|
for png_file in png_files:
|
||||||
file, data = png_file["file"], png_file["data"]
|
file, data = png_file["file"], png_file["data"]
|
||||||
zip_stream.writestr(file, data)
|
zip_stream.writestr(file, data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue