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:
authorbubnikv <bubnikv@gmail.com>2017-09-12 16:55:38 +0300
committerbubnikv <bubnikv@gmail.com>2017-09-12 16:55:38 +0300
commitb08d6f1969f237432cd18c15ad6432e5b95fb640 (patch)
tree34f133a112ec0de5f6ab18696f7ba9c5647b5d17 /xs/src/libslic3r/BoundingBox.cpp
parent6d4ec5c989851e442d58f896d4b0324129e7514a (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.cpp30
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);