From 603d69451299324c120d705bc1c423bacca68369 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 25 Oct 2023 16:27:36 +0200 Subject: [PATCH] Fix duration in makerbot metadata CURA-10561 --- plugins/MakerbotWriter/MakerbotWriter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/MakerbotWriter/MakerbotWriter.py b/plugins/MakerbotWriter/MakerbotWriter.py index 2a6243828c..87206a8aaa 100644 --- a/plugins/MakerbotWriter/MakerbotWriter.py +++ b/plugins/MakerbotWriter/MakerbotWriter.py @@ -170,8 +170,9 @@ class MakerbotWriter(MeshWriter): meta["build_plane_temperature"] = material_bed_temperature print_information = application.getPrintInformation() - meta["commanded_duration_s"] = print_information.currentPrintTime.seconds - meta["duration_s"] = print_information.currentPrintTime.seconds + + meta["commanded_duration_s"] = int(print_information.currentPrintTime) + meta["duration_s"] = int(print_information.currentPrintTime) material_lengths = list(map(meter_to_millimeter, print_information.materialLengths)) meta["extrusion_distance_mm"] = material_lengths[0] @@ -202,7 +203,7 @@ class MakerbotWriter(MeshWriter): meta["preferences"] = dict() for node in nodes: - bound = node.getBoundingBox() + bounds = node.getBoundingBox() meta["preferences"][str(node.getName())] = { "machineBounds": [bounds.right, bounds.back, bounds.left, bounds.front] if bounds is not None else None, "printMode": CuraApplication.getInstance().getIntentManager().currentIntentCategory,