From 612d03c73ae0f577a9b0eae8c097fcd8e8a37a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20W=C3=BCrthner?= <5859228+crysxd@users.noreply.github.com> Date: Sun, 6 Oct 2024 09:24:35 +0200 Subject: [PATCH] Fix layer detection for Artillery Slicer (#93) * Fix layer detection for Artillery Slicer * Bump version to 2.1.6 --- octoapp/layerutils.py | 10 +++++++++- setup.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/octoapp/layerutils.py b/octoapp/layerutils.py index 8c498a4..58af84d 100644 --- a/octoapp/layerutils.py +++ b/octoapp/layerutils.py @@ -44,7 +44,15 @@ def IsLayerChange(line, context): if line.startswith("; G-Code generated by Simplify3D"): context["slicer"] = "simplify" - slicer = context.get("slicer", None) + # Artillery Slicer (and others?) removed the "generated by" line, this line indicates a PS derivative + if line.startswith("; external perimeters extrusion width ="): + context["slicer"] = "prusa" + + # Second fallback, this indicates a Cura derivative + if line.startswith(";LAYER_COUNT:"): + context["slicer"] = "cura" + + slicer = context.get("slicer", None) if slicer == "prusa": return line.startswith(";LAYER_CHANGE") diff --git a/setup.py b/setup.py index d6e6b3f..4d05d95 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module # Note that this is also parsed by the moonraker module to pull the version, so the string and format must remain the same! -plugin_version = "2.1.5" +plugin_version = "2.1.6" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module