From 515110a6833a9ac42a4d2d4920b1de16ef903bb9 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 17 May 2023 09:59:30 +0200 Subject: [PATCH] Fix partial arrangement on virtual beds --- src/libslic3r/Arrange.hpp | 4 ++-- src/slic3r/GUI/Jobs/ArrangeJob.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/Arrange.hpp b/src/libslic3r/Arrange.hpp index 4ed00668c..874742ecb 100644 --- a/src/libslic3r/Arrange.hpp +++ b/src/libslic3r/Arrange.hpp @@ -1,9 +1,9 @@ #ifndef ARRANGE_HPP #define ARRANGE_HPP -#include "ExPolygon.hpp" - #include + +#include #include namespace Slic3r { diff --git a/src/slic3r/GUI/Jobs/ArrangeJob.hpp b/src/slic3r/GUI/Jobs/ArrangeJob.hpp index a422d4407..6ff25923e 100644 --- a/src/slic3r/GUI/Jobs/ArrangeJob.hpp +++ b/src/slic3r/GUI/Jobs/ArrangeJob.hpp @@ -86,7 +86,7 @@ arrangement::ArrangePolygon get_arrange_poly(T obj, const Plater *plater) using ArrangePolygon = arrangement::ArrangePolygon; ArrangePolygon ap = obj.get_arrange_polygon(); - ap.bed_idx = ap.translation.x() / bed_stride(plater); + ap.bed_idx = get_extents(ap.transformed_poly()).min.x() / bed_stride(plater); ap.setter = [obj, plater](const ArrangePolygon &p) { if (p.is_arranged()) { Vec2d t = p.translation.cast();