diff --git a/src/libslic3r/ArrangeHelper.cpp b/src/libslic3r/ArrangeHelper.cpp index a2e1902518..3d06deaaa1 100644 --- a/src/libslic3r/ArrangeHelper.cpp +++ b/src/libslic3r/ArrangeHelper.cpp @@ -92,7 +92,21 @@ static Sequential::PrinterGeometry get_printer_geometry(const ConfigBase& config // Convert the read data so libseqarrange understands them. Sequential::PrinterGeometry out; - out.plate = { { 0, 0 }, { scaled(bed_x), 0}, {scaled(bed_x), scaled(bed_y)}, {0, scaled(bed_y)}}; + //out.plate = { { 0, 0 }, { scaled(bed_x), 0}, {scaled(bed_x), scaled(bed_y)}, {0, scaled(bed_y)}}; + + BoundingBox bed_bounding_box = s_multiple_beds.get_bed_box(); + + double min_x = bed_bounding_box.min.x(); + double min_y = bed_bounding_box.min.y(); + + double max_x = bed_bounding_box.max.x(); + double max_y = bed_bounding_box.max.y(); + + out.plate = { { scaled(min_x), scaled(min_y)}, + { scaled(max_x), scaled(min_y)}, + { scaled(max_x), scaled(max_y)}, + { scaled(min_x), scaled(max_y)}}; + for (const ExtruderSlice& slice : slices) { (slice.shape_type == CONVEX ? out.convex_heights : out.box_heights).emplace(slice.height); out.extruder_slices.insert(std::make_pair(slice.height, slice.polygons)); diff --git a/src/libslic3r/MultipleBeds.hpp b/src/libslic3r/MultipleBeds.hpp index 1b3fccbe78..bfd670f88c 100644 --- a/src/libslic3r/MultipleBeds.hpp +++ b/src/libslic3r/MultipleBeds.hpp @@ -87,7 +87,9 @@ public: m_build_volume_bb = build_volume_bb; } Vec2d get_bed_size() const { return m_build_volume_bb.size(); } - Vec2d bed_gap() const; + BoundingBox get_bed_box() const { return BoundingBox({m_build_volume_bb.min.x(), m_build_volume_bb.min.y()}, + {m_build_volume_bb.max.x(), m_build_volume_bb.max.y()}); } + Vec2d bed_gap() const; Vec2crd get_bed_gap() const; void ensure_wipe_towers_on_beds(Model& model, const std::vector>& prints);