Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2021-06-28 15:55:15 +0300
committertamasmeszaros <meszaros.q@gmail.com>2021-06-28 15:55:15 +0300
commit92cf46773a318d605f6a28a86e3eeb298faf6d00 (patch)
treefff9faf392c572683b49a18cc753901252f3a768 /src/libnest2d
parent77e25c5022f6fda2c67a9cce50bf482286f3424b (diff)
Hotfix for arrange not working for objects with huge translation.
Diffstat (limited to 'src/libnest2d')
-rw-r--r--src/libnest2d/include/libnest2d/geometry_traits.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libnest2d/include/libnest2d/geometry_traits.hpp b/src/libnest2d/include/libnest2d/geometry_traits.hpp
index 7ea437339..f388e37b1 100644
--- a/src/libnest2d/include/libnest2d/geometry_traits.hpp
+++ b/src/libnest2d/include/libnest2d/geometry_traits.hpp
@@ -501,8 +501,9 @@ inline P _Box<P>::center() const BP2D_NOEXCEPT {
using Coord = TCoord<P>;
P ret = { // No rounding here, we dont know if these are int coords
- Coord( (getX(minc) + getX(maxc)) / Coord(2) ),
- Coord( (getY(minc) + getY(maxc)) / Coord(2) )
+ // Doing the division like this increases the max range of x and y coord
+ getX(minc) / Coord(2) + getX(maxc) / Coord(2),
+ getY(minc) / Coord(2) + getY(maxc) / Coord(2)
};
return ret;