1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-24 10:05:52 +00:00

Polygon->lines

This commit is contained in:
Alessandro Ranellucci
2013-07-15 23:28:23 +02:00
parent 77c479c127
commit 62e5bd0ee7
3 changed files with 25 additions and 2 deletions
+15 -1
View File
@@ -13,10 +13,24 @@ extern "C" {
namespace Slic3r {
class Polygon : public MultiPoint {};
class Polygon : public MultiPoint {
public:
Lines lines();
};
typedef std::vector<Polygon> Polygons;
Lines
Polygon::lines()
{
Lines lines;
for (int i = 0; i < this->points.size()-1; i++) {
lines.push_back(Line(this->points[i], this->points[i+1]));
}
lines.push_back(Line(this->points.back(), this->points.front()));
return lines;
}
}
#endif