From: daid Date: Fri, 1 Jun 2012 11:27:19 +0000 (+0200) Subject: Use the proper function for checking if 2 vertexes are almost equal. X-Git-Tag: 12.07~44^2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=caa7d04d9734b6a48e5116f8f96adf0a4acb6a64;p=cura.git Use the proper function for checking if 2 vertexes are almost equal. --- diff --git a/Cura/gui/opengl.py b/Cura/gui/opengl.py index 2c6625ee..7f6fcb12 100644 --- a/Cura/gui/opengl.py +++ b/Cura/gui/opengl.py @@ -313,6 +313,6 @@ def DrawGCodeLayer(layer): glVertex3f(v.x, v.y, v.z) glEnd() prevPathWasRetract = False - if path.type == 'retract' and (path.list[0] - path.list[-1]).vsize() < 0.001: + if path.type == 'retract' and path.list[0].almostEqual(path.list[-1]): prevPathWasRetract = True glEnable(GL_CULL_FACE)