Fix direction of Y-offset in disallowed areas

The front end has inverted Y with respect to the g-code. The prime position was correctly inverted but the nozzle offset wasn't.
This commit is contained in:
Ghostkeeper 2017-06-28 09:23:14 +02:00
parent 21624d7761
commit fb1d7bc223
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75

View File

@ -727,7 +727,7 @@ class BuildVolume(SceneNode):
offset_x = extruder.getProperty("machine_nozzle_offset_x", "value") offset_x = extruder.getProperty("machine_nozzle_offset_x", "value")
if offset_x is None: if offset_x is None:
offset_x = 0 offset_x = 0
offset_y = extruder.getProperty("machine_nozzle_offset_y", "value") offset_y = -extruder.getProperty("machine_nozzle_offset_y", "value")
if offset_y is None: if offset_y is None:
offset_y = 0 offset_y = 0
result[extruder_id] = [] result[extruder_id] = []
@ -746,7 +746,7 @@ class BuildVolume(SceneNode):
#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. #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(): for other_extruder in ExtruderManager.getInstance().getActiveExtruderStacks():
other_offset_x = other_extruder.getProperty("machine_nozzle_offset_x", "value") other_offset_x = other_extruder.getProperty("machine_nozzle_offset_x", "value")
other_offset_y = other_extruder.getProperty("machine_nozzle_offset_y", "value") other_offset_y = -other_extruder.getProperty("machine_nozzle_offset_y", "value")
left_unreachable_border = min(left_unreachable_border, other_offset_x - offset_x) left_unreachable_border = min(left_unreachable_border, other_offset_x - offset_x)
right_unreachable_border = max(right_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) top_unreachable_border = min(top_unreachable_border, other_offset_y - offset_y)