From 594c22cde0bd1e3fec95fd0065df28cf7cddcbb7 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 22 Jan 2023 23:10:31 +0800 Subject: [PATCH] fix wrong print size in case of multi plate Signed-off-by: SoftFever #153 #37 --- src/libslic3r/GCode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index f36ec8124..bee4593b6 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1540,8 +1540,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato // It does NOT encompass MMU/MMU2 starting (wipe) areas. auto pts = std::make_unique(); pts->values.reserve(print.first_layer_convex_hull().size()); - for (const Point &pt : print.first_layer_convex_hull().points) - pts->values.emplace_back(unscale(pt)); + for (const Point& pt : print.first_layer_convex_hull().points) + pts->values.emplace_back(unscale(pt) - Vec2d(print.get_plate_origin().x(), print.get_plate_origin().y())); BoundingBoxf bbox(pts->values); m_placeholder_parser.set("first_layer_print_convex_hull", pts.release()); m_placeholder_parser.set("first_layer_print_min", new ConfigOptionFloats({ bbox.min.x(), bbox.min.y() }));