Ported Slic3r::BridgeDetector to XS

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

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
{