From 632c10db51908445c41a3cd12bd2532c0df0211e Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Wed, 27 Dec 2023 10:12:40 +0100 Subject: [PATCH] Guard against index for edge case CURA-7647 --- plugins/SimulationView/SimulationPass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SimulationView/SimulationPass.py b/plugins/SimulationView/SimulationPass.py index e97a0cd32c..dd94d678ae 100644 --- a/plugins/SimulationView/SimulationPass.py +++ b/plugins/SimulationView/SimulationPass.py @@ -160,7 +160,7 @@ class SimulationPass(RenderPass): ratio = self._layer_view.getCurrentPath() - index pos_a = Vector(polygon.data[index + offset][0], polygon.data[index + offset][1], polygon.data[index + offset][2]) - if ratio <= 0.0001 or index + offset == len(polygon.data): + if ratio <= 0.0001 or index + offset < len(polygon.data): head_position = pos_a + node.getWorldPosition() else: pos_b = Vector(polygon.data[index + offset + 1][0],