2013-09-06 18:36:38 +02:00
|
|
|
#include "Surface.hpp"
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
2015-10-26 23:23:03 +01:00
|
|
|
Surface::operator Polygons() const
|
|
|
|
{
|
|
|
|
return this->expolygon;
|
|
|
|
}
|
|
|
|
|
2013-09-13 14:48:40 +02:00
|
|
|
double
|
|
|
|
Surface::area() const
|
|
|
|
{
|
|
|
|
return this->expolygon.area();
|
|
|
|
}
|
|
|
|
|
2013-11-23 00:07:04 +01:00
|
|
|
bool
|
|
|
|
Surface::is_solid() const
|
|
|
|
{
|
|
|
|
return this->surface_type == stTop
|
|
|
|
|| this->surface_type == stBottom
|
2014-03-25 01:11:28 +01:00
|
|
|
|| this->surface_type == stBottomBridge
|
2014-11-27 00:38:05 +01:00
|
|
|
|| this->surface_type == stInternalSolid
|
|
|
|
|| this->surface_type == stInternalBridge;
|
2013-11-23 00:07:04 +01:00
|
|
|
}
|
|
|
|
|
2014-02-10 13:19:44 +01:00
|
|
|
bool
|
|
|
|
Surface::is_external() const
|
|
|
|
{
|
|
|
|
return this->surface_type == stTop
|
2014-03-25 01:11:28 +01:00
|
|
|
|| this->surface_type == stBottom
|
|
|
|
|| this->surface_type == stBottomBridge;
|
2014-02-10 13:19:44 +01:00
|
|
|
}
|
|
|
|
|
2014-12-09 01:08:58 +01:00
|
|
|
bool
|
|
|
|
Surface::is_internal() const
|
|
|
|
{
|
|
|
|
return this->surface_type == stInternal
|
|
|
|
|| this->surface_type == stInternalBridge
|
|
|
|
|| this->surface_type == stInternalSolid
|
|
|
|
|| this->surface_type == stInternalVoid;
|
|
|
|
}
|
|
|
|
|
2013-11-23 00:07:04 +01:00
|
|
|
bool
|
2014-03-25 01:11:28 +01:00
|
|
|
Surface::is_bottom() const
|
2013-11-23 00:07:04 +01:00
|
|
|
{
|
|
|
|
return this->surface_type == stBottom
|
2014-03-25 01:11:28 +01:00
|
|
|
|| this->surface_type == stBottomBridge;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
Surface::is_bridge() const
|
|
|
|
{
|
|
|
|
return this->surface_type == stBottomBridge
|
2013-11-23 00:07:04 +01:00
|
|
|
|| this->surface_type == stInternalBridge;
|
|
|
|
}
|
|
|
|
|
2013-09-06 18:36:38 +02:00
|
|
|
}
|