From bac58ecc82968df88b43650f7c86f2d61098e953 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 12 May 2016 13:16:14 +0200 Subject: [PATCH] Prevent models from vibrating on the z axis due to fp errors, change the tolerance of the comparison. Contributes to CURA-1504 --- cura/PlatformPhysics.py | 2 +- cura/PlatformPhysicsOperation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 7b2a47eef5..55cc3652e1 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -134,7 +134,7 @@ class PlatformPhysics: node._outside_buildarea = True - if move_vector != Vector(): + if not Vector.Null.equals(move_vector, epsilon=1e-5): op = PlatformPhysicsOperation.PlatformPhysicsOperation(node, move_vector) op.push() diff --git a/cura/PlatformPhysicsOperation.py b/cura/PlatformPhysicsOperation.py index 5d2089e8af..fa58e45d9c 100644 --- a/cura/PlatformPhysicsOperation.py +++ b/cura/PlatformPhysicsOperation.py @@ -28,4 +28,4 @@ class PlatformPhysicsOperation(Operation): return group def __repr__(self): - return "PlatformPhysicsOperation(t = {0})".format(self._position) + return "PlatformPhysicsOperation(new_position = {0})".format(self._new_position)