diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index fbd4a5d1a9..2d45da94f2 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -560,9 +560,14 @@ Polygons SliceDataStorage::getMachineBorder(int checking_extruder_nr) const Polygons disallowed_areas = mesh_group_settings.get("machine_disallowed_areas"); disallowed_areas = disallowed_areas.unionPolygons(); // union overlapping disallowed areas - for (PolygonRef poly : disallowed_areas) - for (Point& p : poly) - p = Point(machine_size.max.x / 2 + p.X, machine_size.max.y / 2 - p.Y); // apparently the frontend stores the disallowed areas in a different coordinate system + + // The disallowed areas are always expressed in buildplate-centered coordinates + if (! mesh_group_settings.get("machine_center_is_zero")) + { + for (PolygonRef poly : disallowed_areas) + for (Point& p : poly) + p = Point(machine_size.max.x / 2 + p.X, machine_size.max.y / 2 - p.Y); + } std::vector extruder_is_used = getExtrudersUsed();