Ported Slic3r::BridgeDetector to XS

This commit is contained in:
Alessandro Ranellucci committed 2014-11-15 22:41:22 +01:00
1 parent 36825e0134
commit 379cde30e2
22 files changed
+539 -307

No files matched your search

+7
View File
@@ -1,4 +1,5 @@
#include "Polyline.hpp"
#include "Line.hpp"
#include "Polygon.hpp"
namespace Slic3r {
@@ -10,6 +11,12 @@ Polyline::operator Polylines() const
return polylines;
}
Polyline::operator Line() const
{
if (this->points.size() > 2) CONFESS("Can't convert polyline with more than two points to a line");
return Line(this->points.front(), this->points.back());
}
Point
Polyline::last_point() const
{