mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Ported clip_end(), length(), is_perimeter(), is_fill(), is_bridge() to XS
This commit is contained in:
parent
761f261a68
commit
ac88fbcbb0
5 changed files with 50 additions and 36 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue