Fix partial arrangement on virtual beds

This commit is contained in:
tamasmeszaros 2023-05-17 09:59:30 +02:00
parent c60a10b7e4
commit 515110a683
2 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
#ifndef ARRANGE_HPP #ifndef ARRANGE_HPP
#define ARRANGE_HPP #define ARRANGE_HPP
#include "ExPolygon.hpp"
#include <boost/variant.hpp> #include <boost/variant.hpp>
#include <libslic3r/ExPolygon.hpp>
#include <libslic3r/BoundingBox.hpp> #include <libslic3r/BoundingBox.hpp>
namespace Slic3r { namespace Slic3r {

View File

@ -86,7 +86,7 @@ arrangement::ArrangePolygon get_arrange_poly(T obj, const Plater *plater)
using ArrangePolygon = arrangement::ArrangePolygon; using ArrangePolygon = arrangement::ArrangePolygon;
ArrangePolygon ap = obj.get_arrange_polygon(); 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) { ap.setter = [obj, plater](const ArrangePolygon &p) {
if (p.is_arranged()) { if (p.is_arranged()) {
Vec2d t = p.translation.cast<double>(); Vec2d t = p.translation.cast<double>();