mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:19:05 +08:00
Guard against index for edge case
CURA-7647
This commit is contained in:
parent
7fab301866
commit
632c10db51
@ -160,7 +160,7 @@ class SimulationPass(RenderPass):
|
|||||||
ratio = self._layer_view.getCurrentPath() - index
|
ratio = self._layer_view.getCurrentPath() - index
|
||||||
pos_a = Vector(polygon.data[index + offset][0], polygon.data[index + offset][1],
|
pos_a = Vector(polygon.data[index + offset][0], polygon.data[index + offset][1],
|
||||||
polygon.data[index + offset][2])
|
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()
|
head_position = pos_a + node.getWorldPosition()
|
||||||
else:
|
else:
|
||||||
pos_b = Vector(polygon.data[index + offset + 1][0],
|
pos_b = Vector(polygon.data[index + offset + 1][0],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user