From 1586835c5935fb5c88c40093294dbfbd2062d173 Mon Sep 17 00:00:00 2001 From: "shan.chang" Date: Thu, 24 Apr 2025 17:49:05 +0800 Subject: [PATCH] FIX: fix the model is placed at outside of bed, when arrange by object Jira: STUDIO-11815 Change-Id: I98ba7723eb37fa82d7d3a7716b87f83e063f534f --- src/libnest2d/include/libnest2d/placers/nfpplacer.hpp | 8 ++++---- src/libslic3r/Arrange.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp b/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp index c95aa2bb2..aa6846872 100644 --- a/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp +++ b/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp @@ -693,7 +693,7 @@ private: // item won't overlap with virtual objects if it's inside or touches NFP // @return 1 if current item overlaps with virtual objects, 0 otherwise bool overlapWithVirtObject(const Item& item, const Box& binbb){ - if (items_.empty()) return 0; + if (items_.empty()) return false; Shapes nfps = calcnfp(item, binbb, Lvl()); auto v = item.referenceVertex(); for (const RawShape &nfp : nfps) { @@ -1262,9 +1262,9 @@ private: Vertex ci, cb; Box bbin = sl::boundingBox(bin_); - Vertex shrink(10, 10); - bbin.maxCorner() -= shrink; - bbin.minCorner() += shrink; + //Vertex shrink(10, 10); + //bbin.maxCorner() -= shrink; + //bbin.minCorner() += shrink; switch(config_.starting_point) { case Config::Alignment::CENTER: { diff --git a/src/libslic3r/Arrange.hpp b/src/libslic3r/Arrange.hpp index 617fc97a5..3ac265210 100644 --- a/src/libslic3r/Arrange.hpp +++ b/src/libslic3r/Arrange.hpp @@ -4,7 +4,7 @@ #include "ExPolygon.hpp" #include "PrintConfig.hpp" -#define BED_SHRINK_SEQ_PRINT 5 +#define BED_SHRINK_SEQ_PRINT 0 namespace Slic3r {