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()
This commit is contained in:
bubnikv 2016-11-09 15:39:12 +01:00
parent eb0ab38618
commit 317e9131e8
10 changed files with 52 additions and 3 deletions

View file

@ -328,6 +328,15 @@ BoundingBox get_extents_rotated(const Polygons &polygons, double angle)
return bb;
}
extern std::vector<BoundingBox> get_extents_vector(const Polygons &polygons)
{
std::vector<BoundingBox> out;
out.reserve(polygons.size());
for (Polygons::const_iterator it = polygons.begin(); it != polygons.end(); ++ it)
out.push_back(get_extents(*it));
return out;
}
static inline bool is_stick(const Point &p1, const Point &p2, const Point &p3)
{
Point v1 = p2 - p1;