diff options
author | Simon Edwards <s.edwards@ultimaker.com> | 2016-05-10 14:19:53 +0300 |
---|---|---|
committer | Simon Edwards <s.edwards@ultimaker.com> | 2016-05-10 14:19:53 +0300 |
commit | 7aefb671728f07616730bba71fd11e9e4577123b (patch) | |
tree | c6d555cdca697245839888e7a5d7390a42b71ba2 /cura/PlatformPhysics.py | |
parent | f3c16198c90c72c7c069746232d703dac5c28bb1 (diff) |
Make Vector an immutable class.
Contributes to CURA-1504
Diffstat (limited to 'cura/PlatformPhysics.py')
-rw-r--r-- | cura/PlatformPhysics.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 78f2b4938b..e2bca741a3 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -67,9 +67,9 @@ class PlatformPhysics: if not (node.getParent() and node.getParent().callDecoration("isGroup")): #If an object is grouped, don't move it down z_offset = node.callDecoration("getZOffset") if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator) else 0 if bbox.bottom > 0: - move_vector.setY(-bbox.bottom + z_offset) + move_vector = move_vector.set(y=-bbox.bottom + z_offset) elif bbox.bottom < z_offset: - move_vector.setY((-bbox.bottom) - z_offset) + move_vector = move_vector.set(y=(-bbox.bottom) - z_offset) #if not Float.fuzzyCompare(bbox.bottom, 0.0): # pass#move_vector.setY(-bbox.bottom) @@ -125,8 +125,7 @@ class PlatformPhysics: if overlap is None: continue - move_vector.setX(overlap[0] * 1.1) - move_vector.setZ(overlap[1] * 1.1) + move_vector = move_vector.set(x=overlap[0] * 1.1, z=overlap[1] * 1.1) convex_hull = node.callDecoration("getConvexHull") if convex_hull: if not convex_hull.isValid(): |