diff options
author | bubnikv <bubnikv@gmail.com> | 2017-09-12 16:55:38 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-09-12 16:55:38 +0300 |
commit | b08d6f1969f237432cd18c15ad6432e5b95fb640 (patch) | |
tree | 34f133a112ec0de5f6ab18696f7ba9c5647b5d17 /xs/src/libslic3r/BoundingBox.cpp | |
parent | 6d4ec5c989851e442d58f896d4b0324129e7514a (diff) |
The last priming area is shortened and the excess wipe is moved
into the wipe tower if there is enough space inside the wipe tower.
Diffstat (limited to 'xs/src/libslic3r/BoundingBox.cpp')
-rw-r--r-- | xs/src/libslic3r/BoundingBox.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/xs/src/libslic3r/BoundingBox.cpp b/xs/src/libslic3r/BoundingBox.cpp index f268bb3fb..66beaa3d5 100644 --- a/xs/src/libslic3r/BoundingBox.cpp +++ b/xs/src/libslic3r/BoundingBox.cpp @@ -125,15 +125,17 @@ template void BoundingBoxBase<Pointf>::merge(const Pointfs &points); template <class PointClass> void BoundingBoxBase<PointClass>::merge(const BoundingBoxBase<PointClass> &bb) { - if (this->defined) { - this->min.x = std::min(bb.min.x, this->min.x); - this->min.y = std::min(bb.min.y, this->min.y); - this->max.x = std::max(bb.max.x, this->max.x); - this->max.y = std::max(bb.max.y, this->max.y); - } else { - this->min = bb.min; - this->max = bb.max; - this->defined = true; + if (bb.defined) { + if (this->defined) { + this->min.x = std::min(bb.min.x, this->min.x); + this->min.y = std::min(bb.min.y, this->min.y); + this->max.x = std::max(bb.max.x, this->max.x); + this->max.y = std::max(bb.max.y, this->max.y); + } else { + this->min = bb.min; + this->max = bb.max; + this->defined = true; + } } } template void BoundingBoxBase<Point>::merge(const BoundingBoxBase<Point> &bb); @@ -160,11 +162,13 @@ template void BoundingBox3Base<Pointf3>::merge(const Pointf3s &points); template <class PointClass> void BoundingBox3Base<PointClass>::merge(const BoundingBox3Base<PointClass> &bb) { - if (this->defined) { - this->min.z = std::min(bb.min.z, this->min.z); - this->max.z = std::max(bb.max.z, this->max.z); + if (bb.defined) { + if (this->defined) { + this->min.z = std::min(bb.min.z, this->min.z); + this->max.z = std::max(bb.max.z, this->max.z); + } + BoundingBoxBase<PointClass>::merge(bb); } - BoundingBoxBase<PointClass>::merge(bb); } template void BoundingBox3Base<Pointf3>::merge(const BoundingBox3Base<Pointf3> &bb); |