Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cura/BuildVolume.py')
-rwxr-xr-xcura/BuildVolume.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py
index ff5888b722..4963df65cd 100755
--- a/cura/BuildVolume.py
+++ b/cura/BuildVolume.py
@@ -716,6 +716,11 @@ class BuildVolume(SceneNode):
polygon = polygon.getMinkowskiHull(Polygon.approximatedCircle(border_size))
machine_disallowed_polygons.append(polygon)
+ # For certain machines we don't need to compute disallowed areas for each nozzle.
+ # So we check here and only do the nozzle offsetting if needed.
+ no_nozzle_offsetting_for_disallowed_areas = self._global_container_stack.getMetaDataEntry(
+ "no_nozzle_offsetting_for_disallowed_areas", False)
+
result = {}
for extruder in used_extruders:
extruder_id = extruder.getId()
@@ -735,14 +740,17 @@ class BuildVolume(SceneNode):
right_unreachable_border = 0
top_unreachable_border = 0
bottom_unreachable_border = 0
- #The build volume is defined as the union of the area that all extruders can reach, so we need to know the relative offset to all extruders.
- for other_extruder in ExtruderManager.getInstance().getActiveExtruderStacks():
- other_offset_x = other_extruder.getProperty("machine_nozzle_offset_x", "value")
- other_offset_y = other_extruder.getProperty("machine_nozzle_offset_y", "value")
- left_unreachable_border = min(left_unreachable_border, other_offset_x - offset_x)
- right_unreachable_border = max(right_unreachable_border, other_offset_x - offset_x)
- top_unreachable_border = min(top_unreachable_border, other_offset_y - offset_y)
- bottom_unreachable_border = max(bottom_unreachable_border, other_offset_y - offset_y)
+
+ # Only do nozzle offsetting if needed
+ if not no_nozzle_offsetting_for_disallowed_areas:
+ #The build volume is defined as the union of the area that all extruders can reach, so we need to know the relative offset to all extruders.
+ for other_extruder in ExtruderManager.getInstance().getActiveExtruderStacks():
+ other_offset_x = other_extruder.getProperty("machine_nozzle_offset_x", "value")
+ other_offset_y = other_extruder.getProperty("machine_nozzle_offset_y", "value")
+ left_unreachable_border = min(left_unreachable_border, other_offset_x - offset_x)
+ right_unreachable_border = max(right_unreachable_border, other_offset_x - offset_x)
+ top_unreachable_border = min(top_unreachable_border, other_offset_y - offset_y)
+ bottom_unreachable_border = max(bottom_unreachable_border, other_offset_y - offset_y)
half_machine_width = self._global_container_stack.getProperty("machine_width", "value") / 2
half_machine_depth = self._global_container_stack.getProperty("machine_depth", "value") / 2