mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 15:15:55 +08:00
The BoundingBox::defined flag was not set in constructor, if initialized from min/max corners. Conflicts: xs/src/libslic3r/BoundingBox.hpp
This commit is contained in:
parent
a5135f4369
commit
12961d5212
@ -21,7 +21,8 @@ class BoundingBoxBase
|
||||
bool defined;
|
||||
|
||||
BoundingBoxBase() : defined(false) {};
|
||||
BoundingBoxBase(const PointClass &pmin, const PointClass &pmax) : min(pmin), max(pmax) {}
|
||||
BoundingBoxBase(const PointClass &pmin, const PointClass &pmax) :
|
||||
min(pmin), max(pmax), defined(pmin.x < pmax.x && pmin.y < pmax.y) {}
|
||||
BoundingBoxBase(const std::vector<PointClass> &points);
|
||||
void merge(const PointClass &point);
|
||||
void merge(const std::vector<PointClass> &points);
|
||||
@ -39,7 +40,9 @@ class BoundingBox3Base : public BoundingBoxBase<PointClass>
|
||||
{
|
||||
public:
|
||||
BoundingBox3Base() : BoundingBoxBase<PointClass>() {};
|
||||
BoundingBox3Base(const PointClass &pmin, const PointClass &pmax) : BoundingBoxBase<PointClass>(pmin, pmax) {}
|
||||
BoundingBox3Base(const PointClass &pmin, const PointClass &pmax) :
|
||||
BoundingBoxBase<PointClass>(pmin, pmax)
|
||||
{ if (pmin.z >= pmax.z) defined = false; }
|
||||
BoundingBox3Base(const std::vector<PointClass> &points);
|
||||
void merge(const PointClass &point);
|
||||
void merge(const std::vector<PointClass> &points);
|
||||
@ -100,6 +103,4 @@ inline bool operator!=(const BoundingBoxBase<VT> &bb1, const BoundingBoxBase<VT>
|
||||
return !(bb1 == bb2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user