Add nozzle disallowed areas

These disallowed areas are only at nozzle-height, not at head-height. They therefore won't move along with the nozzle offset.

Contributes to issue CURA-2625.
This commit is contained in:
Ghostkeeper 2016-11-14 17:13:24 +01:00
parent e9ced745fa
commit f0d92873a3
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -417,6 +417,12 @@ class BuildVolume(SceneNode):
#Prime areas are valid. Add as normal.
result_areas[extruder_id].extend(prime_areas[extruder_id])
nozzle_disallowed_areas = extruder.getProperty("nozzle_disallowed_areas", "value")
for area in nozzle_disallowed_areas:
polygon = Polygon(numpy.array(area, numpy.float32))
polygon = polygon.getMinkowskiHull(Polygon.approximatedCircle(disallowed_border_size))
result_areas[extruder_id].append(polygon) #Don't perform the offset on these.
# Add prime tower location as disallowed area.
prime_tower_collision = False
prime_tower_areas = self._computeDisallowedAreasPrinted(used_extruders)