mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Prime colission now blocks slicing
CURA-2375
This commit is contained in:
parent
78b052f66c
commit
b0c20eafbd
1 changed files with 5 additions and 6 deletions
|
@ -387,28 +387,28 @@ class BuildVolume(SceneNode):
|
|||
[prime_x - PRIME_CLEARANCE, prime_y + PRIME_CLEARANCE],
|
||||
])
|
||||
prime_polygon = prime_polygon.getMinkowskiHull(Polygon.approximatedCircle(0))
|
||||
prime_collision = False
|
||||
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_collision = True
|
||||
collision = True
|
||||
break
|
||||
|
||||
# Also collide with other prime positions
|
||||
for poly in prime_polygons:
|
||||
if prime_polygon.intersectsPolygon(poly) is not None:
|
||||
prime_collision = True
|
||||
collision = True
|
||||
break
|
||||
|
||||
if not prime_collision:
|
||||
if not 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
|
||||
prime_collision = collision or prime_collision
|
||||
|
||||
disallowed_polygons.extend(prime_polygons)
|
||||
|
||||
|
@ -469,7 +469,6 @@ class BuildVolume(SceneNode):
|
|||
areas.append(prime_tower_area)
|
||||
else:
|
||||
self._error_areas.append(prime_tower_area)
|
||||
|
||||
# The buildplate has errors if either prime tower or prime has a colission.
|
||||
self._has_errors = prime_tower_collision or prime_collision
|
||||
self._disallowed_areas = areas
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue