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:
Vojtech Bubnik 2021-05-03 11:39:53 +02:00
parent 9fbba855ef
commit 09a80d954c
22 changed files with 437 additions and 398 deletions

View file

@ -14,12 +14,12 @@ namespace Slic3r {
void ExtrusionPath::intersect_expolygons(const ExPolygonCollection &collection, ExtrusionEntityCollection* retval) const
{
this->_inflate_collection(intersection_pl((Polylines)polyline, to_polygons(collection.expolygons)), retval);
this->_inflate_collection(intersection_pl(Polylines{ polyline }, collection.expolygons), retval);
}
void ExtrusionPath::subtract_expolygons(const ExPolygonCollection &collection, ExtrusionEntityCollection* retval) const
{
this->_inflate_collection(diff_pl((Polylines)this->polyline, to_polygons(collection.expolygons)), retval);
this->_inflate_collection(diff_pl(Polylines{ this->polyline }, collection.expolygons), retval);
}
void ExtrusionPath::clip_end(double distance)