Ported clip_end(), length(), is_perimeter(), is_fill(), is_bridge() to XS

This commit is contained in:
Alessandro Ranellucci 2013-11-21 18:03:40 +01:00
parent 761f261a68
commit ac88fbcbb0
5 changed files with 50 additions and 36 deletions

View file

@ -5,6 +5,31 @@
namespace Slic3r {
bool
ExtrusionEntity::is_perimeter() const
{
return this->role == erPerimeter
|| this->role == erExternalPerimeter
|| this->role == erOverhangPerimeter
|| this->role == erContourInternalPerimeter;
}
bool
ExtrusionEntity::is_fill() const
{
return this->role == erFill
|| this->role == erSolidFill
|| this->role == erTopSolidFill;
}
bool
ExtrusionEntity::is_bridge() const
{
return this->role == erBrige
|| this->role == erInternalBridge
|| this->role == erOverhangPerimeter;
}
ExtrusionPath*
ExtrusionPath::clone() const
{
@ -47,6 +72,18 @@ ExtrusionPath::subtract_expolygons(ExPolygonCollection* collection) const
return this->_inflate_collection(clipped);
}
void
ExtrusionPath::clip_end(double distance)
{
this->polyline.clip_end(distance);
}
double
ExtrusionPath::length() const
{
return this->polyline.length();
}
ExtrusionEntityCollection*
ExtrusionPath::_inflate_collection(const Polylines &polylines) const
{