Merge prusa 2.6.1

This commit is contained in:
QIDI TECH
2023-09-16 16:26:29 +08:00
parent 1338e60f8b
commit 963e22db99
203 changed files with 25254 additions and 6453 deletions

View File

@@ -3,11 +3,10 @@
#include <vector>
#include "../Polygon.hpp"
#include "../ExPolygon.hpp"
namespace Slic3r {
class ExPolygon;
using ExPolygons = std::vector<ExPolygon>;
namespace Geometry {
@@ -16,7 +15,9 @@ Pointf3s convex_hull(Pointf3s points);
Polygon convex_hull(Points points);
Polygon convex_hull(const Polygons &polygons);
Polygon convex_hull(const ExPolygons &expolygons);
Polygon convex_hulll(const Polylines &polylines);
Polygon convex_hull(const Polylines &polylines);
inline Polygon convex_hull(const Polygon &poly) { return convex_hull(poly.points); }
inline Polygon convex_hull(const ExPolygon &poly) { return convex_hull(poly.contour.points); }
// Returns true if the intersection of the two convex polygons A and B
// is not an empty set.

View File

@@ -450,6 +450,19 @@ MedialAxis::MedialAxis(double min_width, double max_width, const ExPolygon &expo
void MedialAxis::build(ThickPolylines* polylines)
{
#ifndef NDEBUG
// Verify the scaling of the coordinates of input line segments.
for (const Line& l : m_lines) {
auto test = [](int32_t v) {
static constexpr const int32_t hi = 65536 * 16383;
assert(v <= hi && -v < hi);
};
test(l.a.x());
test(l.a.y());
test(l.b.x());
test(l.b.y());
}
#endif // NDEBUG
construct_voronoi(m_lines.begin(), m_lines.end(), &m_vd);
Slic3r::Voronoi::annotate_inside_outside(m_vd, m_lines);
// static constexpr double threshold_alpha = M_PI / 12.; // 30 degrees