Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2014-11-09 17:27:34 +0300
committerAlessandro Ranellucci <aar@cpan.org>2014-11-09 17:27:34 +0300
commitbad0bd8520abfa7d54ee01a272959d06ec5f4653 (patch)
tree4caa8b93bd6cfb913ad961bca934b3da41965b25 /xs/src/libslic3r/Geometry.cpp
parent3e4c57216412504e63154b6887bf14f89f4b559f (diff)
Ported Print::validate() to XS
Diffstat (limited to 'xs/src/libslic3r/Geometry.cpp')
-rw-r--r--xs/src/libslic3r/Geometry.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Geometry.cpp b/xs/src/libslic3r/Geometry.cpp
index 002f11f46..8c2664aa1 100644
--- a/xs/src/libslic3r/Geometry.cpp
+++ b/xs/src/libslic3r/Geometry.cpp
@@ -52,6 +52,16 @@ convex_hull(Points points, Polygon* hull)
hull->points.pop_back();
}
+void
+convex_hull(const Polygons &polygons, Polygon* hull)
+{
+ Points pp;
+ for (Polygons::const_iterator p = polygons.begin(); p != polygons.end(); ++p) {
+ pp.insert(pp.end(), p->points.begin(), p->points.end());
+ }
+ convex_hull(pp, hull);
+}
+
/* accepts an arrayref of points and returns a list of indices
according to a nearest-neighbor walk */
void