BoundingBox support for Lines,

BoundingBox constructor will no more throw for empty vector of points.

GMP allowed for Vojtech's fork of boost::polygon Voronoi implementation.

Added libslic3r tests for boost::polygon Voronoi. All Voronoi issues
ever reported on the Internet are captured by the tests. Two issues
reported (the two test cases) are real issues which may influence
PrusaSlicer negatively, namely

https://github.com/boostorg/polygon/issues/43
This commit is contained in:
Vojtech Bubnik 2020-05-28 15:53:53 +02:00
parent 0599dc4df7
commit 6f92538c20
8 changed files with 1621 additions and 26 deletions

View file

@ -125,4 +125,14 @@ Vec3d Linef3::intersect_plane(double z) const
return Vec3d(this->a(0) + v(0) * t, this->a(1) + v(1) * t, z);
}
BoundingBox get_extents(const Lines &lines)
{
BoundingBox bbox;
for (const Line &line : lines) {
bbox.merge(line.a);
bbox.merge(line.b);
}
return bbox;
}
}