mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
Further rework of ClipperUtils: Replaced many to_polygons() /
to_expolygons() calls with templated ClipperUtils variants to avoid memory allocation and copying.
This commit is contained in:
parent
9fbba855ef
commit
09a80d954c
22 changed files with 437 additions and 398 deletions
|
@ -90,7 +90,6 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
operator Polygons() const { return this->expolygon; }
|
||||
double area() const { return this->expolygon.area(); }
|
||||
bool empty() const { return expolygon.empty(); }
|
||||
void clear() { expolygon.clear(); }
|
||||
|
@ -107,6 +106,16 @@ public:
|
|||
typedef std::vector<Surface> Surfaces;
|
||||
typedef std::vector<Surface*> SurfacesPtr;
|
||||
|
||||
inline Polygons to_polygons(const Surface &surface)
|
||||
{
|
||||
return to_polygons(surface.expolygon);
|
||||
}
|
||||
|
||||
inline Polygons to_polygons(Surface &&surface)
|
||||
{
|
||||
return to_polygons(std::move(surface.expolygon));
|
||||
}
|
||||
|
||||
inline Polygons to_polygons(const Surfaces &src)
|
||||
{
|
||||
size_t num = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue