Parallelized PrintObject::bridge_over_infill()

This commit is contained in:
Vojtech Bubnik 2022-08-22 15:41:36 +02:00
parent 7949ea9544
commit 14e0cd0e96
3 changed files with 56 additions and 46 deletions

View file

@ -121,12 +121,12 @@ void SurfaceCollection::remove_type(const SurfaceType type)
surfaces.erase(surfaces.begin() + j, surfaces.end());
}
void SurfaceCollection::remove_type(const SurfaceType type, Polygons *polygons)
void SurfaceCollection::remove_type(const SurfaceType type, ExPolygons *polygons)
{
size_t j = 0;
for (size_t i = 0; i < surfaces.size(); ++ i) {
if (Surface &surface = surfaces[i]; surface.surface_type == type) {
polygons_append(*polygons, to_polygons(std::move(surface.expolygon)));
polygons->emplace_back(std::move(surface.expolygon));
} else {
if (j < i)
std::swap(surfaces[i], surfaces[j]);