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>2018-03-14 18:11:57 +0300
committerbubnikv <bubnikv@gmail.com>2018-03-14 18:11:57 +0300
commitb43a21d1be20963c5afb8c6df8f4618c62c8d0e4 (patch)
tree47e70ea0b4879975f64444a5911cc94ae75a5d76 /xs/src/libslic3r/BoundingBox.hpp
parent523b297738c6fb66b1f5f96fdc4ad3d51c6adf7a (diff)
Extended Print::validate() to check, whether the objects
are inside the print volume.
Diffstat (limited to 'xs/src/libslic3r/BoundingBox.hpp')
-rw-r--r--xs/src/libslic3r/BoundingBox.hpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/xs/src/libslic3r/BoundingBox.hpp b/xs/src/libslic3r/BoundingBox.hpp
index b425a4e3c..92a2bd451 100644
--- a/xs/src/libslic3r/BoundingBox.hpp
+++ b/xs/src/libslic3r/BoundingBox.hpp
@@ -100,31 +100,7 @@ public:
}
bool contains(const BoundingBox3Base<PointClass>& other) const {
- if (!contains(other.min))
- return false;
-
- if (!contains(PointClass(other.max.x, other.min.y, other.min.z)))
- return false;
-
- if (!contains(PointClass(other.max.x, other.max.y, other.min.z)))
- return false;
-
- if (!contains(PointClass(other.min.x, other.max.y, other.min.z)))
- return false;
-
- if (!contains(PointClass(other.min.x, other.min.y, other.max.z)))
- return false;
-
- if (!contains(PointClass(other.max.x, other.min.y, other.max.z)))
- return false;
-
- if (!contains(other.max))
- return false;
-
- if (!contains(PointClass(other.min.x, other.max.y, other.max.z)))
- return false;
-
- return true;
+ return contains(other.min) && contains(other.max);
}
};