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:
authorbubnikv <bubnikv@gmail.com>2016-11-09 17:39:12 +0300
committerbubnikv <bubnikv@gmail.com>2016-11-09 17:39:12 +0300
commit317e9131e89782c98201849a21c0e2e91c8fc142 (patch)
tree1a889265c9d11c9e8574a29216af703b59d54568 /xs/src/libslic3r/ExPolygon.cpp
parenteb0ab3861872a8cf1ab08b0d02a16942acdabaac (diff)
New sparse infill: "stars" - David's star shaped infill.
This is very similar to a "triangles" infill, but maximum two lines intersect at a single point. added utility function get_extents_vector()
Diffstat (limited to 'xs/src/libslic3r/ExPolygon.cpp')
-rw-r--r--xs/src/libslic3r/ExPolygon.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/xs/src/libslic3r/ExPolygon.cpp b/xs/src/libslic3r/ExPolygon.cpp
index f37e2e701..fbb616ebb 100644
--- a/xs/src/libslic3r/ExPolygon.cpp
+++ b/xs/src/libslic3r/ExPolygon.cpp
@@ -587,6 +587,15 @@ BoundingBox get_extents_rotated(const ExPolygons &expolygons, double angle)
return bbox;
}
+extern std::vector<BoundingBox> get_extents_vector(const ExPolygons &polygons)
+{
+ std::vector<BoundingBox> out;
+ out.reserve(polygons.size());
+ for (ExPolygons::const_iterator it = polygons.begin(); it != polygons.end(); ++ it)
+ out.push_back(get_extents(*it));
+ return out;
+}
+
bool remove_sticks(ExPolygon &poly)
{
return remove_sticks(poly.contour) || remove_sticks(poly.holes);