From 7fd4800e7cbee720f735e22848fdc05960e5435f Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 9 Jan 2020 14:21:01 +0100 Subject: [PATCH] Fix wrong bounding box calculation for initial arrange item. --- src/libnest2d/include/libnest2d/placers/nfpplacer.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp b/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp index 003028758..e44e1dae1 100644 --- a/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp +++ b/src/libnest2d/include/libnest2d/placers/nfpplacer.hpp @@ -1116,12 +1116,8 @@ private: for(Item& item : items_) item.translate(d); } - void setInitialPosition(Item& item) { - auto sh = item.rawShape(); - sl::translate(sh, item.translation()); - sl::rotate(sh, item.rotation()); - - Box bb = sl::boundingBox(sh); + void setInitialPosition(Item& item) { + Box bb = item.boundingBox(); Vertex ci, cb; auto bbin = sl::boundingBox(bin_);