Extended Print::validate() to check, whether the objects

are inside the print volume.
This commit is contained in:
bubnikv 2018-03-14 16:11:57 +01:00
parent 523b297738
commit b43a21d1be
4 changed files with 73 additions and 71 deletions

View file

@ -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);
}
};