From 089ee6c04b816dc0bad57faee2810489a3533676 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 26 Oct 2023 17:36:57 +0200 Subject: [PATCH] Use pyDulcificum Contributes to CURA-10561 --- plugins/MakerbotWriter/MakerbotWriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/MakerbotWriter/MakerbotWriter.py b/plugins/MakerbotWriter/MakerbotWriter.py index 71620d8457..6d91043e3e 100644 --- a/plugins/MakerbotWriter/MakerbotWriter.py +++ b/plugins/MakerbotWriter/MakerbotWriter.py @@ -110,13 +110,12 @@ class MakerbotWriter(MeshWriter): gcode_text_io = StringIO() 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. if not success: self.setInformation(gcode_writer.getInformation()) return False + json_toolpaths = du.gcode_2_miracle_jtp(gcode_text_io.getvalue()) metadata = self._getMeta(nodes) png_files = [] @@ -134,6 +133,7 @@ class MakerbotWriter(MeshWriter): try: with ZipFile(stream, "w", compression=ZIP_DEFLATED) as zip_stream: zip_stream.writestr("meta.json", json.dumps(metadata, indent=4)) + zip_stream.writestr("print.jsontoolpath", json_toolpaths) for png_file in png_files: file, data = png_file["file"], png_file["data"] zip_stream.writestr(file, data)