From 35f741905a79f508a227ddef8150944d3b895f12 Mon Sep 17 00:00:00 2001 From: ThomasToka <117008525+ThomasToka@users.noreply.github.com> Date: Fri, 15 Mar 2024 20:58:57 +0100 Subject: [PATCH] Different first layer height update This update fixes the accounting of the layers when the first layer has different layer height than the following. --- E3S1PROFORKBYTT_printdata_cura_v5_thumbnail.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/E3S1PROFORKBYTT_printdata_cura_v5_thumbnail.py b/E3S1PROFORKBYTT_printdata_cura_v5_thumbnail.py index 7de692e..fd537ef 100644 --- a/E3S1PROFORKBYTT_printdata_cura_v5_thumbnail.py +++ b/E3S1PROFORKBYTT_printdata_cura_v5_thumbnail.py @@ -154,9 +154,8 @@ class E3S1PROFORKBYTT_printdata_cura_v5_thumbnail(Script): filament_used_g = math.ceil(volume_cm3 * density) if volume_cm3 * density > 0 else 0 # Total filament used in grams elif line.startswith(";Layer height:"): layer_height_value = round(float(line.split(":")[1].strip()), 2) - elif line.startswith(";MAXZ:"): - maxz_value = round(float(line.split(":")[1].strip()), 2) - layers = int(maxz_value / layer_height_value) + elif line.startswith(";LAYER_COUNT:"): + layers = int(line.split(":")[1]) elif line.startswith(";TIME:") and total_time == -1: total_time = self.getTimeValue(line)