From d5166030d76838e4aa52c25338081468c2535195 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 9 Apr 2020 11:27:40 +0200 Subject: [PATCH] Don't detect retractions if E is almost equal, but rounding errors Contributes to issue CURA-7351. --- plugins/PostProcessingPlugin/scripts/RetractContinue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/RetractContinue.py b/plugins/PostProcessingPlugin/scripts/RetractContinue.py index aba55596b0..076d55df3b 100644 --- a/plugins/PostProcessingPlugin/scripts/RetractContinue.py +++ b/plugins/PostProcessingPlugin/scripts/RetractContinue.py @@ -41,7 +41,7 @@ class RetractContinue(Script): if not self.getValue(line, "E"): # Either None or 0: Not a retraction then. continue new_e = self.getValue(line, "E") - if new_e >= current_e: # Not a retraction. + if new_e - current_e >= -0.0001: # Not a retraction. Account for floating point rounding errors. current_e = new_e continue # A retracted travel move may consist of multiple commands, due to combing.