mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Adapt plater to new convex hull
This commit is contained in:
@@ -17,7 +17,7 @@ sort_points (Point a, Point b)
|
||||
void
|
||||
convex_hull(Points points, Polygon &hull)
|
||||
{
|
||||
assert(points.size() >= 2);
|
||||
assert(points.size() >= 3);
|
||||
// sort input points
|
||||
std::sort(points.begin(), points.end(), sort_points);
|
||||
|
||||
|
||||
@@ -606,7 +606,7 @@ TriangleMesh::convex_hull(Polygon &hull)
|
||||
Points pp;
|
||||
pp.reserve(this->stl.stats.shared_vertices);
|
||||
for (int i = 0; i < this->stl.stats.shared_vertices; i++) {
|
||||
stl_vertex* v = this->stl.v_shared;
|
||||
stl_vertex* v = &this->stl.v_shared[i];
|
||||
pp.push_back(Point(v->x / SCALING_FACTOR, v->y / SCALING_FACTOR));
|
||||
}
|
||||
Slic3r::Geometry::convex_hull(pp, hull);
|
||||
|
||||
Reference in New Issue
Block a user