From 3de4d4987c7beb816723beeed0b5d002b650ebbc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 28 Sep 2016 15:14:38 +0200 Subject: [PATCH] Prime positions now also intersect with oneother CURA-2375 --- cura/BuildVolume.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 36136eb441..a89dff4cd5 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -386,22 +386,28 @@ class BuildVolume(SceneNode): [prime_x - PRIME_CLEARANCE, prime_y + PRIME_CLEARANCE], ]) prime_polygon = prime_polygon.getMinkowskiHull(Polygon.approximatedCircle(0)) - prime_tower_collision = False + prime_collision = False # Check if prime polygon is intersecting with any of the other disallowed areas. # Note that we check the prime area without bed adhesion. for poly in disallowed_polygons: if prime_polygon.intersectsPolygon(poly) is not None: - prime_tower_collision = True + prime_collision = True break - if not prime_tower_collision: + # Also collide with other prime positions + for poly in prime_polygons: + if prime_polygon.intersectsPolygon(poly) is not None: + prime_collision = True + break + + if not prime_collision: # Prime area is valid. Add as normal. # Once it's added like this, it will recieve a bed adhesion offset, just like the others. prime_polygons.append(prime_polygon) else: self._error_areas.append(prime_polygon) - prime_collision = prime_collision or prime_tower_collision + prime_collision = prime_collision disallowed_polygons.extend(prime_polygons)